I'm running an strategy that needs to look at the formation of the current bar and then reset some variables when the next new bar opens.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Detecting a new bar with OnBarClose=false
Collapse
X
-
Detecting a new bar with OnBarClose=false
How do you determine when a new bar is starting when you are using OnBarClose=false?
I'm running an strategy that needs to look at the formation of the current bar and then reset some variables when the next new bar opens.Tags: None
-
Hello,
You should find CurrentBar to be of great use here: http://www.ninjatrader.com/support/h...currentbar.htm
You can just check to see if CurrentBar has increased from the previous time called using a storage variable.
Additionally consider reading up on CurrentBars and Count.
And depending on your overall goals this might be worth looking into as well: http://www.ninjatrader.com/support/h....html?bars.htm
Please let me know if I can be of further assistance.LanceNinjaTrader Customer Service
-
Look up FirstTickOfBar in NT Help.Originally posted by TiggerTrader View PostHow do you determine when a new bar is starting when you are using OnBarClose=false?
I'm running an strategy that needs to look at the formation of the current bar and then reset some variables when the next new bar opens.
Comment
-
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
157 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
91 views
1 like
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
143 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
131 views
1 like
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
107 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment