You want to know the future. IStochastic( H4, 1 ) at 0400 is the stochastic for the completed H4 0000 bar, the final value at 0359.99, 25.32. You can't get that value until 0400. Prior to then the iStochastic( H4, 0 ) bar is still forming and the value started at 12.13 (0000) and converged to 25.32 at the end of the 4 hours.
Thanks once again WHRoeder.
I thought that was the case and it was possible to retrieve, because it kinda make more sense since 2000hrs will already have its own value, then at 0000hrs a new value would have generated and the graph on the chart is straight line running through those 2 values.
But now I know, You've helped me out a whole lot!
The line from 2000 to 0000 is drawn when the 0000 candle starts. The 0000 endpoint moves as price does (per specific indicator)
Open a M1 chart, enlarge the bars to max (+ key) and add a MA with period 2, watch the line.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi all,
I have another query.
I am using the following code to retrieve the stochastic value at the 0000hrs mark:
The above code gives me a value of 12.136685
However, on my chart with the same plotted as above, it is different from the value. I get the value 25.320764 for 0000hrs using iStochastic(NULL,PERIOD_H4,fast,3,3,MODE_SMA,0,MODE_MAIN,1) at 0400hrs.
When I tried shifting +1 bar, it returned the correct previous closed bar value.
So what I want is when my EA runs at 0000hrs, I want to retrieve the stochastic for the time 0000hrs which has a value of 25.320764.
Any advice on how to go about doing this? Thanks in advance!