NewOrderDialog.Expiration
property · NewOrderDialog · cAlgo.API Since 5.2
DesktopCLICloud
Gets or sets the Expiration.
Environment behaviour
CLI — not supported. No dialog can be shown in the CLI: ShowDialog returns without showing anything and the order settings are only stored.
Cloud — not supported. No dialog can be shown in the cloud: ShowDialog returns without showing anything and the order settings are only stored.
Definition
public DateTime? Expiration {get; set;}
newOrderDialog.Expiration: DateTime | None
Returns DateTime?
Examples
var newOrderDialog = new NewOrderDialog { SymbolName = SymbolName, OrderType = OrderType.Limit, TargetPrice = Symbol.Bid - 10 * Symbol.PipSize };
newOrderDialog.Expiration = Server.Time.AddHours(4);
newOrderDialog.ShowDialog();
newOrderDialog = NewOrderDialog()
newOrderDialog.SymbolName = api.SymbolName
newOrderDialog.OrderType = OrderType.Limit
newOrderDialog.TargetPrice = api.Symbol.Bid - 10 * api.Symbol.PipSize
newOrderDialog.Expiration = api.Server.Time.AddHours(4)
newOrderDialog.ShowDialog()