Skip to content

Swing points

Indicators

  • High
  • Low
Swing points

5 candles before · 5 after

  • Swing high
  • Swing low
  • new swing high
  • new swing low
This is how the node looks on the board: inputs on the left, outputs on the right.

Last confirmed highs and lows. Finds turning points in the price: a swing high is higher than the candles before and after it, a swing low lower. Whether a high was one is only certain once the candles after it have closed. That is why the node reports it that many candles later and never changes it afterwards. The levels stay until a new swing comes. Example: “Price crosses above swing high” reports when the price breaks out above the last high.

BTC/USDT with swing points 5 · 5Dashed circles show where a swing is, full dots where the node reports it: 5 candles later, once it is certain that it was one.Price BTC/USDT84,00086,000Oct 3Oct 4Oct 5Oct 6
  • last swing high
  • last swing low
  • where the swing is
  • where the node reports it
BTC/USDT candles with swing points 5 · 5. A high is a swing high when the 5 candles before were lower and the 5 after do not rise above it. That is only certain 5 candles later: there the node reports the swing (full dot) and holds its level until the next one. Charts instead draw the swing back at the high itself (dashed circle).

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: 5 · from 1 to 100, whole number

How many candles before a high must all be lower, before a low higher. With more candles only clearer turning points count.

Default: 5 · from 1 to 100, whole number

How many candles after a high must not rise above it before it counts as a swing. The node reports it that many candles later; with fewer candles the report comes sooner, but also for smaller turning points.

A breakout above the last confirmed swing high: the price closes above it.

Example chain: Candle, Swing points, Compare A/B, PushConnections: Candle → Swing points, Candle → Swing points, Candle → Compare A/B, Swing points → Compare A/B, Compare A/B → Push.CandleBTC/USDT · 1hSwing points5 candles before · 5 afterCompare A/BPrice crosses above Swinghigh 5 · 5Pushat most every 4 h

How to connect the nodes:

  1. Candle (High) → Swing points (High)
  2. Candle (Low) → Swing points (Low)
  3. Candle (Price) → Compare A/B (A)
  4. Swing points (Swing high) → Compare A/B (B)
  5. Compare A/B (true/false) → Push (Trigger)

On the board it reads: 5 candles before · 5 after

Chain as JSON

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

swings.json
{
"name": "Example: Swing points",
"version": 1,
"nodes": [
{ "id": "c1", "type": "core.candle", "position": { "x": 40, "y": 40 }, "settings": { "pair": "BTC/USDT", "timeframe": "1h" } },
{ "id": "s1", "type": "core.swings", "position": { "x": 260, "y": 40 }, "settings": {} },
{ "id": "k1", "type": "core.compare-ab", "position": { "x": 480, "y": 40 }, "settings": { "operator": "crossesAbove" } },
{ "id": "p1", "type": "core.push", "position": { "x": 700, "y": 40 }, "settings": {} }
],
"edges": [
{ "from": "c1.high", "to": "s1.high" },
{ "from": "c1.low", "to": "s1.low" },
{ "from": "c1.close", "to": "k1.a" },
{ "from": "s1.high", "to": "k1.b" },
{ "from": "k1.out", "to": "p1.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 High Number series required
Input Low Number series required
Output Swing high Number series appears in messages as a price, e.g. “$81,616”
Output Swing low Number series appears in messages as a price, e.g. “$81,616”
Output new swing high Signal (true/false) –
Output new swing low Signal (true/false) –
  • In messages the values are called “Swing high 5 · 5”, “Swing low 5 · 5”.
  • Warm-up with the default settings: 510 candles (this many extra candles are loaded by the replay before the value is reliable).
  • Search also finds it under: swing, turning point, high, low, pivot, structure, breakout, support, resistance.

Swing high: a high that is higher than the highs of the candles before and at least as high as those of the candles after, so with equal highs the first one counts. Reported on the candle with which the candles after have closed, and held as a level until a new one comes, at most 500 candles after the high. Swing low likewise with the lows.

  • Type in the chain: core.swings · Version 1.0.0 · Category key ind
  • Settings in the chain: left (Candles before), right (Candles after)
  • Pins in the chain: Input high, low · Output high, low, newHigh, newLow
  • Reference tests in the manifest: 1 (with fixed price data: 500 candles of 1h)
  • How a node is built

Version 2026.10.21.23 · Changelog