Moving Average Envelopes

Contents[Hide]

The Moving Average Envelope functions compute a pair of data bands that envelop a moving average of the input data values.

Each data band is positioned a percentage-based magnitude away from the moving average line. The average line can be calculated using a simple moving average or an exponential moving average. Applications of the Moving Average Envelope functions include indication of overbought/oversold conditions and price trends for a security.

The mathematical expressions being calculated are as follows:

Upper = Moving Average * (1 + K)
Lower = Moving Average * (1 – K)

Where K is the indicated percentage-based factor.

Using MOVAVGEVPUPPER:

MOVAVGEVPUPPER
MOVAVGEVPUPPER

Using MOVAVGEVPLOWER:

MOVAVGEVPLOWER
MOVAVGEVPLOWER

Note
A similar envelope can be generated by the Bollinger Bands functions, which uses standard deviations instead of a percentage-based factor.

1. Syntax

Upper Envelope:

MOVAVGEVPUPPER(d0,s0,s1,s2,Alignment)

Lower Envelope:

MOVAVGEVPLOWER(d0,s0,s1,s2,Alignment)

2. Input

The Moving Average Envelope functions require the following input:

  • d0 - Input data values - The set of data values for which the MOVAVGEVPUPPER and MOVAVGEVPLOWER formulas are calculated.

3. Parameters

The Moving Average Envelope functions require the following parameters.

  • s0 - Moving Average Type - The type of moving average to use in the calculation. Valid values are:
    • 0 : Simple Moving Average (default)
    • 1 : Exponential Moving Average
  • s1 - Period - The number of time periods to use in the calculation. Default value is 10.
  • s2 - Envelope factor - The factor used to shift the bands away from the simple moving average. Default value is 2.5.
  • Alignment (Optional) – Hierarchy placeholder to be used as the alignment axis.

4. Output

The Moving Average Envelope functions generate the following output:

  • Upper Envelope - The Upper Envelope result set.
  • Lower Envelope - The Lower Envelope result set.

5. See also

Dundas Data Visualization, Inc.
400-15 Gervais Drive
Toronto, ON, Canada
M3C 1Y8

North America: 1.800.463.1492
International: 1.416.467.5100

Dundas Support Hours:
Phone: 9am-6pm, ET, Mon-Fri
Email: 7am-6pm, ET, Mon-Fri