Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnBarUpdate not called on each Custom Bar Close using TickReplay

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

    OnBarUpdate not called on each Custom Bar Close using TickReplay

    I have a custom bar type and I want to use TickReplay or AddDataSeries to process each incoming tick. When TickReplay is enabled, I would expect OnBarClose to be called when a bar closes, however it appears that OnMarketData runs through all the 1 tick data, then OnBarClose is called for each bar close.. Is there a way to fix this?

    Indicator Loads
    OnMarketData is called for each tick for the whole chart
    OnBarUpdate is called after all tick data on chart has been processed

    I'm expecting:
    Indicator Loads
    OnMarketData called for each tick for current bar
    OnBarUpdate called when bar closes
    OnMarketData called for each tick for current bar
    OnBarUpdate called when bar closes
    etc...

    #2
    Hello habibalex,

    Does the custom bar type have IsRemoveLastBarSupported set to true?

    Bar Types which use remove last bar concepts CANNOT be used with Tick Replay.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      No it is set to False.

      The tick replay works on the chart, it just runs through all the OMD calls first before OBU. However, it works as expected on live and replay data.

      Comment


        #4
        Hello habibalex,

        I am not able to reproduce this behavior.

        Below is a link to a video of the test.


        Attached is the test script.

        If you test the test script on the ES 06-19 1 Minute with 50 bars to load and Tick Replay enabled, are you experiencing different output in the output window than what is shown in the video?
        Attached Files
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Can you try it with this custom bar type? I don't see OnBarUpdate called at all when using this bar type. Why would that be?



          Comment


            #6
            Hello habibalex,

            I am able to reproduce this behavior where OnBarUpdate is not triggering for this custom bar type.

            I tested with the UniRenko available on the User App Share to see if other custom bar types are affected, however the UniRenko bars do not exhibit this behavior and update OnBarUpdate as expected.
            (Update March 11th, 2020 – Fix for TickReplay, calculates values if bar object is mid-session and have not been calculated as least once) This is a conversion of the UniRenko ‐ Universal Renko BarType developed and originally coded for the NinjaTrader 7 platform by monpere. Please contact the original author for any questions or comments. […]


            I recommend you reach out to the vendor that is distributing this bar type and report this behavior.


            The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.
            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
            655 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