---
id: "E:cAlgo.API.CustomSymbol.NewChart"
kind: "event"
type: "T:cAlgo.API.CustomSymbol"
url: "https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/NewChart/"
---

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

# CustomSymbol.NewChart

Member of [CustomSymbol](https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/index.md).

## NewChart

Occurs when user opens a new chart of current custom symbol.

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
event Action<CustomSymbolNewChartEventArgs> NewChart;
```

Python:

```python
customSymbol.NewChart += handler  # handler(obj: CustomSymbolNewChartEventArgs)
```

### Returns

`Action<CustomSymbolNewChartEventArgs>` — 

Available since cAlgo.API 5.3.

### Examples

C#:

```csharp
protected override void OnStart()
{
    var customSymbol = CustomSymbols.Add("MYEURUSD", Symbols.GetSymbol("EURUSD"));
    customSymbol.NewChart += OnCustomSymbolNewChart;
}

private void OnCustomSymbolNewChart(CustomSymbolNewChartEventArgs args)
{
    Print("New {0} chart opened on {1}", args.CustomSymbol.Name, args.CustomBars.TimeFrame);
}
```

Python:

```python
def on_start(self):
    customSymbol = api.CustomSymbols.Add("MYEURUSD", api.Symbols.GetSymbol("EURUSD"))
    customSymbol.NewChart += self.on_custom_symbol_new_chart

def on_custom_symbol_new_chart(self, args):
    api.Print(f"New {args.CustomSymbol.Name} chart opened on {args.CustomBars.TimeFrame}")
```

