Skip to main content

avgprice


AVGPRICE

Type: avgprice • Category: indicators

Description

Average Price

Parameters

NameTypeDescriptionRequiredDefault
openstringList of opening pricesno
highstringList of highest pricesno
lowstringList of lowest pricesno
closestringList of closing pricesno

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")
  • high:
    • Type: string
    • Description: List of highest prices
    • Format: Comma-separated values (e.g., "12.0, 13.0, 14.0")
  • low:
    • Type: string
    • Description: List of lowest prices
    • Format: Comma-separated values (e.g., "8.0, 9.0, 10.0")
  • close:
    • Type: string
    • Description: List of closing prices
    • Format: Comma-separated values (e.g., "11.0, 12.0, 13.0")

Example Use Case

To calculate the average price for an instrument with the following prices:

PeriodOpenHighLowClose
110.012.08.011.0
211.013.09.012.0
312.014.010.013.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.