Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Replay vs Live

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

    Replay vs Live

    I was hoping you might be able to shed some light on something. I have a strategy that uses

    protected
    overridevoid OnMarketData(MarketDataEventArgs e)

    as opposed to

    protectedoverridevoid OnBarUpdate()

    Part of the strategy keeps track of changes in level one market data. I've noticed that when I run the strategy with a Live connection, all of the signals are executed, but when I run the same day on Replay, not all of the signals are taken.

    Might this be because when the data is recorded for replay it is grouped together by transactions and changes in level one market data happen in terms of smaller granularity?

    Thanks,

    Safetrading

    #2
    Hello safetrading,
    Results from replay and live data can vary due to various reasons like:

    Replay data is recorded from ZenFire while in live it would depend on who you are connected with.

    The strategy may be started at different data points which can results into different entry exit points.

    In market replay delays are not taken into account for simulator fills. Please refer to our help guide to know more.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      As to your response, I use Zenfire for my datafeed, so my replay data and live data should be the same.

      As to the start of data points,when I start my strategy, it accumulates live market data for one hour before it takes a signal, and the signal it takes is always less than one hour old and signals are taken from the data contained within one bar only, there is not accumulated data which takes place before I started my connection. If I understand this correctly, then my Replay data points that are used in the strategy would be the same ones used during my Live feed

      As to fills, my entries are market orders, so liquidity shouldn't come into play. All I'm trying to do is assertain how I can backtest consistently when compared to a live feed, so to my original question, does what I asked regarding OnMarketData occur?

      Thanks,

      Comment


        #4
        Hello safetrading,
        In market replay OnMarketData should work fine.

        OnMarketData does not works in backtesting as there are no live streams, which is not the case in market replay.
        JoydeepNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

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