backtesting with historical data

sheridanmurray

Newbie
1 0
hi ive created a few EAs and can't seem to find decent data for indexes on mt4 backtest I've tried numerous brokers but data only goes back 2-4 months on 5min data . where can i get an add on or download of the historical data for asx,ftse and dax please .also it would be great if there was no daylight savings time change if possible ?thank you
 

hatemypips

Established member
501 36
hi ive created a few EAs and can't seem to find decent data for indexes on mt4 backtest I've tried numerous brokers but data only goes back 2-4 months on 5min data . where can i get an add on or download of the historical data for asx,ftse and dax please .also it would be great if there was no daylight savings time change if possible ?thank you
What length of the data you need and what frequency? Usually the quality of the data I get from fx broker is decent enough to verify my EA performance.
 

J_C_Anderson

Active member
128 22
Some backtesting software may offer the data you need. As far as I know, Forex Tester allows to test using data since 2016 or even 2015. They give possibility to download the exact data pack you need. For some instruments even tick data is available, but I`m not sure about the indexes, so it would be better to ask them about it.
 

hatemypips

Established member
501 36
https://tickstory.com/

I run all my backtests with 10 years of tickdata. (5 years for indices - there are gaps in the data pre Jun 2013)
I wonder how long does it takes to backtest through 10 years on tick data... Using 5 minutes data for several years, duration of backtesting is usually several hours. Btw, It's done in MT4
 

Windlesham1

Well-known member
427 25
If backtesting worked then there would be nobody left to trade as one trading house would have the edge and destroy all the others. At best it's a vague guide, at worst it creates a delusion, false expectations, and a bias. Very few people win intra day trading
 

Hoggums

Senior member
2,176 877
Time-wise It depends on how efficient you make your EA - don't run your whole algorithm on each tick if you don't have to - I'm, sure you can speed it up if you think about what it needs to do. If you are using indicators then you probably only need to look at them when the Time[0] value has changed from the last tick. The problem with backtesting with less than 2 years of data is that you end up over-optimising for the period you are testing against. The market changes behaviour constantly and what works one year doesn't work the next (even using 1/5 min data). in order to have any confidence in your EA you need to test it on as much data as possible.

Also you need to review the results - it's easy to optimise for profit and find you've got an EA that makes no money for the first 80% of the time and then makes all the profit in the last few months - because it's over optimised for that period. Then when you go live you find it doesn't do very well. You are looking for a equity curve that is rising constantly.

Yes the analyses can take a long time (actually I'm a computer programmer by trade so I've written my own strategy tester which runs more than 2x the speed of the metatrader version and can be paused/resumed at any time and uses custom optimisation parameters - but it's not something you could use)

You can save time by installing metatrader multiple times (use custom installation and install it to a local directory e.g. c:\Metatrader\MT1 c:\Metatrader\MT2 etc) then run each installation separately (I suggest you use portable mode so it's easy to find the MQL4 directory). Divide your parameters up between each optimisation so installation 1 runs params 1-4, installation 2 runs 5-9 etc... so you can use up all of the CPU on your machine. Cut and paste the results from each into a spreadsheet then sort it by whichever parameter you want when they are all finished.

Also if you have a lot of parameters I don't recommend using the genetic algo - it won't find the best parameters.

You can also get all the MT4 installations to share the same MQL4 directory and the tester history files so you only need to compile the EAs once and export the data once and they'll be available in all MT4 installations by use of the mklink /D command - if you need instructions let me know.

Hope this helps.
 

Similar threads


AdBlock Detected

We get it, advertisements are annoying!

But it's thanks to our sponsors that access to Trade2Win remains free for all. By viewing our ads you help us pay our bills, so please support the site and disable your AdBlocker.

I've Disabled AdBlock