Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

What is the syntax to trigger "OnFinalBarUpdate()"?

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

    What is the syntax to trigger "OnFinalBarUpdate()"?

    NT Forum,

    Is there any way to syntactically ascertain whether the final bar in a historical (i.e. no realtime) BarSeries (i.e. Chart) has triggered?

    For example, OnBarUpdate() triggers with each new bar. On the very final bar in the BarSeries, is there syntax analogous with OnFinalBarUpdate()?

    Shannon

    #2
    Hello Shannon,

    Thank you for writing in.

    While there is no built-in method to determine if the strategy has evaluated the final historical bar, you could use the syntax provided here: http://ninjatrader.com/support/forum...68&postcount=2

    As this was made for NinjaTrader 7, a NinjaTrader 8 conversion would read:
    Code:
    if (Bars.Count - 2 == CurrentBar && State == State.Historical)
         // do something
    Please, let us know if we may be of further assistance.
    Last edited by NinjaTrader_ZacharyG; 05-31-2016, 03:05 PM.
    Zachary G.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    144 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    298 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    242 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    339 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    172 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X