Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

HistoryLoader - MetaTrader 5 Library | MT5 EA Download - MetaTrader 5 Resources

author EAcpu | 5 reads | 0 comments |

https://www.mql5.com/en/docs/series/timeseries_access

This functional module allows uploading historical data according to the request of multi-currency EA trading.

If only one chart is opened in the client terminal with a functioning Multi-Currency Expert Advisor, the data of this chart will be available only for this Expert Advisor. This module aims to solve this problem.

Place the history loader .mqh file into the terminal_data_folder\MQL5\include . Then the command for including this file into the Expert Advisor's code must be added at the global level:

 //+------------------------------------------------------------------+
//|Upload history function description |
//+------------------------------------------------------------------+
#include

Now, the necessary LoadHistory() function call must be made before the Expert Advisor code : OnTick() function body:


Attachment download

📎 historyloader.mqh (3.32 KB)

Source: MQL5 #449

Verification code Refresh