Backtesting guide

How to backtest a forex strategy

A useful backtest begins before the Run button. Write the rule, choose a comparison, include costs, separate development data from confirmation data, and inspect the trades that produced the summary.

  1. 1. Write one testable rule

    Replace words such as ‘strong trend’ with a price, indicator or time condition that another person can reproduce.

  2. 2. Fix the market and dates

    Choose the pair, timeframe and date range before seeing the result. Keep a later period untouched for confirmation.

  3. 3. Include costs and trade count

    A high-frequency rule can look profitable before spread. Always show net pips and the number of trades beside win rate.

  4. 4. Compare a control

    Test the default against nearby values or a simpler rule. Something always finishes first when there is no control.

  5. 5. Replay the trades

    Open winners and losers on the chart. This catches fill assumptions and conditions that the summary table hides.

  6. 6. Confirm, do not optimize again

    Run the chosen rule on untouched dates or another pair. If you tune again, it is development data again.

Practical guides

Concrete examples of building rules, logging practice and choosing a tool.