Reading from file

 

Hello everyone.

I am trying to write a piece of code to add to my EA that will allow a choice of getting/redeaing tick data from CSV files (so I can test with real market data, but not with generated by the tester). I think I need to open a file in the init function, but read data (date, time, prices) from file per row in the start function.

Do you think that this can actually work? I am just encountering some strange errors and thinking that perhaps, the start function requires ticks to operate which I do not have...

I appreciate your help.

R

 

Why re-invent the wheel ?

http://eareview.net/tick-data

By the way, start() is called for each tick . . . no ticks and start won't be called . .

 

Yes, I have seen this article. My EA works on ticks (the logic is per tick, not bar), but this conversion method does not allow converting to ticks, but to bars...Am I right?

 
resin17:

Am I right?

Nope. The Strategy Tester works on ticks but it synthesises them from the M1 data (H & L and volume), the EA_Review method uses real tick data, there is no synthesis.
 

I just want to be completely sure -I need to convert the tick data (not bar data) downloaded from Dukascopy into tick data that MT4 will understand. What I have read in the instructions is that the data can be converted into the bar data as there is a step in the description which requires dropping a converter EA onto a chart with the required bars (1M, 5M, etc). Obviosuly, there is no tick chart...

Sorry to troubkle you, but, I hope you know the answer to this..

 
resin17:

I just want to be completely sure -I need to convert the tick data (not bar data) downloaded from Dukascopy into tick data that MT4 will understand. What I have read in the instructions is that the data can be converted into the bar data as there is a step in the description which requires dropping a converter EA onto a chart with the required bars (1M, 5M, etc). Obviosuly, there is no tick chart...

When I convert the CSV file produced by the Dukascopy Jforex Java software using the MT4 scripts I get history files, .hst, for all TimeFrames, I also get a .fxt file that contains the tick data that the Strategy Tester uses . . the .hst files are needed if you want to run the Strategy Tester in visual mode . .
 
oh, excellent. thank you. I will look further into this and try conversion myself. do you use a current MT4 version (above 400, I think) and patch it b4/during conversion?
 
MT4 around version 400 should be fine, keep away from 405/6 there is an issue with the patch on those versions . . . it's all the the comments at the bottom of the page.
Reason: