---
id: "P:cAlgo.API.ChartScrollEventArgs.TopYDelta"
kind: "property"
type: "T:cAlgo.API.ChartScrollEventArgs"
url: "https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartScrollEventArgs/TopYDelta/"
---

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

# ChartScrollEventArgs.TopYDelta

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

## TopYDelta

Gets the highest value of the bars delta.

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

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

C#:

```csharp
public double TopYDelta {get;}
```

Python:

```python
chartScrollEventArgs.TopYDelta: float
```

### Returns

`double` — The top y delta.

### Examples

C#:

```csharp
protected override void OnStart()
{
    Chart.ScrollChanged += OnChartScrollChanged;
}

private void OnChartScrollChanged(ChartScrollEventArgs args)
{
    Print("Top Y changed by {0}, new top Y: {1}", args.TopYDelta, args.ChartArea.TopY);
}
```

Python:

```python
def on_start(self):
    api.Chart.ScrollChanged += self.on_chart_scroll_changed

def on_chart_scroll_changed(self, args):
    api.Print(f"Top Y changed by {args.TopYDelta}, new top Y: {args.ChartArea.TopY}")
```

