Category Other  Published on 17/04/2023

Symbol and TF information as background

Description

Show Symbol name and Timeframe name as a chart background.

With multiple charts open, it was a hassle to see the tab name for Symbol name, so I created this small indicator to 

show the Symbol name and Timeframe as a chart background

The Font size and color are adjustable.

Let me know in comments for any updates.

 

 


using cAlgo.API;
using cAlgo.API.Internals;

namespace cAlgo
{
    [Indicator(AccessRights = AccessRights.None, IsOverlay = true)]
    public class AksBackgroundSymbolName : Indicator
    {
        [Parameter("Symbol Font Size", DefaultValue = 72)]
        public int SymbolFontSize { get; set; }

        [Parameter("Symbol Color", DefaultValue = "Gray")]
        public Color SymbolColor { get; set; }

        [Parameter("Timeframe Font Size", DefaultValue = 28)]
        public int TfFontSize { get; set; }

        [Parameter("Timeframe Color", DefaultValue = "Gray")]
        public Color TfColor { get; set; }

        [Parameter("Opacity", DefaultValue = 0.25, MaxValue = 1, MinValue = 0)]
        public double Opacity { get; set; }

        [Parameter("Horizontal Alignment", DefaultValue = HorizontalAlignment.Center)]
        public HorizontalAlignment HorAlign { get; set; }

        [Parameter("Vertical Alignment", DefaultValue = VerticalAlignment.Center)]
        public VerticalAlignment VerAlign { get; set; }


        protected override void Initialize()
        {
            TextBlock textBlock = new()
            {
                Text = Symbol.Name,
                FontSize = SymbolFontSize,
                ForegroundColor = SymbolColor,
                Opacity = Opacity,
                HorizontalAlignment = HorizontalAlignment.Center,
                VerticalAlignment = VerticalAlignment.Center,
            };

            TextBlock timeframe = new()
            {
                Text = Chart.TimeFrame.ShortName,
                FontSize = TfFontSize,
                ForegroundColor = TfColor,
                Opacity = Opacity,
                HorizontalAlignment = HorizontalAlignment.Center,
                VerticalAlignment = VerticalAlignment.Center,
            };

            Grid grid = new(2, 1);
            grid.AddChild(textBlock, 0, 0);
            grid.AddChild(timeframe, 1, 0);
            grid.HorizontalAlignment = HorAlign;
            grid.VerticalAlignment = VerAlign;
            grid.IsHitTestVisible = false;

            Chart.AddControl(grid);
        }

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

AK
aksbenz

Joined on 26.09.2020

  • Distribution: Free
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: Aks Background Symbol Name.algo
  • Rating: 5
  • Installs: 895
  • Modified: 17/04/2023 00:44
Comments
Log in to add a comment.
mirk0's avatar
mirk0 · 7 months ago

đź‘Ťđź‘Ť

CO
constantlygeneral · 1 year ago

Ghaziabad, which is considered to be the most modern state in India, is home to a number of different escort agencies; however, there are also escorts who are independent contractors. They really maintain accounts on web-based entertainment platforms, or they run their very own website or blog, both of which serve as channels via which you can communicate with them.

IP Extension Call Girls | dumb ways to die | Call Girls in Karol Bagh | Kaushambi Escorts | Escorts in Kavi Nagar | Lal Kuan Escorts Service |

O.
o.brownie1997 · 1 year ago

If you interested creative Lego creations or you collect own favorite Lego series, welcome to our Lego fan blog where you find latest news on Lego and more.

YA
yashikadut · 1 year ago

Ghaziabad being perhaps the greatest modern state in India has various escort services however there are likewise escorts who work autonomously. They really do have profiles via web-based entertainment or they own their own site or blog through which you can get in touch with them.

IP Extension Call Girls | Call Girls in Karol Bagh | Kaushambi Escorts | Escorts in Kavi Nagar | Lal Kuan Escorts Service |