indicator doesn't draw when the charts are loading

 
Hi,

I have a recurring problem that happens on my MT5 indicators.
When I open a new chart and attach the indicator to the chart, the history is sometimes still loading.
That also happens when I change the time frame of the chart.
When this situation occurs the indicators don't draw anything. On a separate window indicator I only see a blank screen.
Then I have to refresh the charts, or change time frame again for the indicator to draw.

I don't know if this has anything to do by MT5 be an asynchronous platform.
I already tried to find for solutions but didn't reach any that works.

I even tried to use the script on this page but with no success:
https://www.mql5.com/en/docs/series/timeseries_access
The script always returns "Already available data in timeseries are enough"
But the indicator still doesn't load properly.
I tried to put the script running also onTick, and not just onInit, just to say what does it output.
But on all ticks it returns the same message, although I see the charts still loading new history and the indicator doesn't draw until I refresh it.

Do you also get this "problem"? How can I fix this?

Thanks.
Pedro
Documentation on MQL5: Timeseries and Indicators Access / Organizing Data Access
Documentation on MQL5: Timeseries and Indicators Access / Organizing Data Access
  • www.mql5.com
Before price data become available in the MetaTrader 5 terminal, they must be received and processed. To receive data, connection to the MetaTrader 5 trade server must be established. Data are received in the form of packed blocks of minute bars from the server upon the request of a terminal. The mechanism of server reference for data doesn't...
 
Do you really expect an answer? We can't see your broken code. There are no mind readers here and our crystal balls are cracked.
Reason: