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 LiamTwine, Today, 08:10 AM
    0 responses
    2 views
    0 likes
    Last Post LiamTwine  
    Started by Balage0922, Today, 07:38 AM
    0 responses
    5 views
    0 likes
    Last Post Balage0922  
    Started by JoMoon2024, Today, 06:56 AM
    0 responses
    6 views
    0 likes
    Last Post JoMoon2024  
    Started by Haiasi, 04-25-2024, 06:53 PM
    2 responses
    19 views
    0 likes
    Last Post Massinisa  
    Started by Creamers, Today, 05:32 AM
    0 responses
    6 views
    0 likes
    Last Post Creamers  
    Working...
    X