Profit or Loss, This Is the Question!
While backtesting with Metatrader, it is quite common to incur in the profit or loss problem. What am I talking about?
When a trader tests a strategy, Metatrader runs some forecasts about prices. The more detailed the data you are using, the better the backtest. If you are using 1m timeframe data it is more precise than 5m or 1 hour data.
MT4 acts as a bouncer between the lowest price and the highest one within a candle. Here the problem surfaces: how can you determine whether the stop loss you set has been hit before the take profit you also set?
There is no answer to this problem. You could use tick data, but it is too slow and MetaTrader does not support it natively.
The Worst Case Scenario Strategy
The only practical solution is to apply the worst case scenario methodology.
According to this approach you simply count all the candles touching both stop loss and take profit as if they always hit the stop loss first. It is the most conservative assumption you can make.
If your trading system works well even in this worst case, it is very likely to run profitably in reality.
Key Takeaways
- Use 1-minute data for the most accurate backtests — it reduces the ambiguity window
- Apply the worst case scenario: assume SL is hit before TP whenever both are touched in the same candle
- If the strategy is profitable under this assumption, it has genuine robustness
- Strategies that only look good under optimistic assumptions should be abandoned
My suggestion is to think of algorithmic systems that let prices run a little. Scalping is not good with algo trading, because it has problems related to spread and slippage. You can read more in my article scalping is a rip-off.
The less your trading system's robustness is sensitive to small changes, the stronger your trading strategy is.