Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Discrepancy between backtesting and playback

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

    Discrepancy between backtesting and playback

    Hello,

    I had a custom strategy made by a coder. When I run a backtest on high order fill resolution of 1 tick vs playback, the trades made are different. In the attached picture, the backtest is on the right with the playback on the left. What accounts for this difference? I want the trades during playback/live data to run like they do during backtesting. How would I do this?
    Last edited by burmaz; 10-18-2020, 09:07 PM.

    #2
    Hello burmaz,

    Thank you for your post.

    Trades made when using real-time data or Playback cannot run the same as trades made using Historical data (backtesting). You should expect that a strategy running real-time (Live, Playback) will produce different results than the performance results generated during a backtest.

    When backtesting, the fill price of an order is based on the OHLC of a bar and the price of the order itself since that is the only information that is known during a backtest.

    When using real-time market data or Playback, the fill price is based on incoming market data and volume, and you may receive better or worse fill prices depending on where the bid or ask price is and what volume is available at this market price. During real-time live brokerage trading, orders are filled according to market dynamics.

    This is why you may see orders not fill in real-time that you may otherwise expect to see filled based on your backtesting results.

    Here is a NinjaTrader Help Guide link with information about discrepancies between realtime and historical data — https://ninjatrader.com/support/help...ime_vs_bac.htm

    Also, here is a Help Guide link with information about High Order Fill resolution - https://ninjatrader.com/support/help...FillResolution

    Please let us know if we may assist further.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Today, 05:17 AM
    0 responses
    44 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    124 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    65 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    42 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X