ChartSetSymbolPeriod(0,NULL,0);
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello,
I have an Indicator which calls an another CPU heavy custom indicator (on 7 different currencies).
So, in the Init function I create the 7 handles and within OnCalculate I use CopyBuffer to get the data.
Sometimes this indicator starts normally but sometimes it seems the buffers are not ready when the first OnCalculate call is made.
I can use BarsCalculated like:
But on the weekend there won't be second OnCalculate call. How can I trigger the OnCalculate on the weekend once the Buffers are ready?
ps: I am not 100% sure that my assumption is correct and by design the OnCalculate gets called only when all data is ready. This would mean that I have a different issue with my indicator.
ps.ps. I forgot to mention. This indicator works properly in MT4 environment. In mt5 sometimes it does not load right.