Home » Blog » Metastock » Platforms » Metastock Formula Writing to Create a Trading System

Metastock Formula Writing to Create 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 then try for profit. In order to protect the principle or minimize the loss, there is a tool which 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 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. As 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 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:

Stop1:=If( PREV = PREV,
( H – 4.5ATR(14) ),
PREV),
( H – 4.5
ATR(14) ));

Stop2:=If( PREV = PREV,
( C – 3.5ATR(14) ),
PREV),
( C – 3.5
ATR(14) ));

StopLong:=If(Stop1>Stop2,Stop1,Stop2);

Stop1:=If( PREV > H,
If(( L + 4ATR(14) ) H,
If(( C + 3.5
ATR(14) ) <= PREV,
( C + 3.5ATR(14) ),
PREV),
( C + 3.5
ATR(14) ));

StopShort:=If(Stop1<Stop2,Stop1,Stop2);

If( ((Year()<=2012) OR (Year()=2050 AND Month()<=6 AND DayOfMonth()<=31)),
If((BarsSince(LBarsSince(H>Ref(StopShort,-1)) ),StopLong,StopShort),C);

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 that 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

  • Data Arrays
  • Mathematical Operators
  • Metastock Function

Data Arrays

Price Array Identifiers Shortcuts
OpenO
HighH
LowL
CloseC
VolumeV

More on Metastock Formula

Users can create various types of customs formula. In order to find positive performing stocks and sectors, to make own trailing stop loss indicator, 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 on the following link.

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.

Leave a Reply

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