Wrong. If your lookback is zero (you only look at Close[iBar]), your loop start at Bars. Close[Bars] does not exist. How to do your lookbacks correctly #9 — #14 & #19(2016)
William Roeder #: Wrong. If your lookback is zero (you only look at Close[iBar]), your loop start at Bars. Close[Bars] does not exist. How to do your lookbacks correctly #9 — #14 & #19(2016)
Than's. So apparently I forgot to add -1 on
return rates_total-1
This caused indicator not to update in real time. Thank's.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
How to do your lookbacks correctly #9 — #14 & #19 (2016)
Wrong. If your lookback is zero (you only look at Close[iBar]), your loop start at Bars. Close[Bars] does not exist.
How to do your lookbacks correctly #9 — #14 & #19 (2016)
Than's. So apparently I forgot to add -1 on
This caused indicator not to update in real time. Thank's.
So correct solution would be:
This way the indicator updates with every new tick. Am I right now? Thank's.