Skip to content

CustomSymbol.SwapPeriod

property · CustomSymbol · cAlgo.API Since 5.3

DesktopCLICloud

Gets / sets symbol swap period. This is the number of days free of Administrative fee from the time of opening a position.

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 SwapPeriod {get; set;}
customSymbol.SwapPeriod: int

Returns int

Examples

var customSymbol = CustomSymbols.Add("MYEURUSD", Symbols.GetSymbol("EURUSD"));
customSymbol.SwapPeriod = 1;
Print("Swap period: {0} days", customSymbol.SwapPeriod);
customSymbol = api.CustomSymbols.Add("MYEURUSD", api.Symbols.GetSymbol("EURUSD"))
customSymbol.SwapPeriod = 1
api.Print(f"Swap period: {customSymbol.SwapPeriod} days")