FirstSession (Function)
The FirstSession function returns the session number of the first session of a specified day.
Syntax
FirstSession(SessionType,XDay);
Returns (Integer)
A numeric value for the current bar.
Parameters
|
Name |
Type |
Description |
|
SessionType |
Numeric |
Sets the type of session to reference. 0 = Auto Detect, 1 = Regular Session. |
|
XDay |
Numeric |
Sets the day of the week that should be evaluated. 0=Sunday, 1=Monday, etc. |
Remarks
The input parameter SessionType specifies the type of session information that should be returned. The type parameter may be specified as follows: Auto-Detect Session – [0, AutoSession] - uses whatever session is specified for the data series; regular or custom, or Regular Session – [1, RegularSession] - regular session information should always be returned. The input parameter XDay specifies the day of the week that should be evaluated for the Last session number. 0 = Sunday, 1 = Monday, 2 = Tuesday, etc.
Examples
Assigns to Value1 the first session number for Wednesday:
Value1 = FirstSession(0,3);