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 Javierw.ok, Today, 04:12 PM
    0 responses
    4 views
    0 likes
    Last Post Javierw.ok  
    Started by timmbbo, Today, 08:59 AM
    2 responses
    10 views
    0 likes
    Last Post bltdavid  
    Started by alifarahani, Today, 09:40 AM
    6 responses
    40 views
    0 likes
    Last Post alifarahani  
    Started by Waxavi, Today, 02:10 AM
    1 response
    18 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by Kaledus, Today, 01:29 PM
    5 responses
    15 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X