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

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

# CheckBox.IsChecked

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

## IsChecked

Gets or sets a value indicating whether the checkbox is checked.

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

- CLI: Accepted without error but never displayed, so control events such as Click are never raised.
- Cloud: Accepted without error but never displayed, so control events such as Click are never raised.

C#:

```csharp
public bool? IsChecked {get; set;}
```

Python:

```python
checkBox.IsChecked: bool | None
```

### Returns

`bool?` — 

### Examples

C#:

```csharp
var checkBox = new CheckBox { Text = "Close positions on stop" };
checkBox.Click += args => Print("Checked: {0}", args.CheckBox.IsChecked == true);
Chart.AddControl(checkBox);
```

Python:

```python
checkBox = CheckBox()
checkBox.Text = "Close positions on stop"
checkBox.Click += lambda args: api.Print(f"Checked: {args.CheckBox.IsChecked == True}")
api.Chart.AddControl(checkBox)
```

