CustomSymbol.SwapLong
property · CustomSymbol · cAlgo.API Since 5.3
DesktopCLICloud
Gets / sets the SWAP charge for long positions of the symbol.
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
double SwapLong {get; set;}
customSymbol.SwapLong: float
Returns double
Examples
var customSymbol = CustomSymbols.Add("MYEURUSD", Symbols.GetSymbol("EURUSD"));
customSymbol.SwapCalculationType = SymbolSwapCalculationType.Pips;
customSymbol.SwapLong = -6.5;
Print("Swap long: {0} pips", customSymbol.SwapLong);
customSymbol = api.CustomSymbols.Add("MYEURUSD", api.Symbols.GetSymbol("EURUSD"))
customSymbol.SwapCalculationType = SymbolSwapCalculationType.Pips
customSymbol.SwapLong = -6.5
api.Print(f"Swap long: {customSymbol.SwapLong} pips")