Skip to content

CustomSymbolTradingHoliday

class cAlgo.API Since 5.3

DesktopCLICloud

Represents a 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 class CustomSymbolTradingHoliday

Namespace: cAlgo.API · Group: Custom · Implements: TradingHoliday

Examples

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

Name Description
CustomSymbolTradingHolidayDesktopCLICloud Creates a new custom symbol trading holiday.

Properties

Name Description
EndTimeDesktopCLICloudDateTime Gets the end date and time of the trading holiday.
IsRecurringDesktopCLICloudbool Gets a value indicating whether the trading holiday is recurring.
NameDesktopCLICloudstring Gets the name of the trading holiday.
StartTimeDesktopCLICloudDateTime Gets the start date and time of the trading holiday.

See also