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

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

# CustomSymbolNewChartEventArgs (class)

Provides data for custom symbol NewChart 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 CustomSymbolNewChartEventArgs
```

Available since cAlgo.API 5.3.

## Examples

C#:

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

private void OnCustomSymbolNewChart(CustomSymbolNewChartEventArgs args)
{
    Print("New {0} chart opened for {1}, custom bars available: {2}", args.Chart.TimeFrame, args.CustomSymbol.Name, args.CustomBars != null);
}
```

Python:

```python
def on_start(self):
    customSymbol = api.CustomSymbols.Add("EURUSD.custom", 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.Chart.TimeFrame} chart opened for {args.CustomSymbol.Name}, custom bars available: {args.CustomBars is not None}")
```

## Properties

- `public Chart Chart {get;}` — Chart that is newly opened or switched to custom symbol. [details](https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomSymbolNewChartEventArgs/Chart/index.md)
- `public CustomBars CustomBars {get;}` — Gets custom bars for the newly opened custom symbol chart. [details](https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomSymbolNewChartEventArgs/CustomBars/index.md)
- `public CustomSymbol CustomSymbol {get;}` — Gets custom symbol. [details](https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomSymbolNewChartEventArgs/CustomSymbol/index.md)

