---
id: "M:cAlgo.API.ChartManager.AddCustomFrame(System.String)"
kind: "method"
type: "T:cAlgo.API.ChartManager"
url: "https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartManager/AddCustomFrame/"
---

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

# ChartManager.AddCustomFrame

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

## AddCustomFrame(string title)

Adds a new custom frame to main 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
CustomFrame AddCustomFrame(string title)
```

Python:

```python
api.ChartManager.AddCustomFrame(title: str) -> CustomFrame
```

### Parameters

- `title` (`string`, Python `str`): Custom frame title.

### Returns

`CustomFrame` — Returns newly added custom frame.

### Examples

C#:

```csharp
var customFrame = ChartManager.AddCustomFrame("Account Summary");
customFrame.Child = new TextBlock { Text = $"Balance: {Account.Balance}", Margin = 10 };
```

Python:

```python
customFrame = api.ChartManager.AddCustomFrame("Account Summary")
textBlock = TextBlock()
textBlock.Text = f"Balance: {api.Account.Balance}"
textBlock.Margin = Thickness(10)
customFrame.Child = textBlock
```

## AddCustomFrame(string title, ChartContainer targetChartContainer)

Adds a new custom frame to target 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
CustomFrame AddCustomFrame(string title, ChartContainer targetChartContainer)
```

Python:

```python
api.ChartManager.AddCustomFrame(title: str, targetChartContainer: ChartContainer) -> CustomFrame
```

### Parameters

- `title` (`string`, Python `str`): Custom frame title.
- `targetChartContainer` (`ChartContainer`, Python `ChartContainer`): Target chart container

### Returns

`CustomFrame` — Returns newly added custom frame.

### Examples

C#:

```csharp
var chartFrame = ChartManager.AddChartFrame("EURUSD", TimeFrame.Hour);
chartFrame.Detach();
var customFrame = ChartManager.AddCustomFrame("Notes", chartFrame.ChartContainer);
customFrame.Child = new TextBox { Text = "Write your EURUSD notes here" };
```

Python:

```python
chartFrame = api.ChartManager.AddChartFrame("EURUSD", TimeFrame.Hour)
chartFrame.Detach()
customFrame = api.ChartManager.AddCustomFrame("Notes", chartFrame.ChartContainer)
textBox = TextBox()
textBox.Text = "Write your EURUSD notes here"
customFrame.Child = textBox
```

