Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
TradingHours missing function
Collapse
X
-
Hello DaveE,
Thank you for your patience.
This feature request has been assigned the ID SFT-1730.
-
SessionIterator is the ultimate core object used to traverse trading hours details over segments of time.
GetPreviousTradingDayEnd() is no more efficient than using your own session iterator.
Any helper methods we would create would simply wrap a session iterator object, and would need to call either sessionIterator.CalculateTradingDay or sessionIterator.GetNextSessionEnd to arrive at this information requested.
We will submit your request to add this type of method to the TradingHours class, but in the meantime - go ahead and use your own session iterator.
I also have requested an update to the help guide to reflect a similar performance concern
Leave a comment:
-
BarsSinceNewTradingDay only works in the context of the current session, it does not allow finding the session start for an arbitrary DateTime, so it cannot substitute for the suggested function GetPreviousTradingDayStart(DateTime timeLocal)
Leave a comment:
-
Hello DaveE,
Thank you for your post.
You could use Bars.BarsSinceNewTradingDay to calculate the bars back for the start of the session. Then pass this to Time.
Bars: http://ninjatrader.com/support/helpG...en-us/bars.htm
Leave a comment:
-
TradingHours missing function
TradingHours has a function GetPreviousTradingDayEnd(DateTime timeLocal)
but it does not have a matching function say called
GetPreviousTradingDayStart(DateTime timeLocal)
To be honest a name like GetSessionStart(DateTime timeLocal) would be better, but GetPreviousTradingDayStart matches the existing naming convention.
I know someone is going to say "use SessionIterator instead", but I want to be able to get the start of a session relative to a given DateTime in OnBarUpdate(), but as of RC2 the documentation for SessionIterator.GetNextSession() sayscalling this method for each bar in the OnBarUpdate() method would NOT be recommended.
So could NT add GetPreviousTradingDayStart(DateTime timeLocal)
please.Tags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by alifarahani, Today, 09:40 AM
|
6 responses
36 views
0 likes
|
Last Post
by alifarahani
Today, 03:18 PM
|
||
Started by Waxavi, Today, 02:10 AM
|
1 response
17 views
0 likes
|
Last Post Today, 03:03 PM | ||
Started by Kaledus, Today, 01:29 PM
|
5 responses
14 views
0 likes
|
Last Post Today, 02:56 PM | ||
Started by Waxavi, Today, 02:00 AM
|
1 response
12 views
0 likes
|
Last Post Today, 02:53 PM | ||
Is it possible to have a drawing, such as a line, cycle through different colors?
by gentlebenthebear
Started by gentlebenthebear, Today, 01:30 AM
|
3 responses
17 views
0 likes
|
Last Post Today, 02:41 PM |
Leave a comment: