VolumeSession (Function)
The VolumeSession function allows you to reference the session Volume in an intraday (minute
VolumeSession is part of a family of functions that allows historical daily, weekly, monthly, and yearly references in intraday charts.
Syntax
VolumeSession(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 |
RegularOrAll_1or0 |
Numeric |
1 = regular session, 0 = all sessions including regular. |
NumSessionsAgo |
Numeric |
The number of sessions back to reference the volume. |
Remarks
You must have enough intraday data in the chart in order to look back and reference any previous close. For example, if you want to look back at the volume of 25 sessions ago on a 5-minute chart, you must have 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 volume.
Example
Assigns the Volume of the previous session on an intraday chart to Value1, then plots Value1:
Value1 = VolumeSession(0,1);
Plot1(Value1, "VolumeSession");
See Also
CloseSession, HighSession, LowSession, OpenSession, VolumeDay, VolumeMonth, VolumeWeek, and VolumeYear.