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 #

Moving Average - Crossovers II by Dimitris Tsokakis

Dimitris Tsokakis' article in this issue, "Moving Average Crossovers (Part II),"
introduces more formulas to analyze moving averages. The formula for the indicator and the instructions on adding it to MetaStock follow:

To enter these indicators 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.
5. Click OK to close the Indicator Editor.

Name:

the Stochastic TC graph

p1:=Mov(Stoch(5,3),3,S);
y:=Input("short MA time periods", 2, 200, 20);
z:=Input("long MA time periods", 3, 200, 30);
may:=Mov(p1,y,S);
maz:=Mov(p1,z,S);
test:=If(z-y=0,-9999,z-y);
tc:=If(test=-9999, 0,
(y*(z-1)*Mov(p1,z-1,S)-z*(y-1)*Mov(p1,y-1,S))/test);
tc;
Stoch(5,3);
p1

This indicator will prompt for the time periods of the two moving averages, but it defaults to the values suggested in Tsokakis' article.
Source / From: TOP