Loading...
Searching...
No Matches
ATAS.Indicators.VolumeValueFactor Struct Reference

Converts a traded volume of an instrument into money of one currency: money = volume × Multiplier × (PriceDependent ? price : 1). More...

Inheritance diagram for ATAS.Indicators.VolumeValueFactor:
[legend]
Collaboration diagram for ATAS.Indicators.VolumeValueFactor:
[legend]

Public Member Functions

 VolumeValueFactor (decimal multiplier, bool priceDependent, string currency)
 Creates a factor.
 
decimal ToMoney (decimal volume, decimal price)
 Returns the money value of a volume traded at a price.
 
decimal ToVolume (decimal money, decimal price)
 Returns the volume worth money at a price. Returns decimal.MaxValue when the price or the multiplier does not allow the conversion.
 
VolumeValueFactor WithRate (decimal rate, string currency)
 Returns a copy of the factor with the multiplier scaled by an exchange rate into another currency.
 
bool Equals (VolumeValueFactor other)
 
override bool Equals (object? obj)
 
override int GetHashCode ()
 
override string ToString ()
 

Static Public Member Functions

static bool operator== (VolumeValueFactor left, VolumeValueFactor right)
 Equality operator.
 
static bool operator!= (VolumeValueFactor left, VolumeValueFactor right)
 Inequality operator.
 

Properties

decimal Multiplier [get]
 Money value of one unit of volume (per unit of price when PriceDependent is true).
 
bool PriceDependent [get]
 True when the money value of a volume depends on the trade price.
 
string Currency [get]
 Currency code of the resulting money value.
 
bool IsValid [get]
 True when the factor can convert volumes (a positive multiplier and a currency).
 

Detailed Description

Converts a traded volume of an instrument into money of one currency: money = volume × Multiplier × (PriceDependent ? price : 1).

Linear contracts (spot, USDT-margined futures, stock, CME futures) are price dependent: the multiplier is the contract size (point value) times the exchange rate. Inverse contracts have a fixed money value per contract, so the multiplier alone gives the value.

Constructor & Destructor Documentation

◆ VolumeValueFactor()

ATAS.Indicators.VolumeValueFactor.VolumeValueFactor ( decimal  multiplier,
bool  priceDependent,
string  currency 
)

Creates a factor.

Parameters
multiplierMoney value of one unit of volume (per unit of price when priceDependent is true).
priceDependentTrue when the money value depends on the trade price.
currencyCurrency code of the money value.

Member Function Documentation

◆ Equals() [1/2]

override bool ATAS.Indicators.VolumeValueFactor.Equals ( object?  obj)

◆ Equals() [2/2]

bool ATAS.Indicators.VolumeValueFactor.Equals ( VolumeValueFactor  other)

◆ GetHashCode()

override int ATAS.Indicators.VolumeValueFactor.GetHashCode ( )

◆ operator!=()

static bool ATAS.Indicators.VolumeValueFactor.operator!= ( VolumeValueFactor  left,
VolumeValueFactor  right 
)
static

Inequality operator.

◆ operator==()

static bool ATAS.Indicators.VolumeValueFactor.operator== ( VolumeValueFactor  left,
VolumeValueFactor  right 
)
static

Equality operator.

◆ ToMoney()

decimal ATAS.Indicators.VolumeValueFactor.ToMoney ( decimal  volume,
decimal  price 
)

Returns the money value of a volume traded at a price.

◆ ToString()

override string ATAS.Indicators.VolumeValueFactor.ToString ( )

◆ ToVolume()

decimal ATAS.Indicators.VolumeValueFactor.ToVolume ( decimal  money,
decimal  price 
)

Returns the volume worth money at a price. Returns decimal.MaxValue when the price or the multiplier does not allow the conversion.

◆ WithRate()

VolumeValueFactor ATAS.Indicators.VolumeValueFactor.WithRate ( decimal  rate,
string  currency 
)

Returns a copy of the factor with the multiplier scaled by an exchange rate into another currency.

Property Documentation

◆ Currency

string ATAS.Indicators.VolumeValueFactor.Currency
get

Currency code of the resulting money value.

◆ IsValid

bool ATAS.Indicators.VolumeValueFactor.IsValid
get

True when the factor can convert volumes (a positive multiplier and a currency).

◆ Multiplier

decimal ATAS.Indicators.VolumeValueFactor.Multiplier
get

Money value of one unit of volume (per unit of price when PriceDependent is true).

◆ PriceDependent

bool ATAS.Indicators.VolumeValueFactor.PriceDependent
get

True when the money value of a volume depends on the trade price.


The documentation for this struct was generated from the following file: