ChartIndicatorEventArgs
class cAlgo.API
DesktopCLICloud
The base class representing event args for a ChartIndicator.
Environment behaviour
Cloud — not supported. Never raised in the cloud: the ChartIndicators events never fire there.
Definition
public abstract class ChartIndicatorEventArgs
Namespace: cAlgo.API · Group: EventArgs
Examples
protected override void OnStart()
{
Chart.Indicators.IndicatorAdded += OnChartIndicatorEvent;
Chart.Indicators.IndicatorModified += OnChartIndicatorEvent;
Chart.Indicators.IndicatorRemoved += OnChartIndicatorEvent;
}
private void OnChartIndicatorEvent(ChartIndicatorEventArgs args)
{
Print("{0}: {1}", args.GetType().Name, args.Indicator.Name);
}
def on_start(self):
api.Chart.Indicators.IndicatorAdded += self.on_chart_indicator_event
api.Chart.Indicators.IndicatorModified += self.on_chart_indicator_event
api.Chart.Indicators.IndicatorRemoved += self.on_chart_indicator_event
def on_chart_indicator_event(self, args):
api.Print(f"{type(args).__name__}: {args.Indicator.Name}")
Properties
| Name | Description |
|---|---|
IndicatorDesktopCLICloudChartIndicator | Gets the ChartIndicator that raised an event. |