Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
CalculateOnBarClose and session end
Collapse
X
-
CalculateOnBarClose and session end
Hi,can you please confirm, if COBC == true, is the OnBarUpdate() called when a session ends or when a new bar is created? More specifically, when the market closes on Friday night, do I get OnBarUpdate() on Friday or on Saturday when a the market opens and new bar is created? ThanksTags: None
-
Thank you. Is there a way how to detect session end, or how to detect a bar will not get any more data? Are you planning to change the business logic of reporting bar close to more natural way? Waiting for the next bar makes sense only in some cases and opening a new bar is not the only condition for deciding if a bar is closed.
Comment
-
Hi mantak007,
To find the end time of a session you can use:
Bars.Session.GetNextBeginEnd(Bars bars, int barsAgo, out DateTime sessionBegin, out DateTime sessionEnd)
http://www.ninjatrader.com/support/h...xtbeginend.htm
As far as I know the bar construction will be the same.
Would like a feature request to end the bar if the bar is a time based bar at the time the bar closes without a tick necessary to open the new bar?Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
169 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|
||
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
326 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|
||
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
251 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
353 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
180 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|

Comment