Skip to content

CustomSymbolTradingHoliday constructor

constructor · CustomSymbolTradingHoliday · cAlgo.API Since 5.3

DesktopCLICloud

Creates a new custom symbol trading holiday.

Environment behaviour

CLI — not supported. Available to plugins only, and plugins cannot run in the CLI.

Cloud — not supported. Available to plugins only, and plugins cannot run in the cloud.

Definition

public CustomSymbolTradingHoliday(string name, DateTime startTime, DateTime endTime, bool isRecurring)
CustomSymbolTradingHoliday(name: str, startTime: DateTime, endTime: DateTime, isRecurring: bool)

Parameters

Name C# type Python type Description
name string str Holiday name
startTime DateTime DateTime Holiday start time
endTime DateTime DateTime Holiday end time
isRecurring bool bool Is recurring?

Examples

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);
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}")