Category Other  Published on 18/12/2015

Bar ID's

Description

This is rather a very simple indicator. It display's the index id of a specific bar ranging from 0 up to the current (last) bar..
This can be used if you want to visualize the bar id's during visual debugging of your algo.


using cAlgo.API;


namespace cAlgo.Indicators
{
    [Indicator(IsOverlay = true, AccessRights = AccessRights.None)]
    public class BarIDs : Indicator
    {
        [Parameter(DefaultValue = 0.0012, MinValue = 0.0001)]
        public double dblSpacing { get; set; }


        public override void Calculate(int index)
        {
            ChartObjects.DrawText(string.Concat("id-", index), (index).ToString(), index, MarketSeries.High.Last(0) + dblSpacing);
        }
    }
}


.I
.ics

Joined on 10.03.2015

  • Distribution: Free
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: BarIDs.algo
  • Rating: 0
  • Installs: 2656
  • Modified: 13/10/2021 09:54
Comments
Log in to add a comment.
SP
Spawn666 · 8 years ago

there any way to do so that only count for periods?