CP + MT5 Backtest magic
Hi, I would like to improve the reliability of backtests using OHCL. (spread data in MT5 is very unreliable - check GBPUSD dec 2014. Testing with tick data introduces actually more overfitting risk than reliability... :( )
In order to do that, it is important to understand the tricks MT uses to place the orders when OHCL is used.
It is right now, it is more than confusing!
Lets take this set file:gbpusd_1m_baaad.set
It basically buys immediately when the prices goes under MA(1h, 10) and closes when the price goes above MA(1h, 10).
This is a configuration which was found by the optimizer working supervery awesome well.
It basically enters when the price moves 1 point below MA (MA Filter).
So the EA BUYs (only) if the prices goes below the MA(1h, 10) line.
Now, just for overview, the results for OHCL and tick data are
OHCL:
Tick data:
When we take a closer look at the positions, we see
OHCL:
Ticker:
How there are the resulting core questions:
* Since CP opens a position when the price is BELOW the MA(1h, 10) line, why is always the LOW price of 1min candle hit inside the OHCL backtest?
* Why is always the HIGH price of a candle hit inside the backtest when the position is closed?
Thank you.
As far as I understand, the indicator uses close price to compute MA.
The decision if a new trade should be opened happens oneach new candle. At this time we receive the information that the new open[t] is above SMA.
So the price should be close[t-1] or open[t].
Not low[t] or low[t-1].
right?
What do I miss here?
Nope, you're wrong. We don't have "Use closed bars only" option for the MA below/above filter.