Skip to content

Market structure

Indicators

  • Price
  • High
  • Low
Market structure

10 candles before · 10 after

  • BOS up
  • BOS down
  • CHoCH up
  • CHoCH down
  • Uptrend
  • Downtrend
  • Break level
This is how the node looks on the board: inputs on the left, outputs on the right.

Trend, BOS and CHoCH from swings. Reads the trend from the swings: if the price closes above the last confirmed swing high, the structure has broken upward; if it closes below the last swing low, downward. A break in the direction of the trend is a break of structure (BOS); a break against the trend is a change of character (CHoCH), often the first sign of a reversal. A swing only counts once the candles after it have confirmed it, so a brand-new high cannot break structure yet. Example: CHoCH up on 4-hour candles reports when BTC, after a downtrend, closes above the last lower high for the first time.

BTC/USDT with market structure, swings 10 · 10Lines from the swing to the break, dotted until the swing is confirmed, with BOS or CHoCH; the trend below.Price BTC/USDT80,00082,00084,000CHoCHBOSCHoCHBOSBOSCHoCHCHoCHOct 11Oct 12Oct 13Oct 14Oct 15Oct 16Oct 17
  • Break up
  • Break down
  • Swing not yet confirmed
  • next break
  • Trend
BTC/USDT candles with market structure from swings with 10 candles before and after. Each line starts at the swing; it is dotted until the 10 candles after it have confirmed it, and only then can a close beyond it break structure. A break in the direction of the trend is a BOS, one against it a CHoCH. The strip below shows the trend after the last break.

Properties of the Market structure node: the chart with BTC/USDT candles (sample prices), lines from the swings to the breaks with BOS and CHoCH, dotted until confirmation, the trend as a colored strip and the bracket at the latest swing, below it the first fields.

In the properties, a chart shows the last 150 candles and on top of them what the node finds with your settings; dotted or dashed is what it did not know yet at that time. Drag the ends of the bracket at the latest swing to change “Candles before” and “Candles after”; at its right end the swing is confirmed. The top line shows the state at the last candle, and the chart follows every setting right away.

More under Smart money and Chart above the price.

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

How many candles after a high must not rise above it before it counts as a swing. Only then does it count here, that many candles later; with fewer candles it counts sooner, but smaller turning points count too.

Default: Close

What the price needs to break a swing: the close, or just the wick.

  • Close (default): The candle has to close beyond the swing. A wick alone does not count, so brief excursions stay out.
  • Wick: A high above the swing high or a low below the swing low is enough. Reports sooner, also for breakouts that fall back right away.

Notifies you of a change of character upward: after a downtrend the price closes above the last confirmed swing high for the first time.

Example chain: Candle, Market structure, TelegramConnections: Candle → Market structure, Candle → Market structure, Candle → Market structure, Market structure → Telegram.CandleBTC/USDT · 1hMarket structure10 candles before · 10afterTelegramlinked chat · at most every4 h

How to connect the nodes:

  1. Candle (Price) → Market structure (Price)
  2. Candle (High) → Market structure (High)
  3. Candle (Low) → Market structure (Low)
  4. Market structure (CHoCH up) → Telegram (Trigger)

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

Chain as JSON

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

structure.json
{
"name": "Example: Market structure",
"version": 1,
"nodes": [
{ "id": "c1", "type": "core.candle", "position": { "x": 40, "y": 40 }, "settings": { "pair": "BTC/USDT", "timeframe": "1h" } },
{ "id": "s1", "type": "core.structure", "position": { "x": 260, "y": 40 }, "settings": {} },
{ "id": "t1", "type": "core.telegram", "position": { "x": 480, "y": 40 }, "settings": {} }
],
"edges": [
{ "from": "c1.close", "to": "s1.close" },
{ "from": "c1.high", "to": "s1.high" },
{ "from": "c1.low", "to": "s1.low" },
{ "from": "s1.chochUp", "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 Price Number series required
Input High Number series required
Input Low Number series required
Output BOS up Signal (true/false) –
Output BOS down Signal (true/false) –
Output CHoCH up Signal (true/false) –
Output CHoCH down Signal (true/false) –
Output Uptrend Signal (true/false) –
Output Downtrend Signal (true/false) –
Output Break level Number series appears in messages as a price, e.g. “$81,616”
  • In messages the value is called “Market structure 10 · 10”.
  • Warm-up with the default settings: 1,020 candles (this many extra candles are loaded by the replay before the value is reliable).
  • Search also finds it under: market structure, structure, bos, choch, break of structure, change of character, reversal, smart money, smc, swing.

Swings as in the Swing points node; the latest confirmed swing high and low are tracked, each up to 500 candles after its high or low and broken at most once. Break up: a close (with “Wick” the high) above the swing high. CHoCH when the last break within the previous 500 candles went the other way, otherwise BOS; without an earlier break there is no trend. The trend follows the last break and lasts up to 500 candles. If a candle breaks both sides with its wicks, the side it closes on counts (from the middle of both levels upward).

  • Type in the chain: core.structure · Version 1.0.0 · Category key ind
  • Settings in the chain: left (Candles before), right (Candles after), trigger (Break by)
  • Pins in the chain: Input close, high, low · Output bosUp, bosDown, chochUp, chochDown, bullish, bearish, level
  • 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