Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Real time simulation both adding and missing trades versus backtest

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Real time simulation both adding and missing trades versus backtest

    I've been running a simple trading strategy using the PFE indicator on ES 1 minute bars. The results of the real-time simulation and backtests are wildly different, but not just in price (i.e., not just a missed tick) - what I'm noticing is that the number of trades/day is also very different. Btw, I have read the page on difference in backtest/real-time simulation performance and this doesn't seem to explain it.

    The fill logic is default and there are no limit prices being uses - hence, I believe I should be paying the spread and getting guaranteed fills in real-time simulation. However, even if the fill logic was faulty, I can't understand how the real-time simulation is adding trades that the backtest is not.

    For instance, here is a comparison of 3 (bad!) trading days for the strategy:

    1/3/11
    Realtime: 17 trades, -$112.50
    Backtest: 8 trades, -$200

    1/4/11
    Realtime: 10 trades, -$112.50
    Backtest: 13 trades, -$125.00

    1/5/11
    Realtime: 14 trades, +$175.00
    Backtest: 11 trades, +$612.50

    Particularly in the case of 1/5/11, even if all 14 trades missed by 1 tick getting in and out (which seems a bit unlikely), that still doesn't explain the large difference in P&L or the extra "added" 3 trades.

    I'm running NT 7.0 on a Dell laptop with 4 gigs RAM and my internet access is FIOS 25Mbps, so I don't think this is a slow hardware/connectivity problem.

    Is it possible that some indicators such as PFE calculate differently during real-time versus historical backtesting and/or have bugs in them?

    Other strategies also have this problem (won't go into all the details here) - but the backtest and real-time simulation seem to be running different signals and have very different entry/exit points. To make the problem more interesting, at least a few strategies with different indicators seem to conform pretty closely to the backtest - so it doesn't seem to be a problem that I'm generating consistently.

    What further information can I give that would be helpful? Any ideas on how this is happening?

    Is it possible that not calculating on bars close would somehow improve this issue?

    Thanks

    #2
    It is definitely possible the indicator calculates different real-time verse backtesting. Changing to Calculate On Bar Close = false would most likely create an even greater difference. What kind of strategy are you running? Could you post the code so we can see what might be going on? The real-time tests aren't 100% accurate indicators of how your strategy will perform, but they are a much better representation than backtesting.
    AustinNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    650 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    370 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    109 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    574 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    577 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X