Skip to content

CustomSymbol.WeekendSwaps

property · CustomSymbol · cAlgo.API Since 5.3

DesktopCLICloud

Gets / sets whether swap is charged on weekends or not.

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

bool WeekendSwaps {get; set;}
customSymbol.WeekendSwaps: bool

Returns bool

Examples

var customSymbol = CustomSymbols.Add("MYEURUSD", Symbols.GetSymbol("EURUSD"));
customSymbol.WeekendSwaps = false;
Print("Swaps charged on weekends: {0}", customSymbol.WeekendSwaps);
customSymbol = api.CustomSymbols.Add("MYEURUSD", api.Symbols.GetSymbol("EURUSD"))
customSymbol.WeekendSwaps = False
api.Print(f"Swaps charged on weekends: {customSymbol.WeekendSwaps}")