Market structure
- Price
- High
- Low
10 candles before · 10 after
- BOS up
- BOS down
- CHoCH up
- CHoCH down
- Uptrend
- Downtrend
- Break level
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.
What it looks like
Section titled “What it looks like”- Break up
- Break down
- Swing not yet confirmed
- next break
- Trend
Setting it in the chart
Section titled “Setting it in the chart”
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.
Settings
Section titled “Settings”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.
Candles before
Section titled “Candles before”How many candles before a high must all be lower, before a low higher. With more candles only clearer turning points count.
Candles after
Section titled “Candles after”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.
Break by
Section titled “Break by”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.
Example
Section titled “Example”Notifies you of a change of character upward: after a downtrend the price closes above the last confirmed swing high for the first time.
How to connect the nodes:
- Candle (Price) → Market structure (Price)
- Candle (High) → Market structure (High)
- Candle (Low) → Market structure (Low)
- 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.
{ "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" } ]}Inputs and outputs
Section titled “Inputs and outputs”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” |
Good to know
Section titled “Good to know”- 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.
Technical details
Section titled “Technical details”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 keyind - Settings in the chain:
left(Candles before),right(Candles after),trigger(Break by) - Pins in the chain: Input
close,high,low· OutputbosUp,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