macd
MACD
Type:
macd
• Category:indicators
Description
Calculates the MACD indicator based on a list of closing prices
Parameters
Name | Type | Description | Required | Default |
---|---|---|---|---|
dataExp | string | List of closing prices | no | |
fastperiod | number | no | 12 | |
slowperiod | number | no | 26 | |
signalperiod | number | no | 9 |
Help
MACD
Overview
The MACD (Moving Average Convergence Divergence) worker is an indicator used in financial markets to identify trends and predict price movements. This worker calculates the MACD indicator based on a list of closing prices.
Description
The MACD worker takes a list of closing prices and calculates the MACD line, signal line, and histogram. The MACD line is the difference between two moving averages (fast and slow), while the signal line is a moving average of the MACD line. The histogram represents the difference between the MACD line and the signal line.
What does this worker do?
This worker calculates the MACD indicator, which helps traders and analysts:
- Identify trends and trend reversals
- Generate buy and sell signals
- Analyze the strength and momentum of a trend
How to interpret the results
The MACD indicator can be interpreted in several ways:
- When the MACD line crosses above the signal line, it's a bullish signal (buy).
- When the MACD line crosses below the signal line, it's a bearish signal (sell).
- The histogram represents the difference between the MACD line and the signal line, indicating the strength of the trend.
Parameters
The MACD worker accepts the following parameters:
Parameters Schema (JSON)
{
"dataExp": {
"type": "string",
"description": "List of closing prices"
},
"fastperiod": {
"type": "number",
"default": 12
},
"slowperiod": {
"type": "number",
"default": 26
},
"signalperiod": {
"type": "number",
"default": 9
}
}
Parameters List
- dataExp:
- Type:
string
- Description: List of closing prices
- Type:
- fastperiod:
- Type:
number
- Default:
12
- Description: The period of the fast moving average
- Type:
- slowperiod:
- Type:
number
- Default:
26
- Description: The period of the slow moving average
- Type:
- signalperiod:
- Type:
number
- Default:
9
- Description: The period of the signal moving average
- Type:
By adjusting these parameters, you can customize the MACD indicator to suit your trading strategy and market analysis needs.