Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Simulation in Real Time Vs Playback

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

    Simulation in Real Time Vs Playback

    Good morning,

    Sorry for my little english,

    I tested (always in simulation) first a strategy with real time data and the day after using the “Playback”, same settings, same period of time, the results are totally different.

    I state that:
    The strategy is based on Level 1 so it uses an indicator that is based OnMarketData(), the frame is the “tick”.
    I get the Real Time data from Kinetick as well as the Market Replay file.
    The strategy only sends limit orders.

    The engine that crosses the transactions should be identical (I suppose), why this huge difference? (RT = -638 / PB = +2228)
    The connection shouldn't be a problem, as in simulation all orders are crossed in my computer.

    Thanks for the attention.

    #2
    Hello sbndt,

    Thanks for your post.

    Sim101 adds random delays between order states and differences may add up over time.

    Is this also the same test with the same exact start time and same exact trades being made?

    Was the script enabled at the same exact time in Playback as it was live?

    We should see order triggers happening on the same bars since this would be consistent, fill prices may be slightly off from the first trade made.

    Do you see the same symptoms happen when testing the SampleMACrossover strategy that comes default with NinjaTrader?

    If the SampleMACrossover strategy does not show an issue when testing, and your strategy does, could you please share a small exported example script with us?

    Exporting: https://ninjatrader.com/support/help...tAsSourceFiles

    I look forward to assisting 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


      #3
      Thanks for your reply, Brandon,

      I tested the same strategy (created with the Strategy Builder) in Real Time and the next day in Playback on the same time frame (9:20 - 12:00 CT).
      I find it correct that the simulator adds a slight delay, but if I run the same strategy twice in a row in "Playback", I get the same results.

      I think I did a bit of confusion with the code, I recompiled it and today I will try again, I will keep you updated on developments.

      Thanks you again.

      sbndt

      Comment


        #4
        Originally posted by sbndt View Post
        Thanks for your reply, Brandon,

        I tested the same strategy (created with the Strategy Builder) in Real Time and the next day in Playback on the same time frame (9:20 - 12:00 CT).
        I find it correct that the simulator adds a slight delay, but if I run the same strategy twice in a row in "Playback", I get the same results.

        I think I did a bit of confusion with the code, I recompiled it and today I will try again, I will keep you updated on developments.

        Thanks you again.

        sbndt
        Hi did you figure out problems between sims with live data and playback and real account. Was sims more accurate with live account or market replay? What was the difference you noticed with both those (sims and market replay) compared to live trading?

        Comment


          #5
          Originally posted by rocketstock View Post
          Hi did you figure out problems between sims with live data and playback and real account. Was sims more accurate with live account or market replay? What was the difference you noticed with both those (sims and market replay) compared to live trading?
          In order to have a clearer picture as possible, I removed my indicator which was based on the OnDataUpdate () method, now the strategy is without indicators.

          In practice it sends orders to the limit (GetCurrentAsk () and GetCurrentBid ()), my impression is that in PlayBack orders are filled much more easily, in Real Time only few orders are executed.

          it's strange because the engine that match the orders should be the same, the latency and the connection speed are out of play because in simulation everything happens in my computer, I can only imagine that in Real Time the sequence is different from the one I download in PlayBack.
          Probably if you enter only market orders you will not notice any difference, if instead you enter orders at the limit within the spread, the difference is clearly highlighted.
          Last edited by sbndt; 02-14-2022, 12:26 AM.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Yesterday, 05:17 AM
          0 responses
          62 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          134 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          75 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          45 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          50 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X