Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1118
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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.