What code ?
if(Bars(_Symbol,_Period ) < min_bars_in_history) // if total bars is less than min_bars_in_history { Print("::init:: Not enough bars in history. Will download needed bars..."); Print(TerminalInfoInteger(TERMINAL_MAXBARS)); MqlRates rates[]; ArraySetAsSeries(rates,true); // Try 5 times to allow for enough time to download all needed history int try = 5; while(try >0) { int copied=CopyRates(Symbol(),0,0,min_bars_in_history,rates); Sleep(60000); if(copied >= min_bars_in_history) { Print("::init:: Bars copied from history: ", copied); break; } else { Print("::init:: Failed to get more than ", copied, " bars from history"); if(try>1) Print("::init:: Will try again"); } try--; } int copied=CopyRates(Symbol(),0,0,min_bars_in_history,rates); if(copied < min_bars_in_history) { Print("::init:: Definitely failed to download enough bars from history"); success = false; } }<< edited by moderator to use SRC >>
Sorry for the presentation, I'm on mobile phone and have only access to the limited interface...
Jacques Louis Kreiss: unable to download more than 100 bars of history
| None of that is necessary.
|
Thank you so much for this in-depth explanation...
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
Hi,