Experts: Get M1 OHLC data for MetaTrader 4 backtesting

 

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:

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:

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.

 
I don't see these options. I have it installed as an EA and it is on the chart but these options shown in the picture are not shown on my end. Any advice on using this?
 
Neal_Van:
I don't see these options. I have it installed as an EA and it is on the chart but these options shown in the picture are not shown on my end. Any advice on using this?


Ctrl+R to popup the tester.

 

There is a thread discussing this EA.

Use translation tool to read it.

https://www.mql5.com/zh/forum/267184

分享一个快速获取10年高质量历史数据(用于MT4的EA测试)的方法
分享一个快速获取10年高质量历史数据(用于MT4的EA测试)的方法
  • 2018.07.21
  • www.mql5.com
第一步:从MT5下载数据,构造成MT4可用的M1的K线数据(.hst)。 这需要编写一个MT5的EA,利用该EA做复盘测试的机会下载历史数据,并转换成MT4的M1数据。 第二步:在MT4中把该M1转换成其他周期,这样就可以在MT4中测试了。 这需要一个MT4的周期转换脚本...
Reason: