Category Volatility  Published on 23/11/2021

E7 Bollinger Band Cloud

Description

From E7 Trading, Bollinger Bands as a cloud as requested by some on here. As usual, please find the 30min, 1hr and 4hr examples to give you an idea of what it will look like on your charts. Hope you find this helpful, regards.

Download the Indicator

Watch a live stream here

The pictures below are examples of a 30min, 1hr and 4hr chart respectively.

 

 


using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
using cAlgo.Indicators;

namespace cAlgo
{

    [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]
    public class E7BollingerBandCloud : Indicator
    {

        private string url = "https://www.e7harmonics.com/e7qnet";

        private string title = "your E7 Indicator securely here";

        protected override void Initialize()
        {

            string buttonText = "Download " + title;

            var background = new Rectangle 
            {
                Height = Chart.Height,
                Width = Chart.Width
            };

            var button = new Button 
            {
                Text = buttonText,
                Padding = "16",

                Style = ButtonStyle(Color.FromHex("#009345"), Color.FromHex("#10A651"))
            };

            button.Click += e => System.Diagnostics.Process.Start(url);

            var container = new StackPanel 
            {
                HorizontalAlignment = HorizontalAlignment.Center,
                VerticalAlignment = VerticalAlignment.Center
            };

            container.AddChild(button);

            Chart.AddControl(container);

            Print(title);
            Print(url);

            string structuretext = string.Format("E7 Trading");
            ChartObjects.DrawText("", "\t" + structuretext, StaticPosition.TopLeft, Colors.Lime);

        }

        public override void Calculate(int index)
        {

        }

        private Style ButtonStyle(Color color, Color hoverColor)
        {
            var style = new Style(DefaultStyles.ButtonStyle);
            style.Set(ControlProperty.BackgroundColor, color, ControlState.DarkTheme);
            style.Set(ControlProperty.BackgroundColor, color, ControlState.LightTheme);
            style.Set(ControlProperty.BackgroundColor, hoverColor, ControlState.DarkTheme | ControlState.Hover);
            style.Set(ControlProperty.BackgroundColor, hoverColor, ControlState.LightTheme | ControlState.Hover);

            return style;
        }

        private Color GetColorWithOpacity(Color baseColor, decimal opacity)
        {
            var alpha = (int)Math.Round(byte.MaxValue * opacity, MidpointRounding.AwayFromZero);
            return Color.FromArgb(alpha, baseColor);
        }
    }
}


Gwave's avatar
Gwave

Joined on 26.10.2014

  • Distribution: Paid
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: E7 Bollinger Band Cloud.algo
  • Rating: 5
  • Installs: 1017
Comments
Log in to add a comment.
No comments found.