Converts a traded volume of an instrument into money of one currency: money = volume × Multiplier × (PriceDependent ? price : 1).
More...
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). | |
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.
| ATAS.Indicators.VolumeValueFactor.VolumeValueFactor | ( | decimal | multiplier, |
| bool | priceDependent, | ||
| string | currency | ||
| ) |
Creates a factor.
| multiplier | Money value of one unit of volume (per unit of price when priceDependent is true). |
| priceDependent | True when the money value depends on the trade price. |
| currency | Currency code of the money value. |
| override bool ATAS.Indicators.VolumeValueFactor.Equals | ( | object? | obj | ) |
| bool ATAS.Indicators.VolumeValueFactor.Equals | ( | VolumeValueFactor | other | ) |
| override int ATAS.Indicators.VolumeValueFactor.GetHashCode | ( | ) |
|
static |
Inequality operator.
|
static |
Equality operator.
| decimal ATAS.Indicators.VolumeValueFactor.ToMoney | ( | decimal | volume, |
| decimal | price | ||
| ) |
Returns the money value of a volume traded at a price.
| override string ATAS.Indicators.VolumeValueFactor.ToString | ( | ) |
| 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.
| 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.
|
get |
Currency code of the resulting money value.
|
get |
True when the factor can convert volumes (a positive multiplier and a currency).
|
get |
Money value of one unit of volume (per unit of price when PriceDependent is true).
|
get |
True when the money value of a volume depends on the trade price.