Skip to content

ChartColorEventArgs

Summary

Provides data for the chart color event.

Signature

1
public class ChartColorEventArgs

Namespace

cAlgo.API

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
 using cAlgo.API;
 namespace cAlgo
 {
     // This example shows how to use the Chart ChartColorEventArgs
     [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
     public class ChartColorEventArgsSample : Indicator
     {
         protected override void Initialize()
         {
             Chart.ColorsChanged += Chart_ColorsChanged;
         }
         private void Chart_ColorsChanged(ChartColorEventArgs obj)
         {
             Print("Chart {0} {1} Color changed", obj.Chart.SymbolName, obj.Chart.TimeFrame);
         }
         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.ColorsChanged += self.on_chart_color_changed;
     def on_chart_color_changed(self, args):
         print(f"Chart {args.Chart.SymbolName} {args.Chart.TimeFrame} Color changed")

See Also

Properties

Chart

Summary

Gets the chart.

Signature

1
public Chart Chart {get;}

Return Value

Chart