Skip to content

Symbol.SwapCalculationType

property · Symbol · cAlgo.API.Internals

DesktopCLICloud

Gets the symbol SWAP calculation type.

Definition

SymbolSwapCalculationType SwapCalculationType {get;}
api.Symbol.SwapCalculationType: SymbolSwapCalculationType

Returns SymbolSwapCalculationType

Examples

if (Symbol.SwapCalculationType == SymbolSwapCalculationType.Pips)
    Print("Swap long: {0} pips, swap short: {1} pips", Symbol.SwapLong, Symbol.SwapShort);
if api.Symbol.SwapCalculationType == SymbolSwapCalculationType.Pips:
    api.Print(f"Swap long: {api.Symbol.SwapLong} pips, swap short: {api.Symbol.SwapShort} pips")