---
id: "P:cAlgo.API.FrameDetachedEventArgs.Frame"
kind: "property"
type: "T:cAlgo.API.FrameDetachedEventArgs"
url: "https://help.ctrader.com/ctrader-algo/references/EventArgs/FrameDetachedEventArgs/Frame/"
---

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

# FrameDetachedEventArgs.Frame

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

## Frame

Returns the frame.

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
public Frame Frame {get;}
```

Python:

```python
frameDetachedEventArgs.Frame: Frame
```

### Returns

`Frame` — 

### Examples

C#:

```csharp
protected override void OnStart()
{
    var frame = ChartManager.AddChartFrame("EURUSD", TimeFrame.Hour);
    frame.Detached += OnFrameDetached;
}

private void OnFrameDetached(FrameDetachedEventArgs args)
{
    if (!args.Frame.IsAttached)
        args.Frame.Attach();
}
```

Python:

```python
def on_start(self):
    frame = api.ChartManager.AddChartFrame("EURUSD", TimeFrame.Hour)
    frame.Detached += self.on_frame_detached

def on_frame_detached(self, args):
    if not args.Frame.IsAttached:
        args.Frame.Attach()
```

