Traders' Tips from TASC Magazine

Boosting Profitability - the AIM Indicator

Lawrence Chan and Louis Lin's article, "Boosting Profitability," includes the Neoticker code for their AIM indicator. The MetaStock code is listed below. This formula uses the Security Data function which is only available in MetaStock version 8.01 or later;
or any versions of MetaStock Professional.

To enter this indicator into MetaStock:

  1. In the Tools menu, select Indicator Builder.
  2. Click New to open the Indicator Editor for a new indicator.
  3. Type the name of the formula.
  4. Click in the larger window and type in the formula.

Name: AIM

Formula:

x:=Input("Momentum Periods",1,200,10);
(Security("ONLINE:AA", Mo(x)>100))+
(Security("ONLINE:AXP", Mo(x)>100))+
(Security("ONLINE:BA", Mo(x)>100))+
(Security("ONLINE:C", Mo(x)>100))+
(Security("ONLINE:CAT", Mo(x)>100))+
(Security("ONLINE:DD", Mo(x)>100))+
(Security("ONLINE:DIS", Mo(x)>100))+
(Security("ONLINE:EK", Mo(x)>100))+
(Security("ONLINE:GE", Mo(x)>100))+
(Security("ONLINE:GM", Mo(x)>100))+
(Security("ONLINE:HD", Mo(x)>100))+
(Security("ONLINE:HON", Mo(x)>100))+
(Security("ONLINE:HPQ", Mo(x)>100))+
(Security("ONLINE:IBM", Mo(x)>100))+
(Security("ONLINE:INTC", Mo(x)>100))+
(Security("ONLINE:IP", Mo(x)>100))+
(Security("ONLINE:JNJ", Mo(x)>100))+
(Security("ONLINE:JPM", Mo(x)>100))+
(Security("ONLINE:KO", Mo(x)>100))+
(Security("ONLINE:MCD", Mo(x)>100))+
(Security("ONLINE:MMM", Mo(x)>100))+
(Security("ONLINE:MO", Mo(x)>100))+
(Security("ONLINE:MRK", Mo(x)>100))+
(Security("ONLINE:MSFT", Mo(x)>100))+
(Security("ONLINE:PG", Mo(x)>100))+
(Security("ONLINE:SBC", Mo(x)>100))+
(Security("ONLINE:T", Mo(x)>100))+
(Security("ONLINE:UTX", Mo(x)>100))+
(Security("ONLINE:WMT", Mo(x)>100))+
(Security("ONLINE:XOM", Mo(x)>100))

The formula is written to use online data. It can be modified to use data stored locally by replacing the text ONLINE:with the path to the local data. For example, if the local data was stored in the folder C:\ MetaStock Data \ Dow 30, the second line of the formula would look like this:

(Security("C:\ MetaStock Data \ Dow 30\AA", Mo(x)>0))+

The same change would be made to all the other lines which start with the word security. Please note that the path entered must be correct or the formula will return errors. Also, since custom indicators are limited to 2500 characters, there is a limit to the number of securities this indicator can reference. This limit will vary based on the length of the path specified for the security's data files. Using a short path or online data will allow for more securities to be used.

The system test presented in the article can be created with the following formulas:

Buy Order:

pi:= Fml( "AIM");
Ref(Sum(pi<Ref(pi,-1),2)=2,-1) AND
(pi>Ref(pi,-1)) AND
((pi-Ref(pi,-1))<5) AND
(pi<20)

Sell Order:

pi:= Fml( "AIM");
Ref(Sum(pi>Ref(pi,-1),2)=2,-1) AND
(pi<Ref(pi,-1)) AND
((Ref(pi,-1)-pi)<5) AND
(pi<20)

William Golson
Equis International


Contents