Moving Average Convergence Divergence (MACD)
Indicator that uses 2 different averages of prices to calculate a trend’s momentum, direction and strength.
Last updated
Indicator that uses 2 different averages of prices to calculate a trend’s momentum, direction and strength.
Last updated
Moving Average Convergence Divergence (MACD) is considered one of the most important indicators. It uses 2 different averages of prices to calculate a trend’s momentum, direction and strength.
MACD and Signal Line oscillate through a 0 reference line. There are 2 kinds of events that suggest a buy or sell action. When MACD crosses up through the Signal Line, it is a buy signal. Conversely, if MACD crosses down through the Signal Line, it is seen as a sell signal.
We can also consider it a signal to buy when MACD crosses the 0 line from negative into positive values, and a signal to sell when it crosses the 0 line from positive to negative values. As long as MACD is above 0, we can consider the asset to be in a bullish trend, while MACD staying below zero indicates bearish conditions.
Divergences also reflect bullish or bearish conditions: we can consider it bearish if the asset’s price increases more than the MACD (e.g. reaching a new high while the indicator doesn’t), in the same way that it would be bullish to see the asset’s price decreasing more than the MACD does.
MACD Line:
Signal Line:
EMA: Exponential Moving Average
Name
Type
Range of value
Description
fast
int
<1, int.MaxValue>
Number of bars to calculate the fast EMA inside MACD indicator.
slow
int
<1, int.MaxValue>
Number of bars to calculate the slow EMA.
smooth
int
<1, int.MaxValue>
The number of bars to calculate the EMA signal line.
Indicator ouptuts an object of values.
Name
Type
Range of value
Description
Value
double
(0, double.MaxValue)
Output value of MACD indicator.
Average
double
(0, double.MaxValue)
Average of MACD indicator.
Difference
double
(0, double.MaxValue)
The difference of MACD indicator.