---
id: "P:cAlgo.API.Window.Top"
kind: "property"
type: "T:cAlgo.API.Window"
url: "https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/Top/"
---

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

# Window.Top

Member of [Window](https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/index.md).

## Top

Get / Set window top margin (Y)

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

- CLI: Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire.
- Cloud: Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire.

C#:

```csharp
public double Top {get; set;}
```

Python:

```python
window.Top: float
```

### Returns

`double` — 

### Examples

C#:

```csharp
var window = new Window { Title = "Alerts", Width = 250, Height = 150, Left = 50, Top = 300 };
window.Show();
Print("Top: {0}", window.Top);
```

Python:

```python
window = Window()
window.Title = "Alerts"
window.Width = 250
window.Height = 150
window.Left = 50
window.Top = 300
window.Show()
api.Print(f"Top: {window.Top}")
```

