Skip to content

CustomSymbolFuturesSettings constructor

constructor · CustomSymbolFuturesSettings · cAlgo.API Since 5.3

DesktopCLICloud

Creates a new custom symbol futures settings.

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 CustomSymbolFuturesSettings(DateTime lastTradeTime, DateTime expirationTime, double? maintenanceMargin)
CustomSymbolFuturesSettings(lastTradeTime: DateTime, expirationTime: DateTime, maintenanceMargin: float | None)

Parameters

Name C# type Python type Description
lastTradeTime DateTime DateTime Last contract trade time
expirationTime DateTime DateTime Contract expiration time
maintenanceMargin double? float | None Amount of maintenance margin

Examples

var futuresSettings = new CustomSymbolFuturesSettings(new DateTime(2025, 12, 19, 20, 0, 0), new DateTime(2025, 12, 22, 0, 0, 0), null);
Print("Last trade time: {0}, maintenance margin: {1}", futuresSettings.LastTradeTime, futuresSettings.MaintenanceMargin);
from System import DateTime
futuresSettings = CustomSymbolFuturesSettings(DateTime(2025, 12, 19, 20, 0, 0), DateTime(2025, 12, 22, 0, 0, 0), None)
api.Print(f"Last trade time: {futuresSettings.LastTradeTime}, maintenance margin: {futuresSettings.MaintenanceMargin}")