MetaStock™ Zone Forum & FAQ Artykuły Linki Elliott Waves EasyLanguage™ Zone

 A B C D E F G H I J K L M N O P R S T U V W Y Z #

Trend Continuation Factor by M. H. Pee
In "Trend Continuation Factor" in this issue, M.H. Pee introduces several new
indicators to help identify trend and its direction. These indicators can be easily recreated in MetaStock 6.52 or higher.

In MetaStock, select Indicator Builder from the Tools menu, click New, enter the code for the indicator, and click OK. Repeat for the remaining indicators. The code follows:

+TCF

pc:=If(ROC(C,1,\$)>0,ROC(C,1,\$),0);
nc:=If(ROC(C,1,\$)<0,Neg(ROC(C,1,\$)),0);
ncf:=If(nc=0,0,PREV+nc);
Sum(pc,35)-Sum(ncf,35)

-TCF

pc:=If(ROC(C,1,\$)>0,ROC(C,1,\$),0);
nc:=If(ROC(C,1,\$)<0,Neg(ROC(C,1,\$)),0);
pcf:=If(pc=0,0,PREV+pc);
Sum(nc,35)-Sum(pcf,35)

Position

pc:=If(ROC(C,1,\$)>0,ROC(C,1,\$),0);
nc:=If(ROC(C,1,\$)<0,Neg(ROC(C,1,\$)),0);
pcf:=If(pc=0,0,PREV+pc);
ncf:=If(nc=0,0,PREV+nc);
ptcf:=Sum(pc,35)-Sum(ncf,35);
ntcf:=Sum(nc,35)-Sum(pcf,35);
If(ptcf>0,1, If(ntcf>0,-1, PREV));

To plot the indicator, locate it in MetaStock's Indicator Quicklist, then click and drag it onto the desired chart.

--Cheryl C. Abram, Equis International, Inc.
www.equis.com

Source / From: TOP