Corrupt history data?

 

I've been running some backtests and have been running into an issue that makes me question the validity of a portion of my history data (and also my trading strategy). Im observing a significant discrepancy in the way any given EA performs with respect to the time interval tested. You're probably saying "well, duh!! ..most strategies stagger under certain market conditions" ..this is not what I mean.. The discrepancy always occurs between an area of data closest to the oldest data of a given timeframe, and more recent data.

For instance, the furthest back my 15 minute data goes is ~Jan 2008.. so if I start my backtest within a few days of that time (or especially with only ~100 or so bars on the chart) I get really poor results out of the gate but then, all of a sudden, I get a completely different behavior and a very smooth profit curve all the way to the present. Seems like just the true outcome of the backtest, but if I try the same strategy on the 5 minute chart starting as far back as it goes (~Feb 2009 in my MT), I observe the same thing.. poor results at first, good after a certain point, then continuing in a smooth profit curve for the remainder of the backtest. Same pattern is repeated for all timeframes (M1, H1, H4, even D1) & strategies ..if I start the test towards the beginning of the data, I get erratic (usually poor) results then after about 10% of the backtest is complete, the results become very predictable.. the strategy is either a drainer or a smooth profit curve.

I have also considered that this is just an illusion since, at first, youre looking at only a tiny fraction of the entire backtest curve, so it looks erratic but what Im observing is that the beginning portion of the curve looks sharply different then the rest of the curve AFTER the entire backtest is complete.. almost as if the two were spliced together.

So that raises the question, is there an issue with older data in metatrader? ..maybe there are gaps/inaccurate data.. Ive inspected it visually but that so subjective and I cant really tell. I dont have alpari data or anything, just regular data from from my broker.

Id like to take a strategy I've been working on live but if I take this beginning portion of the backtest into consideration the drawdown is very high.. ~30% ..but if I start the test from the time the curve begins to smoothen out, the drawdown is much lower (~10%) and the strategy is very profitable.

Any thoughts?

 

I wrote an indicator to display missing bars in history.

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

It won't fix anything but at least it might help to show if your history has gaps!

 
Thank you thats very helpful! .. according to your indicator, there is definitely more missing data toward the beginning of the chart then more recently... hopefully this is significant enough to validate my system
Reason: