Vladimir Karputov: And you print the two elements of the time array with index 0 and index rates_total-1
I don't get it anymore. I sat for a long time with these fucking rates_total and prev_calculated, I just spat and wrote it straight. I ran debugging, and the values are written to the buffers correctly!
But apparently they're written to the very beginning of the graph, yeah.
You just need to understand and remember that mql5 indexing of bars compared to mql4 is exactly backwards. The leftmost bar has index 0 and the current rates_total-1.
Consequently, bar 100 as in mql4 will have index rates_total-1-100.
Now carefully compare the index and the time. You should see and understand that in the indicators, the rightmost bar on the chart corresponds to index #0 in the price arrays.
Can you tell me how to make a pause of 1 millisecond? Sleep(1) is not an option because it pauses from 0 to 50 milliseconds or so. When called with parameter 1.
Why is the candle output not working?
And you print the two elements of the time array with index 0 and index rates_total-1
I don't get it anymore. I sat for a long time with these fucking rates_total and prev_calculated, I just spat and wrote it straight. I ran debugging, and the values are written to the buffers correctly!
But apparently they're written to the very beginning of the graph, yeah.
wrote index rates_total - i, also nothing
Did you definitely print out the two indexes as I advised? Yes or no?
Why does the candlestick output not work?
You just need to understand and remember that mql5 indexing of bars compared to mql4 is exactly backwards. The leftmost bar has index 0 and the current rates_total-1.
Consequently, bar 100 as in mql4 will have index rates_total-1-100.
Now carefully compare the index and the time. You should see and understand that in the indicators, the rightmost bar on the chart corresponds to index #0 in the price arrays.