Skip to content

Symbol.VolumeInUnitsToQuantity

method · Symbol · cAlgo.API.Internals

DesktopCLICloud

Convert Volume in units of base currency to Quantity (in lots).

Definition

double VolumeInUnitsToQuantity(double volume)
api.Symbol.VolumeInUnitsToQuantity(volume: float) -> float

Parameters

Name C# type Python type Description
volume double float The symbol volume units to convert to Quantity (in lots)

Returns double — Quantity (Lots)

Examples

var lots = Symbol.VolumeInUnitsToQuantity(10000);
Print("10000 units of {0} is {1} lots", SymbolName, lots);
lots = api.Symbol.VolumeInUnitsToQuantity(10000)
api.Print(f"10000 units of {api.SymbolName} is {lots} lots")