Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Use Indicator

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

    Strategy Use Indicator

    I have a strategy that works in Calculate.OnBarClose but I need it to grab a bias from an indicator that works on Calculate.OnEachTick

    I've attached the indicator, is this possible?
    Attached Files

    #2
    Hello imjustkaze,

    Thanks for your message.


    A symbiote hosted indicator inherits the Calculate setting of the host strategy or indicator that instantiates it. However, when running with Calculate.OnEachTick, you can execute logic at the start of a new bar ( right after the previous bar closes) by placing it inside a block that checks if IsFirstTickOfBar is true.

    You can find this information on the link below, more precisely on tips #4.

    Calculate

    If you absolutely need your indicator to update OnEachTick and still want your strategy logic to update only once every bar, an alternative would the to set your strategy calculation mode to Calculate.OnEachTick and use IsFirstTickOfBar to calculate your logic. Using IsFirstTickOfBar will ensure your custom logic updates only once every bar.

    IsFirstTickOfBar

    The link below contains a sample code for how IsFirstTickOfBar is being used to ensure the specified section of code will only run once per bar while having the calculation set to OnEachTick.

    https://developer.ninjatrader.com/docs/desktop/separating_logic_to_either_calculate_once_on_bar_c lose_or_on_every_tick

    Feel free to reach out with any other questions or concerns.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    87 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    132 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    65 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    118 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    67 views
    0 likes
    Last Post PaulMohn  
    Working...
    X