Moving Average Envelopes
This applies to: Managed Dashboards, Managed Reports
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 MOVAVAVGEPUPPER:
Using MOVAVGEVPLOWER:
Note: A similar envelope can be generated by the Bollinger Bands functions, which uses standard deviations instead of a percentage-based factor.
Syntax
Upper Envelope:
MOVAVGEVPUPPER(d0, 50, 51, 52, Alignment)
Lower Envelope:
MOVAVGEVPLOWER(d0, 50, 51, 52, Alignment)
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.
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.
Output
The Moving Average Envelope functions generate the following output:
Upper Envelope - The Upper Envelope result set.
Lower Envelope - The Lower Envelope result set.
For more information, see:
Comments
0 comments
Please sign in to leave a comment.