Export to CSV file and import into mt4 historycenter

General discussion about the Tickstory Lite software package.
Post Reply
paoluk
Posts: 3
Joined: Fri Oct 16, 2015 4:32 pm

Export to CSV file and import into mt4 historycenter

Post by paoluk »

Hello
I just bought a tickstory license.
It's been a long time I use your free version. It's a great software.

Let's go to the point.

I have my own EA, very complex. Backtest optimization on tick data requires a lot of time.
I would use tickstory to create CSV 1second file instead Fxt+hst tick quality files.
This way, CSV 1 second should get backtest more fast, is it correct?
Or is it unuseful?

I do already saw the youtube short video on how to import csv file.
https://www.youtube.com/watch?v=6PzXNF3OlG8
But it doesn't show the total procedure, moreover my asking is quite different.

I would download tick data, create a lighter CSV 1second instead fxt+hst files,
choosing the timeframe in "export file" - data output.
output format for mt4 I use is "generic bar format comma delimited".
Then, import CSV created file through MT4 History Center.

After that, I would run backtest choosing in mt4 platform the wished timeframe (maybe m1 or h4, it depends from the setting I use for my EA)
and letting MT4 to create the wished fxt+hst file starting from CSV file I personally imported into History Center.

Summaring:
My Ea is very "slow". Creating fxt+hst files starting from tick data will create big fxt and slow data backtest.
I'd like to speed up my backtest, letting MT4 to create fxt files directly from tickdata (csv 1s instead tick, imported by me) and not from mt4 historycenter.

I'd like to use 1sec or 10sec to create a lighter CSV (for sure with interpolated data), and run a mt4 backtest
to see how much differs from mt4 99% tick quality backtest.

Is this the right way to proceed?

The comparison backtest should run between:

99% tickstory exporting in classic way fxt+hst on eurusd timeframes
and
standard backtest (w/o tickstory loader) using tickstory data, exported in csv and imported in mt4 historycenter.

I already managed to make some backtest, they seems faster.
It seems the mt4 historycenter feature does not work properly when import external data like own CSV files.
Sometimes it reads the csv, other times, it doesn't read the very same csv file.

Any suggestion?
thanks

tickstory
Posts: 4900
Joined: Sun Jan 06, 2013 12:27 am

Re: Export to CSV file and import into mt4 historycenter

Post by tickstory »

Hi Paoluk,

Thanks for the nice feedback and welcome aboard.
What you are describing is a little tricky. Firstly, in regards to exporting CSV files, check out our video on this topic here: https://www.youtube.com/watch?v=GlGoGvshKZw. It may help you with some of the basics of the file export procedure (that, and of course the manual).

Regarding the import of CSV data into MT4, I am not sure how it would handle the import of 1-second bars. In any given timeframe, I suspect MT4 would just take the last recorded bar from the given period/timeframe. The aggregation would really need to be done during the production of the FXT file. This is something that we are considering as part of the new generation of Tickstory.

If you wish to speed things up right now, one way to do this would be to either select the "remove duplicate ticks" option in Tickstory. Another suggestion would be to implement an "algorithm" in your EA that simply ignores x number of ticks or until a certain time elapses before processing the trading logic.

Hope this helps.

paoluk
Posts: 3
Joined: Fri Oct 16, 2015 4:32 pm

Re: Export to CSV file and import into mt4 historycenter

Post by paoluk »

Hi there, and thanks for your quick reply.

You video is clear.
The issue is located in "importing CSV file" into mt4 historycenter.

I do know 1sec bars could be difficult to handle in mt4.
In fact I worked also on 10sec bars and 1minute bars.
Naturally 10sec bars and 1M are each one lighter than 1sec bars, but they don't solve the issue to import CSV file in mt4.
I opened csv file with a text editor and everything is ok. I just use
date,timestamp,OHLC, excluding the volume. Very simple. (I tried also leaving the volume)

Well, sometimes it opens the csv file, other time not.
I close mt4, restart, it works; I close mt4, restart, it doesn't import csv.
I clean up mt4 history folder, and fxt inside tester/history.
then it works. Just one time.
Very unstable backtest.

Instead, using classic creation of fxt/hst files, the mt4 backtest is always the same
(I do know very well this method, as I come from my old friend Birt 8-) )

Still looking for a way to speed up the backtest, using CSV created by my own (starting from tickdata tickstory), where i can choose the depth of the bar (1s, 10s, 1M).
Backtest should give similar results as using fxt/hst files...I don't expect equal results, but using interpolation 1s or 10s should effort a quite similar result.

Actually no success. It's a challenge!!

About the tricks to speed up , naturally I already flagged "remove dup ticks".
Algorithm to ignore ticks is already present in the EA.

tickstory
Posts: 4900
Joined: Sun Jan 06, 2013 12:27 am

Re: Export to CSV file and import into mt4 historycenter

Post by tickstory »

Hi Paoluk,

It is a challenge to get fast back-tests. If you come up with any ideas aside from the aggregation please let us know in the "Suggestions" forum. We are taking note and collating all the feedback we are getting.

Thanks.

Post Reply