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