Skip to content

ChartObjectsEventArgs

class cAlgo.API

DesktopCLICloud

Provides data for the chart objects change event.

Definition

public abstract class ChartObjectsEventArgs

Namespace: cAlgo.API · Group: EventArgs

Examples

using cAlgo.API;

namespace cAlgo
{
    // This example shows how to use the Chart ChartObjectsEventArgs
    // All chart objects related events args are derived from ChartObjectsEventArgs
    public partial 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)
        {
        }
    }
}
import clr
clr.AddReference("cAlgo.API")

from cAlgo.API import *

class Test():
    def initialize(self):
        api.Chart.ObjectsRemoved += self.on_chart_objects_removed

    def on_chart_objects_removed(self, args):
        print(f"{args.ChartObjects.Count} objects removed from chart")
{
  "AccessRights": "None",
  "TimeZone": "UTC",
  "IsOverlay": true
}

Properties

Name Description
AreaDesktopCLICloudChartArea Gets the chart area.
ChartDesktopCLICloudChart Gets the chart.
ChartObjectsDesktopCLICloudIReadonlyList<ChartObject> Gets chart objects.

See also