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 AaronKoRn, Yesterday, 09:49 PM
    1 response
    18 views
    0 likes
    Last Post Rikazkhan007  
    Started by ageeholdings, Today, 07:43 AM
    0 responses
    12 views
    0 likes
    Last Post ageeholdings  
    Started by pibrew, Today, 06:37 AM
    0 responses
    4 views
    0 likes
    Last Post pibrew
    by pibrew
     
    Started by rbeckmann05, Yesterday, 06:48 PM
    1 response
    14 views
    0 likes
    Last Post bltdavid  
    Started by llanqui, Today, 03:53 AM
    0 responses
    9 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Working...
    X