MQL5 Indicator: weird behavior

 

Hi all,

I coded a custom indicator who needs tick data to be rendered, so it starts drawing from the current bar onwards.

The weird thing is that from time to time the values of the indicator for the previous rendered bars disappear, like if the indicator was restarted.

Any hints?

 
Alberto: I coded a custom indicator who needs tick data to be rendered, so it starts drawing from the current bar onwards.The weird thing is that from time to time the values of the indicator for the previous rendered bars disappear, like if the indicator was restarted. Any hints?

When the bar count limit for the chart is reached, then it resets because old bar data is discarded and the chart indicators have to be recalculated based on the current bar data.

This can also happen when there is a server re-connection!