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 NullPointStrategies, Yesterday, 05:17 AM
|
0 responses
56 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
133 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
73 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
45 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
49 views
0 likes
|
Last Post
|

Comment