Skip to main content

ma


MA

Type: ma • Category: indicators

Description

Calculates simple moving average based on a list of prices

Parameters

NameTypeDescriptionRequiredDefault
dataExpstringList of pricesno
timeperiodnumberno30
matypenumberno0

Help

MA

Moving Average Indicator for Financial Markets

Description

The MA worker calculates the simple moving average of a list of prices based on a specified time period and moving average type. This indicator is widely used in financial markets to analyze trends and make informed trading decisions.

What does this worker do?

The MA worker takes a list of prices and calculates the moving average based on the provided parameters. It returns the moving average value, which can be used to identify trends, support, and resistance levels in financial markets.

How to interpret the results

The moving average value represents the average price of an asset over a specified time period. A rising moving average indicates an uptrend, while a falling moving average indicates a downtrend. The moving average can also be used to identify support and resistance levels.

Parameters

The following parameters can be passed to the MA worker:

Parameters Schema (JSON)

{
"dataExp": {
"type": "string",
"description": "List of prices"
},
"timeperiod": {
"type": "number",
"default": 30
},
"matype": {
"type": "number",
"default": 0
}
}

Detailed Parameters

  • dataExp:
    • Type: string
    • Description: A list of prices.
  • timeperiod:
    • Type: number
    • Default: 30
    • Description: The time period for calculating the moving average.
  • matype:
    • Type: number
    • Default: 0
    • Description: The type of moving average to calculate (0 = Simple Moving Average).

Example Use Case

To calculate the 30-day simple moving average of a list of prices, pass the following parameters:

  • dataExp: ["price1", "price2", ..., "priceN"]
  • timeperiod: 30
  • matype: 0

The worker will return the 30-day simple moving average value.