Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Bars.LastOfSession
Collapse
X
-
Bars.LastOfSession
May I suggest adding this bool to complement the Bars.FirstOfSession that is already available? It would be useful for indicators that need to reset values before the next session instead of at the start of the next session.Last edited by NinjaTrader_JoshP; 08-15-2007, 04:17 AM.Josh P.NinjaTrader Customer ServiceTags: None
-
I meant Bars not ticks. You should be able to know if this would be the last bar of the session based on what time the bar is building for. If the bar is building for any time past the Session End time then the bool should return true. This is how the Bars.FirstOfSession behaves too. It returns true anytime throughout the bar, not just at the first tick of the bar or the last tick of the bar.
While I'm on a Bars.* topic I noticed that Bars.SessionEnd produces a weird DateTime date. Using Bars.SessionBegin prints out "8/15/2007 6:30:00 AM", but Bars.SessionEnd prints out "7/27/2007 1:00:00 PM". Why are they different dates? This makes it useless to do a simple (Bars.SessionEnd-Bars.SessionBegin) for use in trying to create my own Bars.LastOfSession bool.Josh P.NinjaTrader Customer Service
Comment
-
At the moment if I do Bars.SessionEnd-Bars.SessionBegin this is the output I get:
It is taking the difference in dates not just times into the TimeSpan calculation.Code:Session Begin: 8/15/2007 6:30:00 AM Session End: 7/27/2007 1:00:00 PM End-Begin: -18.17:30:00
Josh P.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
134 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
75 views
1 like
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
119 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
114 views
1 like
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
92 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment