div
DIV
Type:
div
• Category:indicators
Description
Vector Arithmetic Div
Parameters
Name | Type | Description | Required | Default |
---|---|---|---|---|
real0 | string | Numerator array | no | |
real1 | string | Denominator array | no |
Help
DIV
Description
The DIV worker performs vector arithmetic division, specifically designed for financial markets. It takes two input arrays, a numerator and a denominator, and returns an array of division results.
What does this worker do?
The DIV worker element-wise divides the numerator array by the denominator array. This operation is commonly used in financial markets to calculate various metrics, such as returns, ratios, or indicators.
How to interpret the results?
The result of the DIV worker is an array of values representing the element-wise division of the numerator by the denominator. The resulting array has the same length as the input arrays. Users should be cautious when interpreting the results, as division by zero may occur if the denominator array contains zero values.
Parameters
JSON Schema
The DIV worker accepts the following parameters:
Parameter | Type | Description |
---|---|---|
real0 | string | Numerator array |
real1 | string | Denominator array |
Parameters Details
- real0: The numerator array. This is a string representing an array of numbers.
- real1: The denominator array. This is a string representing an array of numbers.
Example Use Case
To use the DIV worker, provide the numerator and denominator arrays as strings:
{
"real0": "[10, 20, 30]",
"real1": "[2, 4, 6]"
}
The DIV worker will return an array of division results: [5, 5, 5]
.