Backtesting/Optimization - page 17

 
Craig:
I have always found that systems that needed to be optimized to be profitable never work very well on unseen data. Systems which work well on unseen data seem to need very little optimizing. Adding another degree of freedom in response to a failing system would seem suspect based on this experence, but I could be wrong! For an example of over optimzation, witness the performance of Firebird in the MQL trading competition, started out well but crapped out after a couple of weeks (but still came third!)

The problem is, I've yet to come across a system that works well on unseen data over the long run (years) without tweaking. I don't believe a system like that exists. All systems are optimized to some degree obviously.

 

I used to think they didn't as well, but they do.

Obvously any TA based system has some degree of optimization, I guess the problem is how much tweaking should you do? I think WNW's post sums it up, the system should demonstrate profit before tweaking.

 

Hmm, I was hoping that someone had found a reason all my EAs go to zero during backtest Unfortunately not... As Craig stated, the 'close' during say, backtest in Visual Mode, will be what the price is at that instant - ie the current price. Only when the bar completes will the 'close' take it's final value. Also, in the link posted above, the guys EA is not using 'Bars' correctly so I don't think there is an issue.

 
 

Tick Data Download for Accurate Backtesting

I was wanting to know if there was a website that someone is upkeeping that is collecting Tick Data for Metatrader 4.

I understand that there is a nifty little tool that can collect it and I would like to collect and upload and download others tick data.

The Tick Data collector is found HERE:

https://www.mql5.com/en/code/8659

Seems that we can use tick data to get accurate backtests for scripts now. Anybody know of a place that is allowing downloads and uploads of tick data?

 

Tick Data Download for Accurate Backtesting

I was wanting to know if there was a website that someone is upkeeping that is collecting Tick Data for Metatrader 4.

I understand that there is a nifty little tool that can collect it and I would like to collect and upload and download others tick data.

The Tick Data collector is found HERE:

https://www.mql5.com/en/code/8659

Seems that we can use tick data to get accurate backtests for scripts now. Anybody know of a place that is allowing downloads and uploads of tick data?

 

I know of a place I just found yesterday. But here are the limitations:

-10 sec bars are the smallest increment (not tick but close enough)

-goes back only about 2004 on most pairs

-You can only download a max of 10,000 bars per download. You can download all the data you want but it will have to be broken down per 10,000 increments.

The good:

-Its free.

-and its free.

OK: you'll have to download it via csv format (Excel, ect..) To use it in metatrader youll have to take out the headers and save it under csv not xls. Then you can export it in Metatrader using the History Window.

Here's an issue that has been plaguing all of us. Corrupt data. Well if you scan through historical charts you'll notice gaps of missing data or hi and lows that are off. BUT when you pull up the actual data the missing pieces arent actually missing. Its just screwed up so it doesnt show up on the chart. The main issue I have noticed is the high and low values seem switch, making the high actually a low. Therefore the computer just skips the bar. Giving you a gap.

Another issue are holidays. I noticed on Xmas and New Years bars actually showed up when in reality NOTHING happens during those days. Why? Anyways here are some solutions to clean it up:

For the faulty hi and low I was thinking of cleaning it up on 10 sec data. Just remove the hi and low values and replace it with open and close values. Do this with ALL the bars unless anyone can develop an program that can find these errors and correct it automatically. Anyways with tick data replacing the hi and lo shouldnt mess up the data too much if its going to be used for M1 or higher. Even with tick by tick trading the hi and lo isnt varied too much from the open and close.

For the holiday ticks I propose replacing it with one price: the closing price of the closing bell. Therefore we have a more realistic market. I wonder if we backtest skipping these major holidays would we get more accurate results.

By the way the above issues I have found in all data from Metatrader to Alpari to the link below. There are ways to clean it up but it will take some work.

Here's the link:

http://www.forexrate.co.uk/forexhistoricaldata.php

Also, Oanda gives you free tick by tick if you have a $1000.00 account balance or you are in academics. But it only goes to 2 years. Youll have to pay if you want to go more than two years. The tick data they use comes from their own data so its pretty reliable.

Holyguy I hope this helps and lets collaborate on this project..

 

I know of a place I just found yesterday. But here are the limitations:

-10 sec bars are the smallest increment (not tick but close enough)

-goes back only about 2004 on most pairs

-You can only download a max of 10,000 bars per download. You can download all the data you want but it will have to be broken down per 10,000 increments.

The good:

-Its free.

-and its free.

OK: you'll have to download it via csv format (Excel, ect..) To use it in metatrader youll have to take out the headers and save it under csv not xls. Then you can export it in Metatrader using the History Window.

Here's an issue that has been plaguing all of us. Corrupt data. Well if you scan through historical charts you'll notice gaps of missing data or hi and lows that are off. BUT when you pull up the actual data the missing pieces arent actually missing. Its just screwed up so it doesnt show up on the chart. The main issue I have noticed is the high and low values seem switch, making the high actually a low. Therefore the computer just skips the bar. Giving you a gap.

Another issue are holidays. I noticed on Xmas and New Years bars actually showed up when in reality NOTHING happens during those days. Why? Anyways here are some solutions to clean it up:

For the faulty hi and low I was thinking of cleaning it up on 10 sec data. Just remove the hi and low values and replace it with open and close values. Do this with ALL the bars unless anyone can develop an program that can find these errors and correct it automatically. Anyways with tick data replacing the hi and lo shouldnt mess up the data too much if its going to be used for M1 or higher. Even with tick by tick trading the hi and lo isnt varied too much from the open and close.

For the holiday ticks I propose replacing it with one price: the closing price of the closing bell. Therefore we have a more realistic market. I wonder if we backtest skipping these major holidays would we get more accurate results.

By the way the above issues I have found in all data from Metatrader to Alpari to the link below. There are ways to clean it up but it will take some work.

Here's the link:

http://www.forexrate.co.uk/forexhistoricaldata.php

Also, Oanda gives you free tick by tick if you have a $1000.00 account balance or you are in academics. But it only goes to 2 years. Youll have to pay if you want to go more than two years. The tick data they use comes from their own data so its pretty reliable.

Holyguy I hope this helps and lets collaborate on this project..

 

collect your own data

This is an indicator helped me to study diffTime which is how long to take next qoute to arrive. diffTime which I believe is vary among data providers.

input title stands for the file name of your data set, buffer is for the size of each file.

Files:
realdata.ex4  3 kb
 

collect your own data

This is an indicator helped me to study diffTime which is how long to take next qoute to arrive. diffTime which I believe is vary among data providers.

input title stands for the file name of your data set, buffer is for the size of each file.

Files:
realdata.ex4  3 kb
Reason: