Category Other  Published on 07/10/2020

30mingrids

Description

 


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 mingrids : Indicator
    {

        [Parameter("本数", DefaultValue = 30, MinValue = 1, MaxValue = 120)]
        public int count { get; set; }

        protected override void Initialize()
        {

        }

        public override void Calculate(int index)
        {
            var bars = MarketData.GetBars(TimeFrame.Minute30);

            for (int i = 0; i < count; i++)
            {
                Chart.DrawVerticalLine("grids" + i.ToString(), bars.OpenTimes.Last(i), "Gray", 1, 0);
            }
        }
    }
}


summer's avatar
summer

Joined on 10.08.2020

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