Skip to content

ChartMouseEventArgs

Summary

Provides data for the mouse related routed events.

Signature

1
public class ChartMouseEventArgs

Namespace

cAlgo.API

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 ChartMouseEventArgs
     [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
     public class ChartMouseEventArgsSample : Indicator
     {
         protected override void Initialize()
         {
             Chart.MouseMove += Chart_MouseMove; ;
         }
         private void Chart_MouseMove(ChartMouseEventArgs obj)
         {
             var text = string.Format("Mouse Location: ({0}, {1})", obj.MouseX, obj.MouseY);
             Chart.DrawStaticText("mouse", text, VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red);
         }
         public override void Calculate(int index)
         {
         }
     }
 }

See Also

Properties

Chart

Summary

Gets the chart.

Signature

1
public Chart Chart {get;}

Return Value

Chart

ChartArea

Summary

Gets the chart area.

Signature

1
public ChartArea ChartArea {get;}

Return Value

ChartArea

MouseX

Summary

Gets the X-axis value of the mouse event.

Signature

1
public double MouseX {get;}

Return Value

double

MouseY

Summary

Gets the Y-axis value of the mouse event.

Signature

1
public double MouseY {get;}

Return Value

double

TimeValue

Summary

Gets the time value on the X-axis where the mouse event occurs.

Signature

1
public DateTime TimeValue {get;}

Return Value

DateTime

BarIndex

Summary

Gets the exact bar index of the mouse event.

Signature

1
public double BarIndex {get;}

Return Value

double

YValue

Summary

Gets the Y-axis value of the mouse event.

Signature

1
public double YValue {get;}

Return Value

double

CtrlKey

Summary

Defines whether the Ctrl key is pressed during the mouse event.

Signature

1
public bool CtrlKey {get;}

Return Value

bool

ShiftKey

Summary

Defines whether the Shift key is pressed during the mouse event.

Signature

1
public bool ShiftKey {get;}

Return Value

bool

AltKey

Summary

Defines whether the Alt key is pressed during the mouse event.

Signature

1
public bool AltKey {get;}

Return Value

bool