---
id: "M:cAlgo.API.NewOrderDialog.ShowDialog"
kind: "method"
type: "T:cAlgo.API.NewOrderDialog"
url: "https://help.ctrader.com/ctrader-algo/references/Dialogs/NewOrderDialog/ShowDialog/"
---

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

# NewOrderDialog.ShowDialog

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

## ShowDialog()

Shows the dialog.

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

- CLI: No dialog is shown. Returns normally, no exception.
- Cloud: No dialog is shown. Returns normally, no exception.

C#:

```csharp
public void ShowDialog()
```

Python:

```python
newOrderDialog.ShowDialog() -> None
```

Available since cAlgo.API 5.2.

### Examples

C#:

```csharp
var orderButton = new Button { Text = "New order" };
orderButton.Click += args => new NewOrderDialog { SymbolName = SymbolName, Volume = Symbol.QuantityToVolumeInUnits(0.01) }.ShowDialog();
Chart.AddControl(orderButton);
```

Python:

```python
newOrderDialog = NewOrderDialog()
newOrderDialog.SymbolName = api.SymbolName
newOrderDialog.Volume = api.Symbol.QuantityToVolumeInUnits(0.01)
orderButton = Button()
orderButton.Text = "New order"
orderButton.Click += lambda args: newOrderDialog.ShowDialog()
api.Chart.AddControl(orderButton)
```

