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 Mindset, Today, 06:46 AM
    0 responses
    8 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, Yesterday, 05:21 PM
    0 responses
    14 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    15 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    82 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    48 views
    0 likes
    Last Post PaulMohn  
    Working...
    X