Category Trend  Published on 07/03/2021

E7 ADXR

Description

Average Directional Movement Index Rating - ADXR, is a smoothed version of the Average Directional Index ( ADX ) which attempts to measure the strength of a price movement in positive and negative directions, as well as the strength of the trend.

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 E7ADXR : 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: Free
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: E7 ADXR.algo
  • Rating: 3.75
  • Installs: 1628
  • Modified: 13/10/2021 09:54
Comments
Log in to add a comment.
No comments found.