Pular para o conteúdo

MACD

Este conteúdo não está disponível em sua língua ainda.

IndicatorsFrom Pro

  • Value
MACD

12 · 26 · 9

  • MACD
  • Signal line
  • Histogram
This is how the node looks on the board: inputs on the left, outputs on the right.

Like two runners on a track: a fast and a slow average run with the price. When the fast one pulls away, the trend gains momentum; when the slow one catches up, it fades.

Shows whether a trend gains momentum. Compares a fast and a slow average of the price. When they move apart, the trend gains momentum; when they converge, it fades. You also get the signal line (the smoothed MACD line) and the histogram (the gap between the two). Example: when the MACD line crosses above the signal line, the price is picking up upward momentum.

BTC/USDT price and MACD 12 · 26 · 9Dots mark where the MACD line crosses above the signal line.Price BTC/USDT82,00084,000MACD 12 · 26 · 9−500−2500250Oct 8Oct 9Oct 10Oct 11Oct 12
  • MACD line
  • Signal line
  • Histogram
  • crosses above
Top: the price; bottom: MACD line, signal line and histogram of the same 1-hour candles. The dots show where the MACD line crosses above the signal line.

The settings appear on the right under “Properties” once you click the node on the board. Below each field you find the same explanation as here.

Default: 12 · from 2 to 200, whole number

Candles for the fast average, usually 12.

Default: 26 · from 2 to 400, whole number

Candles for the slow average, usually 26. Should be larger than the fast one.

Default: 9 · from 1 to 100, whole number

How many candles the MACD line is smoothed over to form the signal line, usually 9. Almost everyone uses the defaults 12, 26 and 9; you rarely need to change them.

The classic MACD cross: the MACD line crosses above its signal line.

Example chain: Candle, MACD, Compare A/B, TelegramConnections: Candle → MACD, MACD → Compare A/B, MACD → Compare A/B, Compare A/B → Telegram.CandleBTC/USDT · 1hMACD12 · 26 · 9Compare A/BMACD crosses above MACDsignalTelegramlinked chat · at most every4 h

How to connect the nodes:

  1. Candle (Price) → MACD (Value)
  2. MACD (MACD) → Compare A/B (A)
  3. MACD (Signal line) → Compare A/B (B)
  4. Compare A/B (true/false) → Telegram (Trigger)

On the board it reads: 12 · 26 · 9

Chain as JSON

To try it, copy it and paste it in the editor under “Import”. Importing creates a new chain.

macd.json
{
"name": "Example: MACD",
"version": 1,
"nodes": [
{ "id": "c1", "type": "core.candle", "position": { "x": 40, "y": 40 }, "settings": { "pair": "BTC/USDT", "timeframe": "1h" } },
{ "id": "d1", "type": "core.macd", "position": { "x": 260, "y": 40 }, "settings": {} },
{ "id": "k1", "type": "core.compare-ab", "position": { "x": 480, "y": 40 }, "settings": { "operator": "crossesAbove" } },
{ "id": "t1", "type": "core.telegram", "position": { "x": 700, "y": 40 }, "settings": {} }
],
"edges": [
{ "from": "c1.close", "to": "d1.in" },
{ "from": "d1.macd", "to": "k1.a" },
{ "from": "d1.signal", "to": "k1.b" },
{ "from": "k1.out", "to": "t1.in" }
]
}

Only matching types connect: number series to number series (round pin), signal to signal (square), message to message (diamond).

Direction Pin Type Note
Input Value Number series required
Output MACD Number series –
Output Signal line Number series –
Output Histogram Number series –
  • In messages the values are called “MACD”, “MACD signal”, “MACD histogram”.
  • Warm-up with the default settings: 175 candles (this many extra candles are loaded by the replay before the value is reliable).
  • Search also finds it under: momentum, trend, signal, histogram.
  • More on this, with ready-made templates and their test results: Supertrend and MACD alerts.

Difference of two EMAs, signal line as an EMA of that difference, histogram as the gap between both; the same formula as ta.macd in TradingView.

  • Type in the chain: core.macd · Version 1.0.0 · Category key ind
  • Settings in the chain: fast (Fast average), slow (Slow average), signal (Signal line)
  • Pins in the chain: Input in · Output macd, signal, hist
  • Reference tests in the manifest: 1 (with fixed price data: 500 candles of 1h)
  • How a node is built

Versão 2026.11.29.15 · Changelog