Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 5 Libraries | CheckHistory - Check and load history function

MetaTrader Experts, Indicators, Scripts and Libraries

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).
1251

Best MetaTrader Indicators + Profitable Expert Advisors