VolumeMonth (Function)

image\trumpet2.gif Disclaimer

The VolumeMonth function allows you to reference the monthly Volume in an intraday, daily, weekly, or monthly chart (minute, second, or tick-based).

VolumeMonth is part of a family of functions that allows historical daily, weekly, monthly, and yearly references in intraday charts.

Syntax

VolumeMonth(NumMonthsAgo)

Returns (Double)

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

Parameters

Name

Type

Description

NumMonthsAgo

Numeric

The number of months back to reference a previous month's 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 months ago on a 5-minute chart, you must have 25 months of 5-minute bars in the chart.

The value for the NumMonthsAgo input parameter should always be a whole number greater than or equal to 0. Setting NumMonthsAgo to 0 equals the current month's volume.

Example

Assigns the Volume of the previous month on an intraday chart to Value1, then plots Value1:

Value1 = VolumeMonth(1);

Plot1(Value1, "VolumeMonth");

See Also

 CloseSessionHighSession, LowSession, OpenSession, VolumeDay, VolumeWeek, VolumeYear, and VolumeSession.