Why do I get different results between my backtests and the real trading?

FAQs - Category: Backtest

It is common to notice differences between backtests, demo trading, and real trading results in automatic trading. These variations occur due to multiple factors related to market conditions, order execution, and platform settings.

Solution

To understand why your backtest results differ from real trading, consider the following elements that can impact performance:

1. Market Execution Differences

  • Spread Variations: Real market spreads fluctuate dynamically, whereas backtests may use a fixed spread.
  • Slippage: Orders in live trading can experience slippage, meaning they are executed at a price different from the requested one due to market volatility.
  • Minimal Distance Restrictions: Brokers impose minimum distance rules for pending orders, which may prevent execution at desired levels.

2. Order Execution Issues

  • Rejections & Modifications: Orders may be rejected due to broker rules, insufficient margin, or invalid order distances.
  • Guaranteed Stoploss & Fees: If you are using a Limited Risk Account, guaranteed stop-losses automatically adjust execution prices and include additional fees.
  • Trailing Stop Behavior: The SET STOP TRAILING instruction hands over control of the stop-loss movement to IG, which may behave differently in real trading compared to backtesting.

3. Differences in Trading Conditions

  • Trading Hours & Time Zones:
    • If the strategy is launched in a different time zone or with custom trading hours, this can impact execution.
    • Backtests do not account for overnight fees or weekend gaps, which can affect live trading performance.
  • Broker Server Latency (for IG Users): While IG demo servers have improved, slower response times may still cause delays compared to a real account.

4. Coding Issues That Cause Differences

  • Programming Errors: Ensure your strategy does not include issues such as:
    • Division by zero errors
    • Negative or null periods for indicators
    • Logical errors in order conditions
  • Starting the Strategy at a Different Time:
    • Launching a strategy 1 hour or even 1 minute later can change calculation sequences, especially if based on dynamic indicators like moving averages.

5. Differences Between Backtests and Real Market Data

  • Tick-by-Tick vs. Non-Tick Testing: If backtests were done without tick-by-tick mode, the simulation may not reflect real intrabar price movements.
  • Contract Size Differences: Ensure the contract size in backtests matches your real account settings.
  • Margin Requirements: Backtests do not simulate required margin, which can impact trade execution in real conditions.
  • Automatic Stop Order Adjustments: When launching ProOrder, check whether automatic stop order adjustments are enabled, as this can alter order placement.

How to Troubleshoot Differences Between Backtests and Real Trading?

  1. Compare Backtest Orders with Real Orders – Identify when and why orders triggered differently.
  2. Check the Order Rejection List – Press CTRL+O to access ProRealTime’s order logs for any error messages.
  3. Run Backtests with Tick-by-Tick Mode Enabled – This provides a more accurate simulation of live trading.
  4. Verify Broker-Specific Rules – Such as minimal order distance, spread widening during volatile periods, or overnight fees.

By carefully analyzing these differences and adjusting your strategy accordingly, you can reduce discrepancies and improve the reliability of your ProRealTime automated trading results.

Back to FAQs
Logo Logo
Loading...