It is not a secret that the price feeds of different brokers are different and sometimes quite substantially. You can proof this easily by yourself, by examining two MT4 strategy tester’s reports obtained with the same robot but with different price quotes. What to do with it? From one point of view, a good robot should trade equally well on different (all) price feeds. This well might be but… trading of the same robot on various brokers is different nevertheless.
The reasonable idea is to get the exact price quotes from your broker and test your advisor on them. That is where problems start. We would need M1 timeframe quotes, in order to get modeling quality of 90% in the strategy tester. Higher timeframes, in fact, are not needed, since they can be easily produced from M1. So let us get M1 quotes from our broker.
We will soon see that it is not so easy. Let’s download the new terminal MT4 from the broker Roboforex. Open EURUSD chart with M1 timeframe and press the HOME button, thereby downloading quotes from the broker (you may also use this script if your hand starts to fall off). After some time, M1 chart stops to respond to the Home key, which means that the broker does not allow you to get any more quotes. Check the date – we have downloaded about two months of M1 quotes.
Have a look at the picture: M1 quotes end at 09/12/2014, today is 02/13/2015, it counts two months in total. But two months are not nearly enough to test a robot!
What now? Somebody will say, “Easy! Press F2, open the History Center, then press the download button and in a minute you will get all M1 quotes since 1997!” Yes, of course. Only those quotes are not from our broker but from the Metaquotes server! Firstly, they are from a different price feed, and secondly, their quality is rather low. The only one exception is the Alpari broker; it provides quotes from their own server through the History Center in MT4. The Alpari quotes are not perfect, but still better than those from Metaquotes.
However, we digress from the main topic. We want to get the quotes exactly from our broker. What are our options? The first one is to wait for a couple of years until the MT4 terminal will accumulate the necessary number of quotes. Do you think this is a joke? No, some traders really do this.
But we have a better option. Some clever guys noticed that the MT5 terminal for some reason receives much more quotes from the broker than MT4. Let us check it out. Download the MT5 terminal from Roboforex, install it and open a demo account. Start the terminal, go to Tools – Options – Charts and set the maximum number of bars, which equals 1000000.
Then open EURUSD chart on M1 timeframe and start downloading quotes by pressing the PgUp button. You have to press the button for quite some time but the result is there. Look,
We downloaded quotes right up to 30.05.2012 – i.e., for 2 years and 8 months! Comparing to 2 months in MT4, this is great progress.
Now we need to copy the quotes from MT5 to MT4. In MT5 terminal, install the supplied script YURAZ_Create_History_CSV_From_MT5_for_MT4. It is very easy – open menu, then Data Directory, and copy script to folder MQL5 \ Scripts.
Restart the MT5 terminal. In the Explorer, we can see that the script has been successfully installed. Drag the script to the EURUSD (M1) chart with the quotes that we just have successfully uploaded and wait for script answer.
Go to the folder where script has saved the file of quotes. Open File – Open Data Directory – MQL5 – Files. Copy the generated file of quotes (* .csv) into a separate folder and close the terminal MT5.
Now we are ready to copy the data to the MT4 terminal. Run the MT4 terminal. Turn off connection with the broker to prevent the automatic loading up of new quotes. For this purpose you can turn off the Internet, or check up the “Enable proxy server” option in the settings of the MT4 terminal (Control + O – Server – Enable proxy server) and reboot the terminal.
Now we need to delete the old EURUSD quotes. This can be done in two ways: either open the History Center (F2) and delete the EURUSD quotes in all timeframes, or, easier, open the history folder in your terminal (File – Open Data Directory – History – the name of the trading server) and delete all EURUSD*.hst history files.
Now, if we restart the terminal and open any EURUSD chart, we will see an empty chart, as there are no quotes and no connection with the broker either.
Next step is the import of the stored quotes. Press the F2 to open the History Center. Find the currency pair EURUSD (M1). Click Import button and in the File field select the file with the stored quotes.
Click OK and quotes are loaded. You can open a chart EURUSD (M1) to check that terminal recognizes them.
After this, we need quotes of the higher timeframes. The easiest way to get them is through PeriodConverter, the standard MT4 script. Choose PeriodConverter in the list of scripts and drag it to the chart EURUSD (M1).
The only parameter in the script is the Period Multiplier. First, we want to get M5 from M1, so we need to run the script with the parameter 5. The script must be stopped manually – wait a couple of seconds, then click the right mouse button and select Remove Script. Then generate the other timeframes – drag the script on EURUSD (M1) with parameters (15, 30, 60 and 240). Timeframes above H4 usually are not necessary, but if you want, you can also generate them.
All done! Restore connections with a broker, restart the terminal and test your advisor on 2 years and 8 months time period with the quotes that were taken exactly from our broker!
Wish you successful tests and profits!