MACD with three adjustable periods

MACD subtracts the slow EMA from the fast EMA. The signal line is an EMA of those differences, and the histogram is MACD minus signal. If the fast EMA is 105, the slow EMA is 102 and signal is 2.4, MACD is 3 and the histogram is 0.6. The values are in price units. MACD indicator reference

BTC/USD Daily candles Kraken
StockSharp JS-Charts

Both price EMAs use closing prices. The signal EMA uses the resulting MACD line. Each EMA starts with a simple average over its period.

Loading candle history…

Isolate the effect of each control

Start with fast 12, slow 26 and signal 9. Change just the fast period to 6 and look at the next sharp price move. A shorter fast period weights the new close more. Reset it, then try a slow period of 40. Finally change the signal period to 5. This changes the signal and histogram while leaving the MACD line tied to the same two price averages.

Compare the histogram zero crossing with the MACD line crossing its own zero. The first means MACD has crossed the signal line. The second occurs when fast and slow price EMAs meet. To compare exact timestamps across platforms, align EMA seeds and the treatment of the unanswered warm-up rows.

Read SMA vs EMA for the weighting and initialization used in a simple example.