Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

My indicators lose ticks / events during transition between historical and real-time

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

    My indicators lose ticks / events during transition between historical and real-time

    Hi

    I have made some indicators that make use of the Tick Replay functionality.

    During the evaluation of historical data when several charts are open, using several of my indicators for each chart and during the initial connection to the data service, two things happen:
    1. Temporarily NT8 freezes.
    2. Sometimes (with slower CPUs it is more noticeable) there are losses of incoming ticks/events during the transition from historical to real-time. But when reloading one by one each TAB-Chart using "Reload NinjaScript", NT8 freezes temporarily, but there are no more lost ticks during the transition.

    So...
    • How can I solve this so that NT8 does not freeze and so that the data loss no longer occurs?
    • What do you recommend?
    • Is there any way to solve it without throwing away my indicators... because I already spent the time to learn NinjaScript / C# and my indicators are useful to me.

    PS: I have optimized my indicators to the maximum, but obviously there is a limit.​

    #2
    Hello trader2022ne,

    The behavior may lie with the real-time bar starting mid bar.

    I would recommend adding a 1 tick series and tracking each tick.

    The ResetValues() method in the attached demonstrates the transition.

    The attached exports are updated versions of the scripts found on the forum linked below.
    https://ninjatrader.com/support/foru...65#post1045465
    Attached Files
    Last edited by NinjaTrader_ChelseaB; 10-05-2022, 08:23 AM.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello NinjaTrader_ChelseaB

      Thank you for your response and recommendation.
      I will review and analyze the scripts.​

      Comment


        #4
        Hello

        Please clarify me if when using TickReplay the following assumption is correct or not:
        In NT8 although it is processing historical data, internally the incoming "real-time" ticks that keep coming from the data provider are stored just to the "historical" queue, becoming part of the "historicals" until the queue is finished processing and the processing is synchronized with the incoming ones.


        If that assumption is correct:
        • Does the use of AddDataSeries() guarantee the above ?
        • MarketDataEventArgs or BarsRequest by itself guarantee the above ?

        Thank you.

        Comment


          #5
          Hello trader2022ne,

          Yes, TickReplay will apply to all data series added with AddDataSeries(), and will update OnBarUpdate() for each series.

          MarketDataEventArgs will only update for last data.


          BarsRequests are completely unrelated and are a way to request unsynchronized data through the Addon approach, and work regardless of what is happening in the script. TickReplay will not affect BarsRequests.

          Chelsea B.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          647 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          368 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
          573 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X