---
id: "T:cAlgo.API.ChartObjectsMovingEventArgs"
kind: "class"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectsMovingEventArgs/"
---

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

# ChartObjectsMovingEventArgs (class)

Provides data for the chart objects moving event.

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

- CLI: Never raised in the CLI: the events that pass it never fire there (ChartArea.ObjectsMoving).
- Cloud: Never raised in the cloud: the events that pass it never fire there (ChartArea.ObjectsMoving).

## Definition

```csharp
public class ChartObjectsMovingEventArgs : ChartObjectsEventArgs
```

Available since cAlgo.API 5.2.

## Examples

C#:

```csharp
protected override void OnStart()
{
    Chart.ObjectsMoving += OnChartObjectsMoving;
}

private void OnChartObjectsMoving(ChartObjectsMovingEventArgs args)
{
    foreach (var chartObject in args.ChartObjects)
    {
        if (chartObject is ChartHorizontalLine line)
            Chart.DrawStaticText("movingPrice", "Line price: " + line.Y, VerticalAlignment.Top, HorizontalAlignment.Right, Color.White);
    }
}
```

Python:

```python
def on_start(self):
    api.Chart.ObjectsMoving += self.on_chart_objects_moving

def on_chart_objects_moving(self, args):
    for chartObject in args.ChartObjects:
        api.Chart.DrawStaticText("movingObject", f"Moving: {chartObject.Name}", VerticalAlignment.Top, HorizontalAlignment.Right, Color.White)
```

## Inherited members

- `public Chart Chart {get;}` (from ChartObjectsEventArgs) [details](https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectsEventArgs/Chart/index.md)
- `public ChartArea Area {get;}` (from ChartObjectsEventArgs) [details](https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectsEventArgs/Area/index.md)
- `public IReadonlyList<ChartObject> ChartObjects {get;}` (from ChartObjectsEventArgs) [details](https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectsEventArgs/ChartObjects/index.md)

