HighSession (Function)

image\trumpet2.gif Disclaimer

The HighSession function allows you to reference the High of a previous session in an intraday chart (minute, second, or tick-based) or a daily chart.

HighSession is part of a family of functions that allows references to values from previous sessions in intraday charts.

  This function does not support [N] historical references.

Syntax

HighSession(RegSessionOrAll_1or0,NumSessionsAgo)

Returns (Double)

A numeric value for the requested session. The function returns -1 for a data error and -2 for an unsupported chart type.

Parameters

Name

Type

Description

RegSessionOrAll_1or0

Numeric

Session to reference (1=regular session, 0=all sessions).

NumSessionsAgo

Numeric

Number of session ago to reference price (0 = current session).

Remarks

You must have enough intraday data in the chart in order to look back and reference a session value. For example, if you want to look back at the High of 25 sessions ago on a 5-minute chart, you must have at least 25 sessions of 5-minute bars in the chart.

The value for the NumSessionsAgo input parameter should always be a whole number greater than or equal to 0.  Setting NumSessionsAgo to 0 equals the current session High.

Example

Assigns the High of the previous regular session on an intraday chart to Value1, then plots Value1:

Value1 = HighSession(1,1);

Plot1(Value1, "PrevHigh");

See Also

 CloseSession, LowSession, OpenSession, VolumeDay, VolumeMonth, VolumeWeek, VolumeYear, and VolumeSession.