VolumeWeek (Function)
The VolumeWeek function allows you to reference the weekly Volume in an intraday (minute or tick-based), daily, or weekly chart .
VolumeWeek is part of a family of functions that allows historical daily, weekly, monthly, and yearly references in intraday charts.
Syntax
VolumeWeek(NumWeeksAgo)
Returns (Double)
A numeric value for the requested week. The function returns -1 for a data error and -2 for an unsupported chart type.
Parameters
Name |
Type |
Description |
NumWeeksAgo |
Numeric |
The number of weeks back to reference a previous weeks's volume. |
Remarks
You must have enough intraday data in the chart in order to look back and reference any previous volume. For example, if you want to look back at the volume of 25 weeks ago on a 5-minute chart, you must have 25 weeks of 5-minute bars in the chart.
The value for the NumWeeksAgo input parameter should always be a whole number greater than or equal to 0. Setting NumWeeksAgo to 0 equals the current weeks's volume.
Example
Assigns the Volume of the previous week on an intraday chart to Value1, then plots Value1:
Value1 = VolumeWeek(1);
Plot1(Value1, "VolumeWeek");
See Also
CloseSession, HighSession, LowSession, OpenSession, VolumeDay, VolumeMonth, VolumeYear, and VolumeSession.