Skip to content

ChartObjectsSelectionChangedEventArgs

Summary

Provides data for the chart objects selecting or deselecting event.

Signature

1
public class ChartObjectsSelectionChangedEventArgs

Namespace

cAlgo.API

Properties

Name Description
Chart { get; } A chart where event occured
Area { get; } A chart area where event occured
ObjectsAddedToSelection { get; } A list of objects that were added to selection
ObjectsRemovedFromSelection { get; } A list of objects that were removed from selection

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)
         {
         }
     }
 }

Last update: December 7, 2022

Comments