---
id: "E:cAlgo.API.ChartArea.MouseMove"
kind: "event"
type: "T:cAlgo.API.ChartArea"
url: "https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/MouseMove/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# ChartArea.MouseMove

Member of [ChartArea](https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/index.md).

## MouseMove

Occurs when the cursor moves over the chart area.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Never raised: no chart is displayed, so there is nothing to interact with.
- Cloud: Never raised: no chart is displayed, so there is nothing to interact with.

C#:

```csharp
event Action<ChartMouseEventArgs> MouseMove;
```

Python:

```python
chartArea.MouseMove += handler  # handler(obj: ChartMouseEventArgs)
```

### Returns

`Action<ChartMouseEventArgs>` — 

### Examples

C#:

```csharp
protected override void OnStart()
{
    Chart.MouseMove += OnChartMouseMove;
}

private void OnChartMouseMove(ChartMouseEventArgs args)
{
    Chart.DrawStaticText("cursor", string.Format("{0} | {1}", args.TimeValue, args.YValue), VerticalAlignment.Top, HorizontalAlignment.Left, Color.White);
}
```

Python:

```python
def on_start(self):
    api.Chart.MouseMove += self.on_chart_mouse_move

def on_chart_mouse_move(self, args):
    api.Chart.DrawStaticText("cursor", f"{args.TimeValue} | {args.YValue}", VerticalAlignment.Top, HorizontalAlignment.Left, Color.White)
```

