AN Top Bar Trading Controls +some tricks paid

Description

Download and read more about Top Bar functions at  www.coderias.com/p/trading-panel.html

Warning! Executing the following cBot may result in loss of funds. Use it at your own risk.
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: cAlgo
´╗┐using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
using cAlgo.Indicators;

namespace cAlgo
{
    [Indicator(IsOverlay = true, AutoRescale = false, AccessRights = AccessRights.FullAccess)]

    public class coderias : Indicator
    {

        [Parameter("AN Trading Tools", DefaultValue = "Coderias.com")]
        public string Parameter { get; set; }
        private ControlBase panel;

        protected override void Initialize()
        {
            Interface();
        }

        private ControlBase CreatePanel()
        {
            var panel = new StackPanel 
            {
                Orientation = Orientation.Horizontal,
                BackgroundColor = "#1c2124"
            };
            var panelBorder = new Border 
            {
                Opacity = 0.8,
                Margin = 5
            };
            panel.AddChild(MiddleBody());

            var Xbutton = new Button 
            {
                Text = "X",
                Style = Styles.Closebs(),
                ForegroundColor = "#aab8bf",
                VerticalAlignment = VerticalAlignment.Top,
                HorizontalAlignment = HorizontalAlignment.Left
            };
            Xbutton.Click += e => Chart.RemoveControl(panel);
            panel.AddChild(Xbutton);
            return panel;
        }

        private StackPanel MiddleBody()
        {
            var contentPanel = new StackPanel 
            {
                Orientation = Orientation.Vertical,
                BackgroundColor = "#26363e",
                Margin = "0 0 5 0"
            };
            var grid = new Grid(10, 10);

            var titleBox = new StackPanel 
            {
                BackgroundColor = "#2b3136",
                Margin = "5 0 5 15",
                Height = 20
            };
            var titleLable = new TextBlock 
            {
                VerticalAlignment = VerticalAlignment.Center,
                HorizontalAlignment = HorizontalAlignment.Center,
                Text = "CODERIAS.COM",
                ForegroundColor = "#aab8bf",
                Margin = "35 5 35 5"
            };
            titleBox.AddChild(titleLable);
            grid.AddChild(titleBox, 0, 0);

            var text = new TextBlock 
            {
                VerticalAlignment = VerticalAlignment.Center,
                HorizontalAlignment = HorizontalAlignment.Center,
                Text = "This algo available only from my site",
                ForegroundColor = "#aab8bf",
                Margin = "15 5 15 5"
            };
            grid.AddChild(text, 1, 0);

            var text1 = new TextBlock 
            {
                VerticalAlignment = VerticalAlignment.Center,
                HorizontalAlignment = HorizontalAlignment.Center,
                Text = "you will see download list at the right side panel.",
                ForegroundColor = "#aab8bf",
                Margin = "15 5 15 5"
            };
            grid.AddChild(text1, 2, 0);

            var page1 = new Button 
            {
                HorizontalAlignment = HorizontalAlignment.Center,
                ForegroundColor = "#aab8bf",
                Style = Styles.GetButtonStyle(),
                Text = "Visit site homepage with Download List",
                Margin = "4 4 4 4",
                Width = 220
            };
            page1.Click += e => System.Diagnostics.Process.Start("https://www.coderias.com");
            grid.AddChild(page1, 3, 0);

            var text2 = new TextBlock 
            {
                VerticalAlignment = VerticalAlignment.Center,
                HorizontalAlignment = HorizontalAlignment.Center,
                Text = "or use direct links at favorite tools :",
                ForegroundColor = "#aab8bf",
                Margin = "15 55 15 5"
            };
            grid.AddChild(text2, 3, 4);

            var page2 = new Button 
            {
                HorizontalAlignment = HorizontalAlignment.Center,
                ForegroundColor = "#aab8bf",
                Style = Styles.GetButtonStyle(),
                Text = "cTrader Telegram Communic",
                Margin = "4 4 4 4",
                Width = 220
            };
            page2.Click += e => System.Diagnostics.Process.Start("https://www.coderias.com/p/ctrader-telegram-push.html");
            grid.AddChild(page2, 4, 4);

            var page3 = new Button 
            {
                HorizontalAlignment = HorizontalAlignment.Center,
                ForegroundColor = "#aab8bf",
                Style = Styles.GetButtonStyle(),
                Text = "Direction Correction Target Indicator",
                Margin = "4 4 4 4",
                Width = 220
            };
            page3.Click += e => System.Diagnostics.Process.Start("https://www.coderias.com/p/direction-correction-target.html");
            grid.AddChild(page3, 5, 4);

            var page4 = new Button 
            {
                HorizontalAlignment = HorizontalAlignment.Center,
                ForegroundColor = "#aab8bf",
                Style = Styles.GetButtonStyle(),
                Text = "StochRSI Waves Resonance",
                Margin = "4 4 4 24",
                Width = 220
            };
            page3.Click += e => System.Diagnostics.Process.Start("https://www.coderias.com/p/stoch-rsi-waves-resonance.html");
            grid.AddChild(page4, 6, 4);

            var contact = new TextBlock 
            {
                VerticalAlignment = VerticalAlignment.Center,
                HorizontalAlignment = HorizontalAlignment.Center,
                Text = "by Alex Neil ",
                ForegroundColor = "#aab8bf",
                Margin = "15 25 15 5"
            };
            grid.AddChild(contact, 8, 0);

            var tme = new Button 
            {
                HorizontalAlignment = HorizontalAlignment.Right,
                ForegroundColor = "#aab8bf",
                Style = Styles.GetButtonStyle(),
                Text = "Telegram Contact : t.me/coderias",
                Margin = "15 25 15 5",
                Width = 220
            };
            page3.Click += e => System.Diagnostics.Process.Start("https://t.me/coderias");
            grid.AddChild(tme, 8, 4);

                        /*var image = new Image 
            {
                Source = Resource1.intro,
                Stretch = Stretch.UniformToFill,
                Width = 380,
                VerticalAlignment = VerticalAlignment.Center,
                HorizontalAlignment = HorizontalAlignment.Right,
                Margin = "0 0 15 0"
            };
            grid.AddChild(image, 1, 4, 7, 2);
*/

contentPanel.AddChild(grid);
            return contentPanel;
        }
        private void Interface()
        {
            panel = new Border 
            {
                VerticalAlignment = VerticalAlignment.Center,
                HorizontalAlignment = HorizontalAlignment.Center,
                Margin = "20 30 20 20",
                Child = CreatePanel()
            };
            Chart.AddControl(panel);
        }

        public static class Styles
        {
            public static Style GetButtonStyle()
            {
                return CreateButtonStyle(Color.FromHex("#232e3a"), Color.FromHex("#25394d"));
            }
            public static Style Closebs()
            {
                return CreateButtonStyle(Color.FromHex("#26363e"), Color.FromHex("#232e3a"));
            }
            private static Style CreateButtonStyle(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);
                style.Set(ControlProperty.ForegroundColor, Color.FromHex("#FFFFFF"), ControlState.DarkTheme);
                style.Set(ControlProperty.ForegroundColor, Color.FromHex("#FFFFFF"), ControlState.LightTheme);
                return style;
            }
        }

        public override void Calculate(int index)
        {
            //--
        }

    }
}
Comments
0