Returned rates_total from previous round of OnCalculate becomes prev_calculated in current round. They mostly equal except when a new bar appears (rates_total=prev_calculated+1) or chart is refreshed with a new history (prev_calculate=0 set by terminal).
Thank you!
I have more question .
I think if D1 is 12858, H4 is 12858*3 (38547). But H4 is 38127. Why...?
Thank you kypa !
That's probably all the history available. Pre-holiday sessions may end earlier (less H4 bars) and still be recorded as daily bars.
In MT5 history is recorded in 1 minute bars, all other timeframes are recalculated from it. If there is no tick through the minute no bar is made.
You can limit the bars from tools/settings/charts.
That's probably all the history available. Pre-holiday sessions may end earlier (less H4 bars) and still be recorded as daily bars.
In MT5 history is recorded in 1 minute bars, all other timeframes are recalculated from it. If there is no tick through the minute no bar is made.
You can limit the bars from tools/settings/charts.
Ah! I understand ! Thank you very much kypa!

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello, I'm beginner.
I have some curious.
I run indicator.
I thought rates_total / prev_calculated similar candle.
but now I don't think it might be.
the reasone why
M1 total is 66617,
M5 total is 65002,
M15 total is 65000
M30 total is 65001
H1 total is 65004
H4 total is 38127
D1 total is 12858
W1 total is 2422
MN total is 570.
I feel that is not relevant.
What is mean rates_total and prev_calculated?
Thank you in advance