---
id: "T:cAlgo.API.FrameAttachedEventArgs"
kind: "class"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/EventArgs/FrameAttachedEventArgs/"
---

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

# FrameAttachedEventArgs (class)

Provides data for the frame attached event.

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.

## Definition

```csharp
public class FrameAttachedEventArgs
```

## Examples

C#:

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

private void OnFrameAttached(FrameAttachedEventArgs args)
{
    Print("Frame {0} attached to container {1}", args.Frame.Id, args.Frame.ChartContainer?.Id);
}
```

Python:

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

def on_frame_attached(self, args):
    api.Print(f"Frame {args.Frame.Id} attached, is attached: {args.Frame.IsAttached}")
```

## Properties

- `public Frame Frame {get;}` — Returns the frame. [details](https://help.ctrader.com/ctrader-algo/references/EventArgs/FrameAttachedEventArgs/Frame/index.md)

