new module:ct-trading /derivation /Tier Derivation()
The TierDerivation class is used to generate the derived fields for an ESP trade.
For example, the bid/ask prices are derived from the dealt amount and the corresponding tier limits. When the dealt amount changes, then the bid/ask rate must be recalculated.
Extends:
Extends
Methods
get Derived Fields() → {Array}
Returns a list of fields that are derived from this derivation. These fields may be required as input fields to another derivation, and will be appended to the dataHolder when recalculateDerivedFields is called.
Returns:
A list of derived field names (as strings).
- Type
- Array
get Input Fields() → {Array}
Returns a list of fields used as inputs to the Derivation. The input fields of one derivation may be the derived fields of another derivation, and thus will determine the order in which the derivations will be performed.
Returns:
A list of input field names (as strings).
- Type
- Array
recalculate Derived Fields(oData)
Recalculates the bid and ask price and updates the specified DataHolder with these derived fields.
Parameters:
Name | Type | Description |
---|---|---|
oData |
module:ct-trading |
The data that is augmented by this derivation. Must be a non null instance. |