//Examples of all different LineStyles[Output("Dots", LineStyle = LineStyle.Dots)]publicIndicatorDataSeriesoutputDots{get;set;}[Output("DotsRare", LineStyle = LineStyle.DotsRare)]publicIndicatorDataSeriesoutputDotsRare{get;set;}[Output("DotsVeryRare", LineStyle = LineStyle.DotsVeryRare)]publicIndicatorDataSeriesoutputDotsVeryRare{get;set;}[Output("Lines", LineStyle = LineStyle.Lines)]publicIndicatorDataSeriesoutputLines{get;set;}[Output("LinesDots", LineStyle = LineStyle.LinesDots)]publicIndicatorDataSeriesoutputLinesDots{get;set;}[Output("Solid", LineStyle = LineStyle.Solid)]publicIndicatorDataSeriesoutputSolid{get;set;}
1 2 3 4 5 6 7 8 9101112131415161718192021
usingcAlgo.API;namespacecAlgo{// This sample indicator shows how to use different line styles[Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]publicclassLineStyleSample:Indicator{protectedoverridevoidInitialize(){Chart.DrawVerticalLine("Dots",Chart.LastVisibleBarIndex,Color.Red,3,LineStyle.Dots);Chart.DrawVerticalLine("DotsRare",Chart.LastVisibleBarIndex-2,Color.Yellow,3,LineStyle.DotsRare);Chart.DrawVerticalLine("DotsVeryRare",Chart.LastVisibleBarIndex-4,Color.Green,3,LineStyle.DotsVeryRare);Chart.DrawVerticalLine("Lines",Chart.LastVisibleBarIndex-6,Color.Blue,3,LineStyle.Lines);Chart.DrawVerticalLine("LinesDots",Chart.LastVisibleBarIndex-8,Color.Magenta,3,LineStyle.LinesDots);Chart.DrawVerticalLine("Solid",Chart.LastVisibleBarIndex-10,Color.Brown,3,LineStyle.Solid);}publicoverridevoidCalculate(intindex){}}}