Skip to content

ChartType

Summary

Represents the predefined chart types.

Signature

1
public enum ChartType

Namespace

cAlgo.API

Fields

Name Description
Bars The Bar chart.
Candlesticks The Candlestick chart.
Line The Line chart.
Dots The Dots chart.
Area The Area chart.
Hlc The HLC chart.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 using cAlgo.API;
 namespace cAlgo
 {
     // This example shows how to use the Chart ChartIconType
     [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
     public class ChartTypeSample : Indicator
     {
         protected override void Initialize()
         {
             ShowChartType();
             Chart.ChartTypeChanged += Chart_ChartTypeChanged;
         }
         private void Chart_ChartTypeChanged(ChartTypeEventArgs obj)
         {
             ShowChartType();
         }
         private void ShowChartType()
         {
             Chart.DrawStaticText("type", string.Format("Type: {0}", Chart.ChartType), VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red);
         }
         public override void Calculate(int index)
         {
         }
     }
 }

See Also


Last update: July 1, 2022

Comments