Skip to content

CustomSymbol.GracePeriod

property · CustomSymbol · cAlgo.API Since 5.3

DesktopCLICloud

Gets / sets symbol grace period. This is the number of days free of Administrative fee from the time of opening a position. Only applicable for SWAP free trading accounts.

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

int GracePeriod {get; set;}
customSymbol.GracePeriod: int

Returns int

Examples

var customSymbol = CustomSymbols.Add("MYEURUSD", Symbols.GetSymbol("EURUSD"));
customSymbol.GracePeriod = 3;
Print("Days free of administrative fee: {0}", customSymbol.GracePeriod);
customSymbol = api.CustomSymbols.Add("MYEURUSD", api.Symbols.GetSymbol("EURUSD"))
customSymbol.GracePeriod = 3
api.Print(f"Days free of administrative fee: {customSymbol.GracePeriod}")