However it has an issue, it doesn't update the values in the data window with new candles. I have a feeling this has to do with the for loop in OnCalculate() and I tried replacing it with
int from2=MathMax(0,prev_calculated-1);
for(int i=from2;i<rates_total;i++)
but it didn't fix the problem. I'm unsure what to do to amend this and therefore I would immensely appreciate guidance and help!
Running MQL5 Program Properties - Environment State - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
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.
Hello everyone,
I found this MT5 indicator:
However it has an issue, it doesn't update the values in the data window with new candles. I have a feeling this has to do with the for loop in OnCalculate() and I tried replacing it with
but it didn't fix the problem. I'm unsure what to do to amend this and therefore I would immensely appreciate guidance and help!
Many thanks,
RappNoyd.