|
Stochastic high low strange in Metatrade 4
Hello
put a Stochastic (8, 3, 1) on EUR/USD 5M and watch how the K line is sometimes on full 100.0 or min 0.0 for many bars.
This is strange!
According to the stochastic formula to get 100.0, the
(recent close - lowest low n) / (highest high n - lowest low n) > 1.0
This means that resent close must be equal or higher that highest high n.
However this is occasionally one bar, but rarely for many bars in a row.
After checking the bars very carefully maybe the recent bars high was the highest, but the recent close is bellow the bars high...?
The Stochastic.mq4 code looks correct
for(k=(i+Slowing-1);k>=i;k--)
{
sumlow+=Close[k]-LowesBuffer[k];
sumhigh+=HighesBuffer[k]-LowesBuffer[k];
}
Therefore I have no idea why the chart is showing this long periods of 100.0 or 0.0.
I appreciated very much for help to understand what is going on.
Thank you in advance
|