-
Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum 2019.05.06
Messages Editor -
int uncalculatedBar = rates_total - prev_calculated; for (int i = 0;1<uncalculatedBar;i++)
After the first run prev_calculated will be equal to rates_total or on a new bar rates_total-1. UncalculatedBar will be at most one, so your loop does nothing. Your look back is 20+3 (iMA)
How to do your lookbacks correctly #9 - #14 & #19
-
Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum 2019.05.06
Messages Editor - After the first run prev_calculated will be equal to rates_total or on a new bar rates_total-1. UncalculatedBar will be at most one, so your loop does nothing. Your look back is 20+3 (iMA)
How to do your lookbacks correctly #9 - #14 & #19
Thanks. I used the code button as attached the code.
So there seems to be a problem with the loop/loopback. So what do I need to do to actually fix it?
Hi Kajpatel,
I recently calculated Donchian channel, and facing the same issue.
Have you found any resolution to this?
- 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 am very new to MT and coding. I have looked at all the threads on this topic but just dont understand the solutions/fixes. Can someone pls help. Thanks in advance.