Category Other  Published on 28/11/2020

user id

Description

Fetches the user id and displays it on your screen.


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.None)]
    public class userid : Indicator
    {
        [Parameter(DefaultValue = 0.0)]
        public double Parameter { get; set; }

        [Output("Main")]
        public IndicatorDataSeries Result { get; set; }


        protected override void Initialize()
        {
            Chart.DrawStaticText("text1", "Your user id is: " + this.Account.UserId.ToString(), VerticalAlignment.Center, HorizontalAlignment.Center, Color.Black);
            Chart.DrawStaticText("text2", "\n\nYour user id is: " + this.Account.UserId.ToString(), VerticalAlignment.Center, HorizontalAlignment.Center, Color.White);
        }

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


KA
Kafeldom

Joined on 09.03.2019

  • Distribution: Free
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: user id.algo
  • Rating: 0
  • Installs: 1053
  • Modified: 13/10/2021 09:54
Comments
Log in to add a comment.
No comments found.