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 Hwop38, 05-04-2026, 07:02 PM
|
0 responses
164 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|
||
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
317 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|
||
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
245 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
350 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
179 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|

Comment