Code Help
Created at 03 Feb 2018, 20:36
Code Help
03 Feb 2018, 20:36
Could anyone change this code so that this indicator displays dotted lines? It currently displays bold lines if which clutter the screen.
Thanks in advance to any help given.
using System; using cAlgo.API; namespace cAlgo.Indicators { [Indicator(IsOverlay = true, AccessRights = AccessRights.None)] public class RoundNumbers : Indicator { [Parameter(DefaultValue = 25)] public int StepPips { get; set; } protected override void Initialize() { double max = MarketSeries.High.Maximum(MarketSeries.High.Count); double min = MarketSeries.Low.Minimum(MarketSeries.Low.Count); double step = Symbol.PipSize * StepPips; double start = Math.Floor(min / step) * step; for (double level = start; level <= max + step; level += step) { ChartObjects.DrawHorizontalLine("line_" + level, level, Colors.DarkGreen); } } public override void Calculate(int index) { } } }
PanagiotisCharalampous
05 Feb 2018, 11:39
Hi Storm31,
You can use PlotType to achieve this.
Best Regards,
Panagiotis
@PanagiotisCharalampous