By David Jenyns

In Part 1 of Designing a Trading System in MetaStock addon, I had discussed the major components you needed to be able to track to create a mechanical entry system. These were measures of price, liquidity, trend, and volatility. The question now is, how do we code this MetaStock addon?

First, let me offer you the most valuable piece of knowledge I have acquired over the years about MetaStock addon formula writing. This one secret will turn you into a MetaStock addon master. Do you think I know all of the MetaStock addon pre-programmed formula and propriety indicators? Well, I'm good, but I'm not that good.

When coding a MetaStock addon, the key to getting it ÿ0rightÿ( is to write what it is you are trying to achieve ÿ0down in Englishÿ(. Once you've done this, it is easy to convert it into a MetaStock addon formula.

Let's look at an example. Our first entry condition is a measure of price. As mentioned in Part 1, you want to set a price minimum to remove speculative stocks. Please note that the values you select will depend on the exchange you are trading. Some markets tend to be more expensive than others. For this example, we are looking to design a long-term MetaStock addon trend following system to trade on the Australian Stock Exchange.

In Australia anything under \$1 could be classed as a speculative stock. So how do you stipulate that the stocks you want must be greater than \$1? First, ÿ0write it in Englishÿ(: You want stocks with a 21-day average closing price that is greater than \$1. Now, you can convert this into a MetaStock addon formula.

Using the formula reference section in the MetaStock Programming Study Guide , you can check the syntax of a moving average. Once you have this information, it's simply a matter of plugging in the correct numbers. Then, by using the ÿ0greater thanÿ( symbol, you can stipulate the price to be greater than \$1. The MetaStock addon code will look like this:

Mov(c,21,s) > 1

Let's move onto the next component, liquidity. This is a measure of how much money a stock trades. It is important to identify stocks that have enough money moving through them so that you're never caught with a stock you can't get out of. For this example, let's say we require the 21-day average of volume multiplied by the closing price to be greater than \$200,000. In MetaStock addon language this would be:

Mov(v,21,s)*C > 200000

In the next article I'll go through the last two components needed to design a mechanical entry system or MetaStock addon . With this information, you will be well on your way to starting an effective, and profitable, MetaStock addon trading system.