
The monthly chart above shows my adaptation of the stochastic plotted on the price chart.
The code I am using is as follows;
Sp = Param("stoch Period", 2, 1, 55, 1);
Lv = MA(LLV(L,Sp), 3); Hv = MA(HHV(H,Sp), 3);
midpoint = Lv+(Hv-Lv)/2;
I am not saying that it is perfect, but it gives the general idea.
The stochastic uses some averaging for the actual indicator. On the price chart the close price can go above and below the 0% / 100% lines because it isn't averaged. The price becomes the indicator!
2 comments:
Do you have Metastock code too?
No I don't.
Looking at the AB code the main difference is that in MS MA is MOV and the type of moving average (in this case Simple) needs to be specified.
If you write the code I can check it for you here.
Stevo
Post a Comment