Skip to content

LineStyle

Summary

An enumeration of different stroke styles used to render lines.

Signature

1
public enum LineStyle

Namespace

cAlgo.API

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 //Examples of all different LineStyles
 [Output("Dots", LineStyle = LineStyle.Dots)]
 public IndicatorDataSeries outputDots { get; set; }
 [Output("DotsRare", LineStyle = LineStyle.DotsRare)]
 public IndicatorDataSeries outputDotsRare { get; set; }
 [Output("DotsVeryRare", LineStyle = LineStyle.DotsVeryRare)]
 public IndicatorDataSeries outputDotsVeryRare { get; set; }
 [Output("Lines", LineStyle = LineStyle.Lines)]
 public IndicatorDataSeries outputLines { get; set; }
 [Output("LinesDots", LineStyle = LineStyle.LinesDots)]
 public IndicatorDataSeries outputLinesDots { get; set; }
 [Output("Solid", LineStyle = LineStyle.Solid)]
 public IndicatorDataSeries outputSolid { get; set; }
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
 using cAlgo.API;
 namespace cAlgo
 {
     // This sample indicator shows how to use different line styles
     [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
     public class LineStyleSample : Indicator
     {
         protected override void Initialize()
         {
             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);
         }
         public override void Calculate(int index)
         {
         }
     }
 }

Fields

Solid

Summary

A solid line: -----

Signature

1
public static LineStyle Solid;

Return Value

LineStyle

Examples

1
2
 [Output("Solid", LineStyle = LineStyle.Solid)]
 public IndicatorDataSeries outputSolid { get; set; }

Dots

Summary

A dotted line: .....

Signature

1
public static LineStyle Dots;

Return Value

LineStyle

Examples

1
2
 [Output("Dots", LineStyle = LineStyle.Dots)]
 public IndicatorDataSeries outputDots { get; set; }

DotsRare

Summary

A dotted line, large gap between dots: . . . .

Signature

1
public static LineStyle DotsRare;

Return Value

LineStyle

Examples

1
2
 [Output("DotsRare", LineStyle = LineStyle.DotsRare)]
 public IndicatorDataSeries outputDotsRare { get; set; }

DotsVeryRare

Summary

A dotted line, extra large gap between dots: . . . .

Signature

1
public static LineStyle DotsVeryRare;

Return Value

LineStyle

Examples

1
2
 [Output("DotsVeryRare", LineStyle = LineStyle.DotsVeryRare)]
 public IndicatorDataSeries outputDotsVeryRare { get; set; }

LinesDots

Summary

A mixed line / dot style is used to render the line: - . - . - .

Signature

1
public static LineStyle LinesDots;

Return Value

LineStyle

Examples

1
2
 [Output("LinesDots", LineStyle = LineStyle.LinesDots)]
 public IndicatorDataSeries outputLinesDots { get; set; }

Lines

Summary

Lines with gaps are used to render the line: - - - -

Signature

1
public static LineStyle Lines;

Return Value

LineStyle

Examples

1
2
 [Output("Lines", LineStyle = LineStyle.Lines)]
 public IndicatorDataSeries outputLines { get; set; }