---
id: "T:cAlgo.API.ChartTemplate"
kind: "interface"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplate/"
---

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

# ChartTemplate (interface)

Represents chart template.

Environments: Desktop supported · CLI supported · Cloud not supported.

- Cloud: Never available in the cloud: it is only returned by members that do not work there (ChartTemplates, ChartTemplates.Create, ChartTemplates.DefaultTemplate and more).

## Definition

```csharp
public interface ChartTemplate
```

Available since cAlgo.API 5.6.

## Examples

C#:

```csharp
using cAlgo.API;

namespace cAlgo.Robots;

public partial class ChartTemplate : Robot
{
    protected override void OnStart()
    {
        foreach (var chartTemplate in ChartTemplates)
        {
            Print($"Name: {chartTemplate.Name} | Indicators: {chartTemplate.Indicators.Count} | Robots: {chartTemplate.Robots.Count}");
        }

        ChartTemplates.Get("Template Name")?.Apply(Chart);
    }
}
```

Python:

```python
import clr

clr.AddReference("cAlgo.API")

# Import cAlgo API types
from cAlgo.API import *

# Import trading wrapper functions
from robot_wrapper import *

class Test():
    def on_start(self):
        for chartTemplate in api.ChartTemplates:
            print(f"Name: {chartTemplate.Name} | Indicators: {chartTemplate.Indicators.Count} | Robots: {chartTemplate.Robots.Count}")

        api.ChartTemplates.Get("Template Name").Apply(api.Chart)
```

config.json:

```json
{
  "AccessRights": "None",
  "AddIndicators": true
}
```

## Methods

- `void Apply(Chart chart)` — Applies current chart template to a chart. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplate/Apply/index.md)

## Properties

- `ChartTemplateColorSettings ColorSettings {get;}` — Gets the chart template color settings. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplate/ColorSettings/index.md)
- `ChartTemplateDisplaySettings DisplaySettings {get;}` — Gets the chart template display settings. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplate/DisplaySettings/index.md)
- `ChartTemplateIndicators Indicators {get;}` — Gets the indicators of chart template. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplate/Indicators/index.md)
- `string Name {get;}` — Gets the chart template name. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplate/Name/index.md)
- `ChartTemplateRobots Robots {get;}` — Gets the robots of chart template. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplate/Robots/index.md)

