Metastock Formula Writing for a Trading System

Metastock Formula

The primary objective of any kind of investment is to make maximum profit with minimum risk. Stock Market is such a volatile field for investment. In this stock market, traders’ first purpose should be protecting the principle and then trying for profit. In order to protect the principle or minimize the loss, there is a tool that refers to Stop-Loss. The name itself implies its meaning, by using the tool, traders can hedge the risk. You may check our previous article on Stop-Loss. This article will cover a brief description of SL along with writing a Metastock Formula for SL to start with. In the later part, we will discuss on how to create a trading system.

Definition and Types of SL Orders

Stop-Loss in other words terms such as “Stop-Order”, by placing the order investors provide instructions to automatically buy or sell securities if it drops or arises at a certain price. In order to stop the excessive loss, traders can apply various types of SL orders.

There are Market SL, Limit SL, and Trailing SL which are described below:

Limit SL

In the stop-loss limit order, there are two sections available, price and trigger price. Before hitting the SL price, the trigger becomes activated, trigger price always comes first. The only drawback of limit SL is if the price doesn’t hit the SL limit, an order may get canceled.

Market SL

Market stop-loss order or SL M is quite different from limit SL. Here, you get only the trigger price option. When the price hits the trigger, an order will automatically be executed. In this type, there is no fear of canceling orders.

Trailing SL

Trailing stop loss comes under BO (Bracket Order). It basically uses for intraday trading. Now, the question is what is meant by it. Trailing Sl goes ups and down automatically according to the movement of the selected stock by a particular number of ticks.

The advantage of the order is you don’t have to monitor the market and price fluctuation often. By placing Trailing SL, your SL will be adjusted automatically. Therefore, it considers more flexible in comparison to fixed SL. Trailing SL can be used in stocks, options, futures exchange. It acts as a support of an SL order.

Now, come to the Metastock Formula which is attached below:

Metastock Formula for Stop Loss

After opening Metastock, put in the formula described below.

In Metastock. Go to Tools –> Indicator Builder (or Ctrl+B). Select New. From here, you can open the Indicator Editor window. Put the following code:

Now you have to click on Apply and Ok. After that, you will have the Metastock formula ready in your indicators list. Now you need to apply Metastock formula indicator from Insert –> Indicators (or Ctrl+I), select the Simple Trail Stop Loss indicator.

Every trader searches for the best Metastock trading system. In the beginning, one thing should be clear even the most effective trading tools may fail if traders are dealing with greed and fear during a trade. Therefore, to be a Metastock expert, one needs to be patient. Today, we will discuss Metastock formulas and strategy in a simple way.

How to design one of the best Metastock Trading System?

We have already discussed the special feature of Metastock that one can create a buy-sell code according to a personal analytical view. Anyone can get access to its customizable option. For around 30 years, the software is running successfully all over the globe. Metastock users can get enough flexibility. By using own criteria, one can utilize the power to customize the trading system. The system depends on the language, once you become a master in it, you will become an expert on it. It is almost similar to the excel trading system code.

Three Programming Language Components in Metastock Formula

  • Firstly, there are Data Arrays
  • Secondly, there are Mathematical Operators
  • Last but not the least, we need to learn Metastock Function

Data Arrays

Price Array Identifiers Shortcuts

More on Metastock Formula

Users can create various types of customs formulas. In order to find positive performing stocks and sectors, make your own trailing stop loss indicator, and identify the best stop loss value to use, for other uses the formulas are used. In it, there are the signal formula, column formula, and filter formula available.

An example is ColumnA:Buy Sign Cross(Mov( Close,9,S), Mov(Close,50,S)) And Close >Mov(Close,80,S).

I am providing a pdf link that will help you to learn Metastock code.

As we know, there are a variety of Metastock trading systems. From my arsenal of the best Metastock formula, we are sharing with you Omega. The attached image is of Omega. Click on the picture in order to get a proper view.

Metastock Trading System

You can download Omega by clicking here.

To get more information, you can check the Metastock section in our StockManiacs site. You can also share any free trading systems on Metastock with our readers in the comments section.


Metastock was the most popular charting software till 2010. However, after the evolution of AmiBroker, they lost their market share in India. This was mainly due to the high price of the data feeds needed for the software. Still a lot of traders worldwide follow this software and learning Metastock Formula writing can give you an edge in creating your own trading logic into a full-fledged trading system.

Discover more from StockManiacs

Subscribe to get the latest posts sent to your email.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top