Envelopes free

by longshot in category Trend at 31/05/2013

Moving Average Envelopes are percentage-based envelopes set above and below a moving average. The moving average, which forms the base for this indicator, can be a simple or exponential moving average. Each envelope is then set the same percentage above or below the moving average. This creates parallel bands that follow price action. With a moving average as the base, Moving Average Envelopes can be used as a trend following indicator. However, this indicator is not limited to just trend following. The envelopes can also be used to identify overbought and oversold levels when the trend is relatively flat.

Notification Publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section you may use the Copyright Infringement Notification form to submit a claim.
Formula / Source Code
Language: C#
Trading Platform: cAlgocTrader
using cAlgo.API;
using cAlgo.API.Indicators;

namespace cAlgo.Indicators
    [Indicator(IsOverlay = true, AccessRights = AccessRights.None)]
    public class EnvelopeChannels : Indicator
        private int Period = 10;
        private MovingAverage expo;

        [Parameter(DefaultValue = 20)]
        public int EnvelopePeriod { get; set; }

        [Parameter(DefaultValue = 0.5)]
        public double BandDistance { get; set; }

        public IndicatorDataSeries EnvelopeMain { get; set; }

        [Output("ChannelUp", Color = Colors.Red)]
        public IndicatorDataSeries ChannelUp { get; set; }

        [Output("ChannelLow", Color = Colors.Blue)]
        public IndicatorDataSeries ChannelLow { get; set; }

        public MovingAverageType matype { get; set; }

        protected override void Initialize()
            expo = Indicators.MovingAverage(MarketSeries.Close, EnvelopePeriod, matype);

        public override void Calculate(int index)
            EnvelopeMain[index] = expo.Result[index];
            ChannelUp[index] = expo.Result[index] + (expo.Result[index] * BandDistance) / 100;
            ChannelLow[index] = expo.Result[index] - (expo.Result[index] * BandDistance) / 100;

Hugo - May 16, 2014 @ 04:04

Is there a way to prevent the envelope indicator auto-scaling the chart? 

Spotware - May 16, 2014 @ 09:28

Yes, you can specify AutoRescale = false for Indicator attribute

usynn - June 19, 2015 @ 06:43

can you put in a standard deviation like in MT4?

ironmine - June 17, 2016 @ 13:59

Is it possible to make an auto envelope out of this indicator? Automatically narrowing or widening, so that the width of the channel would always contain inside 95% of the prices? Thanks.

KirillKharchenko - December 11, 2016 @ 20:48

What about autosizing, when I change the time frame from D1 to h1 or less, diagrams are very thin. How to fix it?

getting - January 17, 2017 @ 16:51

Someone please make an Envelopes EA please......

getting - January 17, 2017 @ 17:19

with trailing SL

MRS200316 - June 27, 2019 @ 22:46


How can I put more levels?

Best Regard´s

ctid548434 - October 23, 2019 @ 23:43

Please can someone build it with an alerts like someone has done for mt4? (found on FF)

debnoblique1982oblique - April 29, 2022 @ 08:56

This indicator allows you to set popup, sound, email, and Telegram alert notifications for trend, ray, horizontal, and vertical lines.


concrete driveway contractor