Skip to content

ChartObjectHoverChangedEventArgs

class cAlgo.API

DesktopCLICloud

Provides data for the mouse hover over a chart object event.

Environment behaviour

CLI — not supported. Never raised in the CLI: the events that pass it never fire there (ChartArea.ObjectHoverChanged).

Cloud — not supported. Never raised in the cloud: the events that pass it never fire there (ChartArea.ObjectHoverChanged).

Definition

public class ChartObjectHoverChangedEventArgs : ChartObjectEventArgs

Namespace: cAlgo.API · Group: EventArgs · Inherits: ChartObjectEventArgs

Examples

using cAlgo.API;

namespace cAlgo
{
    // This example shows how to use the Chart ChartObjectHoverChangedEventArgs
    // ChartObjectHoverChangedEventArgs is derived from ChartObjectsEventArgs
    // Draw an object and move mouse over it
    public partial class ChartObjectHoverChangedEventArgsSample : Indicator
    {
        protected override void Initialize()
        {
            Chart.ObjectHoverChanged += Chart_ObjectHoverChanged;
        }

        private void Chart_ObjectHoverChanged(ChartObjectHoverChangedEventArgs obj)
        {
            Chart.DrawStaticText("hover", string.Format("Is Object Hovered: {0}", obj.IsObjectHovered), VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red);
        }

        public override void Calculate(int index)
        {
        }
    }
}
import clr
clr.AddReference("cAlgo.API")

from cAlgo.API import *

class Test():
    def initialize(self):
        api.Chart.ObjectHoverChanged += self.on_chart_object_hover_changed

    def on_chart_object_hover_changed(self, args):
        api.Chart.DrawStaticText("hover", f"Is Object Hovered: {args.IsObjectHovered}", VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red)
{
  "AccessRights": "None",
  "TimeZone": "UTC",
  "IsOverlay": true
}

Properties

Name Description
IsObjectHoveredDesktopCLICloudbool Defines if the mouse is hovered over the chart object.

Inherited members

From ChartObjectEventArgs: Chart, Area, ChartObject

See also