Download MetaTrader 5

Experts: Get M1 OHLC data for MetaTrader 4 backtesting

To add comments, please log in or register
Automated-Trading
Admin
111021
Automated-Trading  

Get M1 OHLC data for MetaTrader 4 backtesting:

Usually most brokers do not provide M1 data over 3 months in MetaTrader 4, but they provide M1 data over 3 years in MetaTrader 5. So we can use this tool to obtain the M1 data in MetaTrader 5 tester and save the data into .hst file for MetaTrader 4 backtesting.


How to use it?

  • Test EA in MetaTrader 5, select M1 time frame and 1 minute OHLC.
  • After testing finish, the .hst file is saved in tester folder, copy it to your MetaTrader 4 history folder.
  • Use period converter script to convert M1 .hst to other timeframes. https://www.mql5.com/en/code/19839.

EA Setting

Author: Ziheng Zhuang

Aimak
165
Aimak  

I tried this EA but I cannot find the resulted HST. Not in tester folder nor in MQL5\Files

Also, searching for files with "hst" returns no results.

Ziheng Zhuang
9195
Ziheng Zhuang  
Aimak:

I tried this EA but I cannot find the resulted HST. Not in tester folder nor in MQL5\Files

Also, searching for files with "hst" returns no results.


After testing finish, click "Journal" tag (see the above screenshot), right click, open tester folder:

The  "EURGBP1.hst" file is in  Yourdatafolder\Tester\Agent-127.0.0.1-3000\MQL5\Files

Aimak
165
Aimak  
Ziheng Zhuang:


After testing finish, click "Journal" tag (see the above screenshot), right click, open tester folder:

The  "EURGBP1.hst" file is in  Yourdatafolder\Tester\Agent-127.0.0.1-3000\MQL5\Files

Thanks for your reply.

I'm a bit confused. In my Tester folder I can only see Cache and Log folders.

By the way. I do not have installed the MT5 Agent service. Does this matter?

Ziheng Zhuang
9195
Ziheng Zhuang  
Aimak:

Thanks for your reply.

I'm a bit confused. In my Tester folder I can only see Cache and Log folders.

By the way. I do not have installed the MT5 Agent service. Does this matter?


Sorry, I am not sure, but I think it has nothing with MT5 Agent service.

why you do not have the Agent-127.0.0.1-3000 folder, you may ask desk service for help.

Aimak
165
Aimak  
Ziheng Zhuang:


Sorry, I am not sure, but I think it has nothing with MT5 Agent service.

why you do not have the Agent-127.0.0.1-3000 folder, you may ask desk service for help.

I just found it. I did not know about the existence of these folders.

So the complete route to the files is:

C:\Users\[windows_user_name]\AppData\Roaming\MetaQuotes\Tester\[MT5_ID-code]\Agent-127.0.0.1-3000\MQL5\Files

Thanks

To add comments, please log in or register