Skip to content

ChartType

enum cAlgo.API

DesktopCLICloud

Represents the predefined chart types.

Definition

public enum ChartType

Namespace: cAlgo.API · Group: Chart

Examples

using cAlgo.API;

namespace cAlgo
{
    // This example shows how to use the Chart ChartIconType
    public partial 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)
        {
        }
    }
}
import clr
clr.AddReference("cAlgo.API")

from cAlgo.API import *

class Test():
    def show_chart_type(self):
        api.Chart.DrawStaticText("type", f"Type: {api.Chart.ChartType}", VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red)

    def initialize(self):
        self.show_chart_type()

        api.Chart.ChartTypeChanged += lambda _: self.show_chart_type()
{
  "AccessRights": "None",
  "TimeZone": "UTC",
  "IsOverlay": true
}

Values

Name Value Description
Bars 0 The Bar chart.
Candlesticks 1 The Candlestick chart.
Line 2 The Line chart.
Dots 3 The Dots chart.
Area 4 The Area chart.
Hlc 5 The HLC chart.

See also