Skip to content

MACD

Indicators core.macd Version 1.0.0

Line, signal and histogram. Moving Average Convergence Divergence like ta.macd: fast EMA minus slow EMA, the signal line as an EMA of that difference and the histogram as the gap between both.

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 in Number series required
Output MACD macd Number series –
Output Signal signal Number series –
Output Histogram hist Number series –

The settings appear on the right under “Properties” once the node is selected on the board. Those marked “More” appear after clicking “More”.

Setting Default Allowed Meaning
Fast fast 12 from 2 to 200, whole number –
Slow slow 26 from 2 to 400, whole number –
Signal signal 9 from 1 to 100, whole number –

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 · Binance · 1hMACD12 · 26 · 9Compare A/BMACD crosses above MACDsignalTelegramlinked chat · at most every4 h

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" }
]
}
  • 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.
  • Type in the chain: core.macd · Version 1.0.0 · Category key ind
  • Reference tests in the manifest: 1 (with fixed price data binance-btcusdt-1h-500)
  • How a node is built