Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to calculate last Bar of Historical EoD Data?

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

    How to calculate last Bar of Historical EoD Data?

    Hello Support,
    Indicators are not calculated on the last Bar of an EoD Historical Data Series. Firing onBarUpdate() ends on Bars.Count - 2
    Click image for larger version  Name:	Missing_Indicator_Data_on_last_Bar.png Views:	0 Size:	5.0 KB ID:	1177642
    I searched the Forum for solutions, found similar questions (like this), but all these seems (also) related to Intraday Data.
    I learned, that a Bar close is only fired when a new Bar (or Tick) will start - even on historical Data. But historical Bars are 'as is'. They don't grow or change like started and unfinished Realtime Bars.
    I also learned, that State.Historical data processes OnBarUpdate() only on the close of each historical bar even if this property is set to OnEachTick or OnPriceChange.

    But what's on session pauses like evenings or weekends (to preparing Trades for the next Session)? Indicators shoud also include the last available Bar (Bars.Count -1)

    I tried -1 as barsBack, sessionIterator.GetNextSession(Time[0]) and Update(), played with Trading Hours and EndDate as ChartSeries Parameters - all without success.
    So please help: how do I get calculated the last Bar (Bars.Count - 1) on historical EoD Data?

    Best Regards
    t

    #2
    Hello Trandy,

    For a plot to update, it has to be receiving data and the Value series for the plot has to get set to a number for that number to be plotted.

    Yes, Calculate must be OnPriceChange or OnEachTick to update OnBarUpdate() before the bar closes and set the value that gets plotted on the chart.

    When a session breaks, there is no data to drive the chart, however the plot would be updated to the last price change, and would still be on the currently building bar.

    With the Kinetick End of Day Free data, there would be no updating data intra-bar, so unfortunately it would not be possible to trigger OnBarUpdate to update the plot for that last bar using the calculated data for that bar.
    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
    563 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    329 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    547 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    547 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X