avgprice
AVGPRICE
Type:
avgprice
• Category:indicators
Description
Average Price
Parameters
Name | Type | Description | Required | Default |
---|---|---|---|---|
open | string | List of opening prices | no | |
high | string | List of highest prices | no | |
low | string | List of lowest prices | no | |
close | string | List of closing prices | no |
Help
AVGPRICE
Average Price Indicator for Financial Markets
Description
The AVGPRICE worker calculates the average price of a financial instrument based on its opening, highest, lowest, and closing prices. This indicator provides a comprehensive view of the instrument's price movements over a specified period.
What does this worker do?
The AVGPRICE worker takes in four lists of prices: open, high, low, and close. It then calculates the average price for each period, providing a single value that represents the overall price level.
How to interpret the results
The result of the AVGPRICE worker is a single value representing the average price. A higher average price indicates an overall increase in the instrument's price, while a lower average price indicates a decrease.
Parameters
The following parameters are required to calculate the average price:
Parameters Schema (JSON)
{
"open": {
"type": "string",
"description": "List of opening prices"
},
"high": {
"type": "string",
"description": "List of highest prices"
},
"low": {
"type": "string",
"description": "List of lowest prices"
},
"close": {
"type": "string",
"description": "List of closing prices"
}
}
Parameters List
- open:
- Type:
string
- Description: List of opening prices
- Format: Comma-separated values (e.g., "10.0, 11.0, 12.0")
- Type:
- high:
- Type:
string
- Description: List of highest prices
- Format: Comma-separated values (e.g., "12.0, 13.0, 14.0")
- Type:
- low:
- Type:
string
- Description: List of lowest prices
- Format: Comma-separated values (e.g., "8.0, 9.0, 10.0")
- Type:
- close:
- Type:
string
- Description: List of closing prices
- Format: Comma-separated values (e.g., "11.0, 12.0, 13.0")
- Type:
Example Use Case
To calculate the average price for an instrument with the following prices:
Period | Open | High | Low | Close |
---|---|---|---|---|
1 | 10.0 | 12.0 | 8.0 | 11.0 |
2 | 11.0 | 13.0 | 9.0 | 12.0 |
3 | 12.0 | 14.0 | 10.0 | 13.0 |
You would input the following parameters:
- open: "10.0, 11.0, 12.0"
- high: "12.0, 13.0, 14.0"
- low: "8.0, 9.0, 10.0"
- close: "11.0, 12.0, 13.0"
The AVGPRICE worker would then calculate and return the average price for the specified period.