Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnBarUpdate not being called in Realtime

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

    OnBarUpdate not being called in Realtime

    Hi,
    I have a strange bug to report today, with sample script attached you can test.
    With NT8.1.3.1 this indicator loads some additional DataSeries and functions properly historically. All it is doing in this sample script is printing something each OnBarUpdate.
    Nothing happens once the indicator reaches realtime.
    The chart it is on continues to update visually, so data is flowing. It's a head scratcher.
    I suggest trying it out at a time of day when the main US session is not open. (That's generally when I am running it.)

    Over to you;
    saltminer

    ...
    26/09/2024 6:24:30 AM bip 0 CurrentBar 2047 Count 2049 Calculate OnPriceChange State Historical
    26/09/2024 6:25:00 AM bip 2 CurrentBar 4250 Count 4255 Calculate OnPriceChange State Historical
    26/09/2024 6:26:00 AM bip 2 CurrentBar 4251 Count 4255 Calculate OnPriceChange State Historical
    26/09/2024 6:27:00 AM bip 2 CurrentBar 4252 Count 4255 Calculate OnPriceChange State Historical
    26/09/2024 6:28:00 AM bip 2 CurrentBar 4253 Count 4255 Calculate OnPriceChange State Historical
    26/09/2024 6:28:42 AM bip 0 CurrentBar 2048 Count 2049 Calculate OnPriceChange State Historical
    26/09/2024 6:29:00 AM bip 2 CurrentBar 4254 Count 4255 Calculate OnPriceChange State Historical
    ​.. then nothing
    Attached Files

    #2
    Hello saltminer,

    If the session is not open, then the script would not be receiving data.

    Further, if the series are using different TradingHours all series have to be in session.

    From the help guide:
    "Warning:
    If your NinjaScript object is using AddDataSeries() allowing to specify a tradingHoursName, please keep in mind that: An indicator / strategy with multiple DataSeries of the same instrument will only process realtime OnBarUpdate() calls when a tick occurs in session of the trading hour template of all added series. Any ticks not processed will be queued and processed as a tick comes in for all subsequent DataSeries."
    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
    601 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    347 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    103 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    559 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    558 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X