Import history data from MetaTrader 4

Author: Kornel Mazur

December 12th, 2018

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)

Step 1: Export data from Metatrader

Open your Metatrader and go to Tools -> History Center.

There, open the currency you want to export (for example GBPUSD) and double click on 1 Minute (M1) so that it is refreshed on the right side of the screen.
Then just click on the Export button and choose your destination file.

StrategyQuant supports import of only 1 Minute data, it will compute the higher timeframes automatically.

Now we have the data ready to be imported to StrategyQuant.

Step 2: Create a new symbol in StrategyQuant

We can import data to already existing symbol, but that will overwrite its data, so it is better to define a new symbol.
Start StrategyQuant, go to Data manager screen, File import and click on the button “Add symbol”.

In the appeared window you can type in Data symbol name and choose predefined instrument setting or create the new one clicking on „Add new symbol“ option.
If you decide to add new instrument then complete the setting of the new symbol


Name of the instrument

Data type

The type of imported data.

Pip/Tick size

is the value of pip. It means what number is 1 pip. is usually 0.0001. For JPY based pairs 1 pip is 0.01.

Default spread

Default spread of the instrument in pips

Point value in $

is a value how much is one pip worth in money, it is usually 10 for all the currencies.

Pip/Tick Step

is a value by how much one pip can move. Virtually all brokers now use 5-digit data, so the value will be 0.00001 (or 0.001 for JPY based pairs).

Point value in $

is a value how much is one pip worth in money, it is usually 10 for all the currencies.

Default commission model

Define commission model of the instrument.

Click Save and the new symbol will be created. The symbol doesn’t have any data yet, but we are going to import them in the next step.

Step 3: Import data to StrategyQuant

Now select your new row with the symbol and click on Import file … button on the top. This will open the import dialog.

Import dialog is configurable; it allows importing data from various file formats. Since we use data from MetaTrader, choose MetaTrader4 as a Predefined File Format.

Choose the data file and click on Start Import button. This will start the import process. It could take few minutes, depending on speed of your computer and data size.

When the import is finished it will display information window and asks you to close the dialog.
Now we have the new data successfully imported into StrategyQuant and we can use them for tests or new strategies generation.

< Previous: Script Examples (Windows)Next: Test strategy in MetaTrader 4 with tick precision >

Inline Feedbacks
View all comments