CustomSymbol.SwapCalculationType
property · CustomSymbol · cAlgo.API Since 5.3
DesktopCLICloud
Gets / sets the symbol SWAP calculation type.
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
SymbolSwapCalculationType SwapCalculationType {get; set;}
customSymbol.SwapCalculationType: SymbolSwapCalculationType
Returns SymbolSwapCalculationType
Examples
var customSymbol = CustomSymbols.Add("MYEURUSD", Symbols.GetSymbol("EURUSD"));
customSymbol.SwapCalculationType = SymbolSwapCalculationType.Percentage;
Print("Swap calculation type: {0}", customSymbol.SwapCalculationType);
customSymbol = api.CustomSymbols.Add("MYEURUSD", api.Symbols.GetSymbol("EURUSD"))
customSymbol.SwapCalculationType = SymbolSwapCalculationType.Percentage
api.Print(f"Swap calculation type: {customSymbol.SwapCalculationType}")