---
id: "M:cAlgo.API.Frame.Detach"
kind: "method"
type: "T:cAlgo.API.Frame"
url: "https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/Frame/Detach/"
---

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

# Frame.Detach

Member of [Frame](https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/Frame/index.md).

## Detach()

Detaches frame from it is chart container.

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

- CLI: Available to plugins only, and plugins cannot run in the CLI.
- Cloud: Available to plugins only, and plugins cannot run in the cloud.

C#:

```csharp
bool Detach()
```

Python:

```python
frame.Detach() -> bool
```

### Returns

`bool` — True if successful otherwise false

### Examples

C#:

```csharp
var chartFrame = ChartManager.AddChartFrame("EURUSD", TimeFrame.Hour);
Print("Detached: {0}, is attached now: {1}", chartFrame.Detach(), chartFrame.IsAttached);
```

Python:

```python
chartFrame = api.ChartManager.AddChartFrame("EURUSD", TimeFrame.Hour)
api.Print(f"Detached: {chartFrame.Detach()}, is attached now: {chartFrame.IsAttached}")
```

