---
id: "E:cAlgo.API.RadioButton.Checked"
kind: "event"
type: "T:cAlgo.API.RadioButton"
url: "https://help.ctrader.com/ctrader-algo/references/Controls/RadioButton/Checked/"
---

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

# RadioButton.Checked

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

## Checked

Occurs when 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 event Action<RadioButtonEventArgs> Checked;
```

Python:

```python
radioButton.Checked += handler  # handler(obj: RadioButtonEventArgs)
```

### Returns

`Action<RadioButtonEventArgs>` — 

### Examples

C#:

```csharp
var sellRadioButton = new RadioButton { Text = "Sell", GroupName = "Direction" };
sellRadioButton.Checked += args => Print("Direction set to {0}", args.RadioButton.Text);
Chart.AddControl(sellRadioButton);
```

Python:

```python
def on_start(self):
    sellRadioButton = RadioButton()
    sellRadioButton.Text = "Sell"
    sellRadioButton.GroupName = "Direction"
    sellRadioButton.Checked += self.on_radio_button_checked
    api.Chart.AddControl(sellRadioButton)

def on_radio_button_checked(self, args):
    api.Print(f"Direction set to {args.RadioButton.Text}")
```

