Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

No call to OnBarUpdate for daily chart

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

    No call to OnBarUpdate for daily chart

    I am using a chart with Day interval bars on various instruments.
    In my indicators, on the last bar, todays, the OnBarUpdate() method is not being called.
    I am doing this in the evening well after market close.
    The session template is set to <Use instrument settings>, which in the case of 6E is
    <CME FX Futures ETH> or in the case of SPY <US Equities RTH>.
    In both cases the session is done for the last day in question.

    I attached the indicator I used to test this.

    What do I have to do to have OnBarUpdate() called on last bar of DAY chart?

    Gary
    Attached Files

    #2
    Set "Calculate on bar close" to "False" in the Data section of the Indicator menu. This will force the bar to close without waiting for the next day's trading to begin.

    Be sure to leave it set to "True" during market hours, otherwise OnBarUpdate will be called for every tick, which you don't want unless your indicator has been specifically coded for that.

    Comment


      #3
      Gary, OnBarUpdate() will be called as soon as the first tick of the new session arrives. This is because a bar is not closed until the event comes to start the new bar, which is the first tick of a new bar.
      AustinNinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      155 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      307 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      244 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      346 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      176 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X