[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Stochastic Indicator



PureBytes Links

Trading Reference Links

My first impression of amibroker was I thought it might do what I 
wanted. 

I use the Stochastic, RSI, and MACD indicators (in order of 
importance) in my personal stock system. I immediately noticed the 
Amibroker Stochastic Slow indicator is not quite the same as other 
programs, or web based chart programs, such as www.stockcharts.com, 
which is where I have been doing most of my work. I need confidence 
in my Stochastic, so I tried to figure out why there was a difference.

It seems the built in function stochk and stochd include a smoothing 
function. I'm not sure what function it uses, but it is very close 
but not exactly the same as a 3 day EMA.

Anyway, as stochastic is my primary indicator, I decided the only 
thing to do (if I was to continue using Amibroker) was try to make my 
own stochastic indicator, and I succeeded.

This is the basic stochastic, or the %k line on a fast stochastic (14 
is the period). This exactly matches other programs fast stochastic 
indicators:
graph0=100*((close-llv(low, 14))/(hhv(high,14)-llv(low,14)));

Smoothing this line using MA (not ema) produces the %k on a slow 
stochastic (3 is the smooth degree):
graph0=ma(100*((close-llv(low, 14))/(hhv(high,14)-llv(low,14))),3);

I was at first dissapointed at the trouble I had to go through to fix 
the stochastic. However the trouble has caused me to learn how 
configurable Amibroker is and how powerful the AFL language is.

Thus I'm looking forward to joining the Amibroker family and I now 
feel more confident than ever that my indicators are indicating what 
they should :-)