ASCII DATA

 
Hi MQL4 and fellow traders,

I am about to purchase Tick data that I wish to import into MT4 for back testing.

The supplier I wish to purchase from is offering the data in ASCII data format which they feel is compatable with MT4.

I have ensured that the timestamp of the data will be the same as that used by the broker I use (makes life that little bit easier) so I would simply like to know please:

1. Is ASCII data format compatable

2. What is the process to import effectively when using this format

Many thanks in advance,
West
 
 

Thank you Stringo,

I have arranged to purchase the tick data delivered as a CSV file in the format as specified.

I shall place FXTHeader.mqh in the include directory as detailed

I assume I will then place simple_csv2fxt.mq4 in the experts directory?

What then is the process to convert the data so it can be used for back testing with Strategy Tester.

Again thank you for your assistance in advance,

West
 

This is script for once processing, not expert and must be placed into expertsscripts directory. Make sure that your structure is the same as described in this script. Otherwise change script in accordance with your structure.

Script launched once. Then fxt-file must be moved to testerhistory directory. Uncheck "Recalculate" button. And read article 'Testing of Expert Advisors in the MetaTrader 4 Client Terminal: An Outward Glance'

 
Thank you for your reply Stringo - fully understood.

In the example of data format on 'simple csv2fxt' the example format you give has two types of separator: "space" and ";" as follows "YYYY.MM.DD HH:MI:SS;1.2345"
Which format should be used:

Format 1: "YYYY.MM.DD HH:MI:SS 1.2345"
or
Format 2: "YYYY.MM.DD;HH:MI:SS;1.2345"

Also if I may ask, how does the script work?

1. FXheader is placed include directory

2. The Simple CSV2fst is placed in the script directory

3. The tick.csv file is placed on the desktop - I am assuming in this format YYYY. MM.DD;HH:MI:SS;1.2345 as the delimiter in the script is set to ";"

4. I then presume I click on load and browse for the tick.csv file - what then, do I have to have a chart open, can I be offline - please assist

The explanation in regard to using Strategy Tester is very informative, and fully understood however my problem is simply getting this tick data into the system to test.

Many thanks and kind regards
West
 

No space delimiter. "YYYY.MM.DD HH:MI:SS" is full datetime string. Pay attention that datetime string contains points, colons and space between date and time, and this symbols cannot be considered as delimiters! Structure of the tick record contains 2 fields - datetime and price, delimited by semicolon(;)

3. tick.csv must be placed in the experts\files directory
4. Drop csv2fxt script on the chart. Chart symbol must be the same which ticks are processed (for example EURUSD). Chart timeframe can be any of standards (M1, M5, M15, M30, H1, H4). Appropriate fxt-file will be produced
5. Move your fxt-file into tester\history directory

6. Open tester window. Select symbol (EURUSD) and timeframe (same as chart timefrime on wich fxt-file was produced). Select EA
7. Uncheck "Recalculate" button!
8. Start tester

 
Great service Stringo

The data provider has just asked me:
"No space delimiter. "YYYY.MM.DD HH:MI:SS" is full datetime string - What is "MI" in the time ?"
.........

The obvious answer is Minutes but I thought I best check, as to me it is obvious, but perhaps this is a format they have not used before, or perhaps I am missing something!

Thanks West
 
MI - minutes (as distinct from MM - month)
Reason: