Moving Average Envelope


Function Name: moving_average_envelope

Tags: Moving Average, SMA

Category: Trend

Moving Average Envelopes consist of a moving average plus and minus a certain user defined percentage deviation. The inputs of the Moving Average Envelopes indicator is shared below: 1.Moving Average: A simple moving average of both the highs and the lows. (generally 20-period, but varies among technical analysts; also, a person could use only the close when calculating the moving average, rather than two)

2.Upper Band: The moving average of the highs plus a user defined percentage increase (usually between 1 & 10%).

3.Lower Band: The moving average of the lows minus a user defined percentage (again, usually between 1 & 10%).

A trading band composed of two moving averages, one of which is shifting upwards and the other shifting downwards.

These trading bands are used by technical analysts to define a stock's upper and lower boundaries. Signals to sell occur when the stock price reaches the upper band, and buy signals are generated when the price reaches the lower band.

The reasoning behind the sell and buy signals is that stock prices tend to bounce off the bands. Even though buyers and sellers will temporarily pressure a stock's price to its extremes, it should re-stabilize to more realistic levels found within the envelope.



Period: Period for the SMA

UpperBandPercent: How much will the SMA(Close) or SMA(High) be shifted up, given in percent.

LowerBandPercent: How much will the SMA(Close) or SMA(Low) be shifted down, given in percent.

UseClose: Flag that sets whether to use Close (if True) or High and Low (if False) to calculate the SMA and envelopes.

ShowMA, ShowEnvelopes, ShowTraderMark: Display flags.

Read more:





Default Value: 10  |  Minimum: 1  |  Maximum: 9999


Type: Numeric



Default Value: 5  |  Minimum: 0  |  Maximum: 100


Type: Numeric



Default Value: 5  |  Minimum: 0  |  Maximum: 100


Type: Numeric


use Close or High and Low?


Default Value: -1


Type: Boolean



Default Value: -1


Type: Boolean



Default Value: -1


Type: Boolean



Default Value: 0


Type: Boolean