I've attached the indicator, is this possible?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Strategy Use Indicator
Collapse
X
-
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?Tags: None
-
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.
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CaptainJack, 05-29-2026, 05:09 AM
|
0 responses
474 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 05:09 AM
|
||
|
Started by CaptainJack, 05-29-2026, 12:02 AM
|
0 responses
315 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 12:02 AM
|
||
|
Started by charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
253 views
1 like
|
Last Post
by charlesugo_1
05-26-2026, 05:03 PM
|
||
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
340 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
305 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|

Comment