Algorithmic and Mechanical Forex Strategies | OneStepRemoved

  • Articles
  • Sophisticated Web Sites
  • Automated Trading
  • Testimonials
  • Contact

Speed up your MT4 Backtest

October 24, 2011 by Shaun Overton Leave a Comment

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.

Scenario:
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:

  1. 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
  2. Trades do not open on the first tick of a bar.
  3. Exits can occur while a bar is still open. This does not include stops or take profits.

Filed Under: MetaTrader Tips, Test your concepts historically

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

FREE trading strategies by email

Trending

Sorry. No data so far.

Archives

  • Dominari
  • How does the forex market work?
  • Indicators
  • MetaTrader Tips
  • MQL (for nerds)
  • NinjaTrader Tips
  • Pilum
  • QB Pro
  • Stop losing money
  • Test your concepts historically
  • Trading strategy ideas
  • Uncategorized
  • What's happening in the current markets?

Translation


Free Trading Strategies

Privacy PolicyRisk Disclosure

Copyright © 2023 OneStepRemoved.com, Inc. All Rights Reserved.