ChartObjectsSelectionChangedEventArgs
class cAlgo.API
DesktopCLICloud
Provides data for the chart objects selecting or deselecting event.
Environment behaviour
CLI — not supported. Never raised in the CLI: the events that pass it never fire there (ChartArea.ObjectsSelectionChanged).
Cloud — not supported. Never raised in the cloud: the events that pass it never fire there (ChartArea.ObjectsSelectionChanged).
Definition
public class ChartObjectsSelectionChangedEventArgs
Namespace: cAlgo.API · Group: EventArgs
Examples
using cAlgo.API;
namespace cAlgo
{
// This example shows how to use the Chart ChartObjectsSelectionChangedEventArgs
// Draw an object, select it and unselect it
public partial 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)
{
}
}
}
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}")
{
"AccessRights": "None",
"TimeZone": "UTC",
"IsOverlay": true
}
Properties
| Name | Description |
|---|---|
AreaDesktopCLICloudChartArea | A chart area where event occured |
ChartDesktopCLICloudChart | A chart where event occured |
ObjectsAddedToSelectionDesktopCLICloudIReadonlyList<ChartObject> | A list of objects that were added to selection |
ObjectsRemovedFromSelectionDesktopCLICloudIReadonlyList<ChartObject> | A list of objects that were removed from selection |