A small handful of traders like to crunch as many numbers as possible through the MetaTrader historical tester. While I do not necessarily agree with that approach to backtesting, there are a number of things that one can do to speed up the process.
1) Use fixed stop losses and take profits for the backtest instead of stealth stops. Running in stealth mode requires that the EA make calculations on every single tick to determine whether or not it needs to exit. Placing the orders with the broker eliminates this overhead.
2) If your strategy works off of closed bars, then make sure that your strategy only calculates indicator values once per bar. This seems obvious, but many programmers allow this to happen either out of ignorance or laziness.
Buy when the fast moving average crosses and closes above the slow moving average
The good approach:
On the first tick of the new bar, check to see what the moving average values were on the previous two bars. If it appears that a cross occurred, exit any trades in the wrong direction and open new trades in line with the signal. Ignore every other tick on this bar.
The bad approach:
Calculate the moving average values on the previous two bars on every single tick.
3) Consider using Open Only prices if your strategy will allow it. You should not use open only prices if any of the following applies to your strategy:
- Trades sometimes open and exit in a single bar or candle. This can happen if your stop loss or take profit is somewhat likely to be hit on the first bar of an open trade
- Trades do not open on the first tick of a bar.
- Exits can occur while a bar is still open. This does not include stops or take profits.
Leave a Reply