Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
New Line Break Bar Formation Event
Collapse
X
-
New Line Break Bar Formation Event
Is there anyway to know when the Line Break 3 (1-min) Bar has closed and a new Line Break Bar has formed. Due to bar removals during Line Break, IsFirstTickOfBar doesn't work. Any help will be appreciated. Thanks.Tags: None
-
Hi yasirbashir1000, thanks for posting.
You can keep track of the active bar with some C# code and using the CurrentBar value:
Code:private int activeBar = -99; protected override void OnBarUpdate() { if(CurrentBar != activeBar) { activeBar = CurrentBar; Print("new bar"); } else { Print("same bar"); } }
-
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CaptainJack, 05-29-2026, 05:09 AM
|
0 responses
430 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 05:09 AM
|
||
|
Started by CaptainJack, 05-29-2026, 12:02 AM
|
0 responses
282 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
241 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
331 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
291 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|

Comment