---
id: "T:cAlgo.API.CustomSymbolTradingHoliday"
kind: "class"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolTradingHoliday/"
---

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

# CustomSymbolTradingHoliday (class)

Represents a custom symbol trading holiday.

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 CustomSymbolTradingHoliday
```

Available since cAlgo.API 5.3.

## Examples

C#:

```csharp
var customSymbol = CustomSymbols.Add("MYEURUSD", Symbols.GetSymbol("EURUSD"));
var holiday = new CustomSymbolTradingHoliday("Christmas", new DateTime(2025, 12, 25), new DateTime(2025, 12, 26), true);
customSymbol.MarketHours.Holidays.Add(holiday);
Print("Added holiday {0}, recurring: {1}", holiday.Name, holiday.IsRecurring);
```

Python:

```python
from System import DateTime
customSymbol = api.CustomSymbols.Add("MYEURUSD", api.Symbols.GetSymbol("EURUSD"))
holiday = CustomSymbolTradingHoliday("Christmas", DateTime(2025, 12, 25), DateTime(2025, 12, 26), True)
customSymbol.MarketHours.Holidays.Add(holiday)
api.Print(f"Added holiday {holiday.Name}, recurring: {holiday.IsRecurring}")
```

## Constructors

- `public CustomSymbolTradingHoliday(string name, DateTime startTime, DateTime endTime, bool isRecurring)` — Creates a new custom symbol trading holiday. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolTradingHoliday/Constructor/index.md)

## Properties

- `public DateTime EndTime {get;}` — Gets the end date and time of the trading holiday. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolTradingHoliday/EndTime/index.md)
- `public bool IsRecurring {get;}` — Gets a value indicating whether the trading holiday is recurring. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolTradingHoliday/IsRecurring/index.md)
- `public string Name {get;}` — Gets the name of the trading holiday. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolTradingHoliday/Name/index.md)
- `public DateTime StartTime {get;}` — Gets the start date and time of the trading holiday. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolTradingHoliday/StartTime/index.md)

