Skip to content

ChartObjectsSelectionChangedEventArgs

Summary

Provides data for the chart objects selecting or deselecting event.

Signature

1
public class ChartObjectsSelectionChangedEventArgs

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 ChartObjectsSelectionChangedEventArgs
     // Draw an object, select it and unselect it
     [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
     public class ChartObjectsSelectionChangedEventArgsSample : Indicator
     {
         protected override void Initialize()
         {
             Chart.ObjectsSelectionChanged += Chart_ObjectsSelectionChanged;
         }
         private void Chart_ObjectsSelectionChanged(ChartObjectsSelectionChangedEventArgs obj)
         {
             Print("Added objects #: {0} | Removed Objects #: {1}", obj.ObjectsAddedToSelection.Count, obj.ObjectsRemovedFromSelection.Count);
         }
         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.ObjectsSelectionChanged += self.on_chart_objects_selection_changed
     def on_chart_objects_selection_changed(self, args):
         print(f"Added objects #: {args.ObjectsAddedToSelection.Count} | Removed Objects #: {args.ObjectsRemovedFromSelection.Count}")

See Also

Properties

Chart

Summary

A chart where event occured

Signature

1
public Chart Chart {get;}

Return Value

Chart

Area

Summary

A chart area where event occured

Signature

1
public ChartArea Area {get;}

Return Value

ChartArea

ObjectsAddedToSelection

Summary

A list of objects that were added to selection

Signature

1
public IReadonlyList<ChartObject> ObjectsAddedToSelection {get;}

Return Value

IReadonlyList

ObjectsRemovedFromSelection

Summary

A list of objects that were removed from selection

Signature

1
public IReadonlyList<ChartObject> ObjectsRemovedFromSelection {get;}

Return Value

IReadonlyList