Skip to content

ChartTypeEventArgs

Summary

Provides data for the chart type change event.

Signature

1
public class ChartTypeEventArgs

Namespace

cAlgo.API

Examples

 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 example shows how to use the Chart ChartTypeEventArgs
     [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
     public class ChartTypeEventArgsSample : Indicator
     {
         protected override void Initialize()
         {
             Chart.ChartTypeChanged += Chart_ChartTypeChanged;
         }
         private void Chart_ChartTypeChanged(ChartTypeEventArgs obj)
         {
             var text = string.Format("Chart Type Changed To: {0}", obj.Chart.ChartType);
             Chart.DrawStaticText("type", text, VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red);
         }
         public override void Calculate(int index)
         {
         }
     }
 }
1
2
3
4
5
6
7
8
 import clr
 clr.AddReference("cAlgo.API")
 from cAlgo.API import *
 class Test():    
     def initialize(self):
         api.Chart.ChartTypeChanged += self.on_chart_type_changed
     def on_chart_type_changed(self, args):
         api.Chart.DrawStaticText("type", f"Chart Type Changed To: {args.Chart.ChartType}", VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red)

See Also

Properties

Chart

Summary

Gets the chart.

Signature

1
public Chart Chart {get;}

Return Value

Chart