GetNextSession()
<< Click to Display Table of Contents >> GetNextSession() |
Calculates the next available session relative to the "timeLocal" value used in the method's input.
Note: This method needs to be used before you can accurately determine various session properties such as ActualSessionBegin or ActualTradingDayEndLocal, etc. |
A bool value when true indicates the method was able to successfully calculate the next trading session; otherwise false.
Warning: This method is resource intensive and should ONLY be reserved for situations when calculations would be limited to a few specific use cases. For example, calling this method for each bar in the OnBarUpdate() method would NOT be recommended. |
timeLocal |
The DateTime value used to calculate the next trading day. |
includesEndTimeStamp |
A bool determining if a timestamp of <n>:00 should fall into the current session. (e.g., used for time based intraday series such as minute or second). |
<sessionIterator>.GetNextSession(DateTime timeLocal, bool includesEndTimeStamp);
Getting Next Session of the Primary Bars Object |
---|
SessionIterator sessionIterator; |
Getting Next Session of a Secondary Time Series |
---|
SessionIterator rthSessionIterator; |