i am looking for a smart method to detect bar change within Indicator. Unfortunately, this seems to be an extra science (don't know what's the problem to give each bar a unique index...??)
However, my idea was to use OnCalculate time[] parameter for this.
On each call, i do a print of time[0] and this always returns the same time 1999.04.23 00:00:00 - except for latest live ticking bar.
So the timevalues for bar of the past (e.g. when attaching indicator to chart) are all the same 999.04.23 00:00:00.
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,
i am looking for a smart method to detect bar change within Indicator. Unfortunately, this seems to be an extra science (don't know what's the problem to give each bar a unique index...??)
However, my idea was to use OnCalculate time[] parameter for this.
On each call, i do a print of time[0] and this always returns the same time 1999.04.23 00:00:00 - except for latest live ticking bar.
So the timevalues for bar of the past (e.g. when attaching indicator to chart) are all the same 999.04.23 00:00:00.
Anyone know why ?
Thank you