Transformer Pipeline Module API Reference
6.2.11.309924
|
Functions | |
calc.high (var incoming, var normal, var trade, var tradetime) | |
Calculate the high value. More... | |
calc.low (var incoming, var normal, var trade, var tradetime) | |
Calculate the low value. More... | |
calc.previous (var update, var normal, var fieldname, var formatname, var value, var tim) | |
Add the previous price into the normalised packet. More... | |
calc.change (var update, var normal, var price) | |
Add the change since the last value. More... | |
calc.percentchange (var update, var normal, var price) | |
Add the percentage change since the last value. More... | |
calc.accumulate (var symbol, var name, var value) | |
Implementation of an accumulator. More... | |
calc.exec (var symbolname, var value, var exprname) | |
Execute expressions based on a Data Dictionary algorithm. More... | |
This package provides facilities for simple data processing. All functions use the DataDictionary facility to lookup the field names.
calc.accumulate | ( | var | symbol, |
var | name, | ||
var | value | ||
) |
Implementation of an accumulator.
symbol | - Symbol this accumulator corresponds to |
name | - Name of the accumulator |
value | - Value to add to the accumulator |
calc.change | ( | var | update, |
var | normal, | ||
var | price | ||
) |
Add the change since the last value.
update | - The incoming update |
normal | - The outgoing normalised data |
price | - The last trade price |
This function uses the following database keys for the symbol:
PreviousPrice
This function uses the following database keys for the data dictionary:
PreviousPriceField
PriceFormat
PriceChangeField
calc.exec | ( | var | symbolname, |
var | value, | ||
var | exprname | ||
) |
Execute expressions based on a Data Dictionary algorithm.
symbolname | - Symbolname that this value is associated with |
value | - The value to be processed |
exprname | - Name of the expression in the data dictionary |
For example, if there's the config database option "PriceMultiplier", defined as follows:
Then the following code snippet will perform that calculation defined in the option.
calc.high | ( | var | incoming, |
var | normal, | ||
var | trade, | ||
var | tradetime | ||
) |
Calculate the high value.
incoming | - Update packet that we have received |
normal | - Normalised packet that we can add fields to |
trade | - Trade price |
tradetime | - The tradetime |
nil | - No new high value |
This function uses the following database keys on the symbol:
HighPriceTime
HighPrice
IncomingTimeFormat
This function uses the following data dictionary keys:
HighPriceField
HighPriceTimeField
calc.low | ( | var | incoming, |
var | normal, | ||
var | trade, | ||
var | tradetime | ||
) |
Calculate the low value.
incoming | - Update packet that we have received |
normal | - Normalised packet that we can add fields to |
trade | - Trade price |
tradetime | - The tradetime |
nil | - No new high value |
This function uses the following database keys on the symbol:
LowPriceTime
LowPrice
This function uses the following data dictionary keys:
LowPriceField
LowPriceTimeField
calc.percentchange | ( | var | update, |
var | normal, | ||
var | price | ||
) |
Add the percentage change since the last value.
update | - The incoming update |
normal | - The outgoing normalised data |
price | - The last trade price |
This function uses the following database keys for the symbol:
PreviousPrice
This function uses the following database keys for the data dictionary:
PreviousPriceField
PriceFormat
PricePercentChangeField
calc.previous | ( | var | update, |
var | normal, | ||
var | fieldname, | ||
var | formatname, | ||
var | value, | ||
var | tim | ||
) |
Add the previous price into the normalised packet.
update | - The incoming update |
normal | - The outgoing normalised data |
fieldname | - Fieldname of current_value |
formatname | - Name of the format to apply to the previous value |
value | - Current value |
tim | - The associated time |
This function uses the following database keys for the symbol:
Previous[fieldname]
Previous[fieldname]Time
This function uses the following database keys for the data dictionary:
Previous[fieldname]Field
Previous[fieldname]TimeField