---
id: "M:cAlgo.API.CustomSymbolTradingHoliday.#ctor(System.String,System.DateTime,System.DateTime,System.Boolean)"
kind: "constructor"
type: "T:cAlgo.API.CustomSymbolTradingHoliday"
url: "https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolTradingHoliday/Constructor/"
---

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

# CustomSymbolTradingHoliday constructor

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

## CustomSymbolTradingHoliday(string name, DateTime startTime, DateTime endTime, bool isRecurring)

Creates a new 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.

C#:

```csharp
public CustomSymbolTradingHoliday(string name, DateTime startTime, DateTime endTime, bool isRecurring)
```

Python:

```python
CustomSymbolTradingHoliday(name: str, startTime: DateTime, endTime: DateTime, isRecurring: bool)
```

### Parameters

- `name` (`string`, Python `str`): Holiday name
- `startTime` (`DateTime`, Python `DateTime`): Holiday start time
- `endTime` (`DateTime`, Python `DateTime`): Holiday end time
- `isRecurring` (`bool`, Python `bool`): Is recurring?

Available since cAlgo.API 5.3.

### Examples

C#:

```csharp
var holiday = new CustomSymbolTradingHoliday("Exchange Maintenance", new DateTime(2025, 6, 7, 0, 0, 0), new DateTime(2025, 6, 7, 6, 0, 0), false);
Print("{0}: {1} - {2}", holiday.Name, holiday.StartTime, holiday.EndTime);
```

Python:

```python
from System import DateTime
holiday = CustomSymbolTradingHoliday("Exchange Maintenance", DateTime(2025, 6, 7, 0, 0, 0), DateTime(2025, 6, 7, 6, 0, 0), False)
api.Print(f"{holiday.Name}: {holiday.StartTime} - {holiday.EndTime}")
```

