Skip to content

ChartColorEventArgs

class cAlgo.API

DesktopCLICloud

Provides data for the chart color event.

Environment behaviour

Cloud — not supported. Never raised in the cloud: the events that pass it never fire there (Chart.ColorsChanged).

Definition

public class ChartColorEventArgs

Namespace: cAlgo.API · Group: EventArgs

Examples

using cAlgo.API;

namespace cAlgo
{
    // This example shows how to use the Chart ChartColorEventArgs
    public partial 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)
        {
        }
    }
}
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")
{
  "AccessRights": "None",
  "TimeZone": "UTC",
  "IsOverlay": true
}

Properties

Name Description
ChartDesktopCLICloudChart Gets the chart.

See also