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 Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
578 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
334 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
554 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
551 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment