Function to check and load history:
This is slightly modified CheckLoadHistory function from MetaQuotes.
Title:
#include <komposter\String.mqh>
Usage:
void OnTick() { Β Β static bool first = true; Β Β if ( first && !CheckLoadHistory( _Symbol, _Period, BarsToAnalyze ) ) Β Β Β Β Β Β return; Β Β else Β Β Β Β Β Β first = false; Β Β // add your code here }
The history of changes:
2013.02.18:
- [+] Added the maximum time limit of downloading historical data from the server (default value is 30 seconds).