Backtesting a H1 EA

General discussion about the Tickstory Lite software package.
Post Reply
djroj2001
Posts: 13
Joined: Sat May 20, 2017 10:25 pm

Backtesting a H1 EA

Post by djroj2001 »

Hi,

I have an expert that I want to backtest. This works on H1 timeframe (is applied to a H1 chart in MT4).

Can I backtest this Tickstory data by downloading only H1 timeframe data, and selecting H1 in MT4 backtest timeframe? This will obviously save a lot of download time and space.

In the above scenario, do I still select "every tick" option in MT4 backtest? Also, will this still result in a high modelling quality?

Thanks

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

Re: Backtesting a H1 EA

Post by tickstory »

Hi Djroj2001,

Yes you can select H1 or whatever time-frame of your choice in the MT4 strategy tester. This particular setting essentially determines the time-frame your EA is tested under and not the modelling quality.

With modelling quality, if you would like the most accurate results you will need to select the "Tick" modelling option in the Strategy Tester. This will ensure each tick is played into your strategy and obviously takes some time to complete. It will however, give you a 99.9% modelling result. Alternatively, you can use the other modelling methods such as "OHLC" or "Open prices" which will only give 4 or 1 price movement(s) respectively per bar for the time-frame you have selected. In the case of an hourly time-frame and "OHLC" modelling, for example, you will get 4 price "ticks" per hourly bar. The results will not be as accurate, however it may be sufficient for testing your EA depending on how it works (if it is a long-term strategy, then the results might still be useful). With these methods however, you will not get 99% modelling quality on your report since it does not use tick data.

Hope this answers your question.

djroj2001
Posts: 13
Joined: Sat May 20, 2017 10:25 pm

Re: Backtesting a H1 EA

Post by djroj2001 »

tickstory wrote:Hi Djroj2001,

Yes you can select H1 or whatever time-frame of your choice in the MT4 strategy tester. This particular setting essentially determines the time-frame your EA is tested under and not the modelling quality.

With modelling quality, if you would like the most accurate results you will need to select the "Tick" modelling option in the Strategy Tester. This will ensure each tick is played into your strategy and obviously takes some time to complete. It will however, give you a 99.9% modelling result. Alternatively, you can use the other modelling methods such as "OHLC" or "Open prices" which will only give 4 or 1 price movement(s) respectively per bar for the time-frame you have selected. In the case of an hourly time-frame and "OHLC" modelling, for example, you will get 4 price "ticks" per hourly bar. The results will not be as accurate, however it may be sufficient for testing your EA depending on how it works (if it is a long-term strategy, then the results might still be useful). With these methods however, you will not get 99% modelling quality on your report since it does not use tick data.

Hope this answers your question.
Thanks, understood. Another clarification: since the FXT files are big, does selecting to export only 1 timeframe stop Tickstory/MT4 from creating the duplicate FXT files for all the other time frames?

Secondly, I notice that when I delete the HST files (in order to re-download data from Tickstory), it still shows the last downloaded date range in the main Tickstory screen. Do I need to also delete the FXT files in order to reset this to be blank? Is it better to delete FXT and HST files each time I decide to download a different range of data for a set, or will Tickstory be able to just update the FXT and HST files with new data?

Thanks

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

Re: Backtesting a H1 EA

Post by tickstory »

Another clarification: since the FXT files are big, does selecting to export only 1 timeframe stop Tickstory/MT4 from creating the duplicate FXT files for all the other time frames?
That's correct. Select only the FXT time-frames for which you wish to test with. For example, if you are only testing in an hourly time-frame, select only the H1 time-frame when exporting to MT4 from Tickstory.
Secondly, I notice that when I delete the HST files (in order to re-download data from Tickstory), it still shows the last downloaded date range in the main Tickstory screen. Do I need to also delete the FXT files in order to reset this to be blank? Is it better to delete FXT and HST files each time I decide to download a different range of data for a set, or will Tickstory be able to just update the FXT and HST files with new data?
The main Tickstory screen shows the tick data that has been downloaded from the internet. This is stored in the "Dukascopy store folder". From this information, HST and FXT files are produced which contain the Metatrader 4 charts and tick data, respectively. When you re-export a new date range to Metatrader, the HST and FXT files are automatically re-written so there is typically no need to manually delete any of these files. In your case, since you are no longer wanting to test with certain time-frames, you can free space by deleting the FXT time-frame files you no longer use.

Note that there is more information on the topic of HST and FXT files in the manual (press F1 in the application) which describes the Metatrader databases in more detail.

Hope this helps.

djroj2001
Posts: 13
Joined: Sat May 20, 2017 10:25 pm

Re: Backtesting a H1 EA

Post by djroj2001 »

very clear, thanks.

One other question. I have a commerical EA that is linked to my account name for live use and backtesting. One side effect of this is that I need to be logged into a live account on my testing environment, so the EA is able to validate my account name. I read this can cause an issue with broker data overwriting tickstory price data files. Normally I do test in an offline MT4 environment, this issue is specific to this EA.

Is there any way to make sure that whatever currency pair I am testing is not overwritten by broker price data? I already make sure a chart is not open on the pair I am testing. However the pair needs to be in the market window in order to be selectable in the strategy tester.

Perhaps does making the FXT and HST files read only mean that MT4 would not be able to overwrite any of the price data anyway?

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

Re: Backtesting a H1 EA

Post by tickstory »

Hi Djroj2001,

We generally advise users to keep their terminals connected as your mileage may vary as to whether MT4 decides to back-fill the history charts.
The overwriting/back-fill of chart data (i.e. HST data) is primarily a concern in your test environment where you want the chart (HST) and tick data (FXT) to match when you are doing your back-tests. If your EA can still validate your username while MT4 is offline, then this is the recommended configuration.

In the case of your live environment, it might be preferable to be using your broker's chart history rather than Tickstory's since it represents their "source of truth" that you will be placing your trades with.

Thanks.

Post Reply