Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Ninjatrader Strategy OnBarUpdate Execution Order with Indicator.

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

    Ninjatrader Strategy OnBarUpdate Execution Order with Indicator.

    I have a strategy which depends on an indicator as a component. When I run the strategy the strategy OnBarUpdate is called in batch to completion before the indicator runs. e.g. if I added Print to the 'OnBarUpdate' methods I see:


    Strategy.OnBarUpdate();
    Strategy.OnBarUpdate();​
    Strategy.OnBarUpdate();​
    ...
    Indicator.OnBarUpdate();​​
    Indicator.OnBarUpdate();​​
    Indicator.OnBarUpdate();​
    ...

    is this by design? How can I get these to execute together. e.g.:

    Strategy.OnBarUpdate();
    Indicator.OnBarUpdate();​​
    Strategy.OnBarUpdate();​​
    ...


    #2
    Hello nicthe,

    Can you provide more specifics on what you created? How the OnBarUpdate processes depends on how the indicator was coded and also if the indicator is plotting data that the strategy is accessing that data on each bar.

    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by yertle, Today, 12:24 PM
    0 responses
    2 views
    0 likes
    Last Post yertle
    by yertle
     
    Started by reekotubbs, Yesterday, 01:09 PM
    3 responses
    26 views
    0 likes
    Last Post reekotubbs  
    Started by Blaze212, 07-07-2024, 08:58 PM
    2 responses
    18 views
    0 likes
    Last Post Blaze212  
    Started by medicmiked, Today, 11:56 AM
    0 responses
    2 views
    0 likes
    Last Post medicmiked  
    Started by miaolivi9, Today, 06:59 AM
    0 responses
    8 views
    0 likes
    Last Post miaolivi9  
    Working...
    X