Within an EA you can use while( !IsStopped() && not_here(..) ) sleep(500).
As sleep does not work within an EA you just can do directly within OnCalculate(){ .. if( not_here(..) ) return(0);..
This way you 'wait' until you have all your datas and you start with the first tick hereafter.
Forum on trading, automated trading systems and testing trading strategies
Alain Verleyen, 2017.03.07 08:16
Why people who are selling products on the Market want to get free help on the forum ?
Within an EA you can use while( not_here(..) ) sleep(500).
As sleep does not work within an indicator you just can do directly within OnCalculate(){ .. if( not_here(..) ) return(0);..
This way you 'wait' until you have all your datas and you start with the first tick hereafter.
Thanks Carl,
Greatly appreciated.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Per this article on MQL4 https://www.mql5.com/en/articles/2555
Errors that occur when working with symbols which have insufficient quote history
If an expert or indicator is launched on a chart with insufficient history, then there are two possibilities: