LastSession (Function)

image\trumpet2.gif Disclaimer

The LastSession function returns the session number of the last session of a specified day.

Syntax

LastSession(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.

Example

Assigns to Value1 the last session number for Wednesday:

Value1 = LastSession(0,3);

See Also

LastSessionMS