The Documentation states that
So my question is this .
If from an indicator you request the ma of another timeframe (which always returns -1 on the first call) ,does that mean that the requested data will be allocated into the referenced array or will these values remain -1 and a subsequent call must be done to get the values ? [or else how to know the values requested are ready]
Use BarsCalculated -
Return Value
Returns the amount of calculated data in the indicator buffer or -1 in the case of error (data not calculated yet)
![Documentation on MQL5: Timeseries and Indicators Access / BarsCalculated Documentation on MQL5: Timeseries and Indicators Access / BarsCalculated](https://c.mql5.com/36/41/documentation-on-mql5-timeseries__3.png)
- www.mql5.com
Thanks ,i made 2 indicators to study the sequence of data . it helps
It prints data in the experts tab , im attaching them if someone wants to test themselves.
Call the Master Indicator which in turn calls 3 instances of the Slave Indicator :
- one in the same symbol and chart tf
- one in the same symbol and a higher tf
- and one in a random symbol on a higher tf
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
The Documentation states that
So my question is this .
If from an indicator you request the ma of another timeframe (which always returns -1 on the first call) ,does that mean that the requested data will be allocated into the referenced array or will these values remain -1 and a subsequent call must be done to get the values ? [or else how to know the values requested are ready]