A volume threshold that can be set either in instrument volume units or in money (PLAT-5080).
More...
|
| | VolumeFilter (bool enableVisible, bool asScalar=false) |
| | Initializes a new instance of the VolumeFilter class.
|
| |
| | VolumeFilter () |
| | Initializes a new instance of the VolumeFilter class with default settings.
|
| |
| bool | TryGetMoneyFactor (IVolumeValuation? valuation, out VolumeValueFactor factor) |
| | Gets the factor converting volumes into money of the filter currency.
|
| |
| bool | IsMoneyApplied (IVolumeValuation? valuation=null) |
| | True when the threshold is compared in money: money mode with a known exchange rate. In money mode without a rate the filter falls back to the volume threshold.
|
| |
| bool | HasThreshold (IVolumeValuation? valuation=null) |
| | True when the threshold is not zero in the unit it is applied in (a zero maximum usually means "no limit").
|
| |
| int | Compare (decimal volume, decimal price, IVolumeValuation? valuation=null) |
| | Compares a traded volume with the threshold.
|
| |
| decimal | GetVolumeThreshold (decimal price, IVolumeValuation? valuation=null) |
| | Returns the threshold in volume units at a price: Filter<TValue,TFilter>.Value in volume mode or when no rate is known, the volume worth Amount at price in money mode.
|
| |
| string | FormatThreshold () |
| | Returns the threshold as text in its current unit, e.g. "100" or "€50,000.00".
|
| |
| override object | Clone () |
| |
| override bool | Equals (object? obj) |
| |
| override int | GetHashCode () |
| |
| override string | GetStringValue () |
| |
| override bool | Equals (object? obj) |
| |
| override int | GetHashCode () |
| |
| bool | SetValueSilently (TValue value) |
| | Sets value of Value property. Returns false when new value equals new value.
|
| |
| | Filter (bool enabledVisible, bool asScale=false) |
| | Initializes a new instance of the Filter<TValue, TFilter> class with the specified parameters.
|
| |
| | Filter () |
| | Initializes a new instance of the Filter<TValue, TFilter> class with default parameters.
|
| |
| | Filter (bool enabledVisible, bool asScalar=false) |
| | Initializes a new instance of the Filter<TValue> class with the specified visibility of the Enabled property and scalar value.
|
| |
| | Filter () |
| | Initializes a new instance of the Filter<TValue> class with default visibility settings.
|
| |
| | Filter (bool enableVisible, bool asScalar=false) |
| | Initializes a new instance of the Filter class with the specified visibility of the Enabled property and scalar value.
|
| |
| | Filter () |
| | Initializes a new instance of the Filter class with default visibility settings.
|
| |
| void | RefreshValue () |
| | Asks bindings to reread Value without changing it or invoking the value-changed action. This also restores an editor whose uncommitted input is invalid.
|
| |
| TFilter | ValueOnChanging (Func< ValueChangingEventArgs< TValue >, TValue > onChanging) |
| | Sets a function to be invoked when the value of the filter is changing.
|
| |
| TFilter | ValueOnChanged (Action< TValue > onChanged) |
| | Sets an action to be invoked when the value of the filter has changed.
|
| |
| override string | ToString () |
| | Converts the filter to its string representation.
|
| |
| virtual string | GetStringValue () |
| |
| override object | Clone () |
| |
|
| VolumeFilterUnit | Unit [get, set] |
| | Unit the threshold is set in.
|
| |
| decimal | Amount [get, set] |
| | Threshold in money, used when Unit is VolumeFilterUnit.Money.
|
| |
| string? | Currency [get, set] |
| | Currency of Amount; null means the instrument's own currency.
|
| |
| bool | IsMoney [get] |
| | True when the threshold is set in money.
|
| |
| decimal | DisplayValue [get, set] |
| | Threshold in the current unit: Amount in money mode, otherwise Filter<TValue,TFilter>.Value. Bound by editors.
|
| |
| string | UnitKey [get, set] |
| | Unit selector value for editors: VolumeUnitKey, InstrumentCurrencyUnitKey or a currency code. Switching from volume to money converts the threshold at the reference price when the filter is bound to a valuation.
|
| |
| string? | MoneyScalar [get, set] |
| | The money part of the threshold as one invariant scalar, for indicators whose threshold was persisted as a bare number (PLAT-5080): "50000 EUR", "50000" for the instrument currency, null in volume mode. Such an indicator keeps persisting Filter<TValue,TFilter>.Value under the old property name and this text in a new one, so older versions read the volume threshold and skip the text. Setting it does not convert anything.
|
| |
| IVolumeValuation? | Valuation [get, set] |
| | Valuation of the instrument the filter is applied to. Bound by the host (indicators get it bound automatically); used when no valuation is passed explicitly and by editors to convert the threshold between units.
|
| |
| TValue | Value [get, set] |
| | Gets or sets the value of the filter.
|
| |
A volume threshold that can be set either in instrument volume units or in money (PLAT-5080).
Filter<TValue,TFilter>.Value always holds the threshold in volume units. In money mode it is kept untouched and serves as the fallback: when no exchange rate is known and when an older platform version, which only knows Filter, loads the template - it reads the same JSON object, ignores the money fields and keeps working with the volume threshold.
A money threshold is compared with each trade at the trade's own price, so it keeps its meaning while the price of the instrument moves.
| string? ATAS.Indicators.VolumeFilter.MoneyScalar |
|
getset |
The money part of the threshold as one invariant scalar, for indicators whose threshold was persisted as a bare number (PLAT-5080): "50000 EUR", "50000" for the instrument currency, null in volume mode. Such an indicator keeps persisting Filter<TValue,TFilter>.Value under the old property name and this text in a new one, so older versions read the volume threshold and skip the text. Setting it does not convert anything.