E7 Polynomial Regression Bands paid

by Gwave in category Volatility at 20/02/2021
Description

This is a smoothed version of the standard polynomial regression channels. This allows for better analysis as taught in the E7 strategy.

Download the Indicator

Watch a live stream here

 

 

 

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 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 E7PolynomialRegressionBands : 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);
        }
    }
}
Comments
0