Skip to content

ChartObjectsEventArgs

Summary

Provides data for the chart objects change event.

Signature

1
public abstract class ChartObjectsEventArgs

Namespace

cAlgo.API

Properties

Name Description
Chart { get; } Gets the chart.
Area { get; } Gets the chart area.
ChartObjects { get; } Gets chart objects.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
 using cAlgo.API;
 namespace cAlgo
 {
     // This example shows how to use the Chart ChartObjectsEventArgs
     // All chart objects related events args are derived from ChartObjectsEventArgs
     [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
     public class ChartObjectsEventArgsSample : Indicator
     {
         protected override void Initialize()
         {
             Chart.ObjectsRemoved += Chart_ObjectsRemoved;
         }
         private void Chart_ObjectsRemoved(ChartObjectsRemovedEventArgs obj)
         {
             var chartObjectsEventArgs = obj as ChartObjectsEventArgs;
             Print("{0} objects removed from chart", chartObjectsEventArgs.ChartObjects.Count);
         }
         public override void Calculate(int index)
         {
         }
     }
 }

See Also


Last update: December 8, 2022

Comments