Price-action traders describe a trend in swings: higher highs and higher lows on the way up, lower lows and lower highs on the way down. A trend carries on when price takes out the last swing in its own direction, and it's in trouble when price takes out the one behind it. The Market Structure node keeps that whole ledger in one place: the trend, the two levels that matter, and every break, labelled as a continuation or a reversal.
- Takes
- Nothing. It reads its series' candles
- Gives
- The trend, the structure high and low, and a flag on every break
- Reach for it
- Trading breaks of structure, or keeping entries on the trend's side
How it works
The node works in three layers, in this order, every time a bar closes.
The swings. It finds its own swing highs and lows with the same rule as Swing Points (Left Strength, Right Strength, Allow Equal Bars), so the two nodes always agree about what a swing is. It also inherits the lag: a swing is known only once its Right Strength bars have closed, so the structure levels update that many bars after the turn.
The trend. The trend is +1 once the last swing high is above the one before it and the last swing low is above the one before it. It takes both. A higher high on its own doesn't turn anything up. -1 is the mirror. When the two disagree, the trend keeps whatever it was, and before any pair has agreed it's 0.
The break. A bar that closes beyond the Structure High (the last confirmed swing high) breaks it, and the same goes for the Structure Low on the way down. Set A Break Is to the wick option and the bar's high or low reaching past the level is enough. What the break is called depends on the trend it happened in:
| Price takes out | While the trend is | It fires | Meaning |
|---|---|---|---|
| The structure high | Up | Break of Structure (Bull) | The uptrend carried on |
| The structure high | Down | Change of Character (Bull) | The first sign the downtrend is over. The trend turns up at this bar |
| The structure low | Down | Break of Structure (Bear) | The downtrend carried on |
| The structure low | Up | Change of Character (Bear) | The first sign the uptrend is over. The trend turns down at this bar |
Every level breaks once. After it's taken out, it can't fire again until a new swing confirms and replaces it. A break while the trend is still 0 fires nothing at all, though it still uses the level up.
Example: buy the continuation
You trade NQ 15m and want to buy when an uptrend takes out its last swing high, with the stop under the swing low the trend has to hold.
Add Market Structure with Left and Right Strength 5, and A Break Is set to a close beyond the level, so a wick poking through doesn't count. Wire Break of Structure (Bull) into a long Entry. The flag is true for the bar after the breaking bar closes, so the trade goes in on that bar.
For the stop, measure the Bracket Order's stop from a level: wire Structure Low into the stop's level input and set the distance to 4 points. When the break fires, Structure Low is the last confirmed swing low under it, which is exactly the level whose loss would turn the trend. The level is read once, when the trade fills, so later swings don't drag the stop around.
Settings
Outputs
Use something else when
When it doesn't behave
The trend sits at 0 and nothing fires
The trend needs a higher high and a higher low (or the mirror) before it's anything but 0, and while it's 0, breaks fire nothing. At the start of the data, or in a choppy stretch where highs and lows disagree, that can take a while. Smaller strengths find swings sooner.
“Price above the Structure High” stays true long after the break
The level doesn't move when it's broken; it waits for the next swing high. Use the Break of Structure flag for the moment, or Bars Since Break to say how fresh the break must be.
My Swing Points version of a break disagrees with this node
A break built by hand from Swing Points, a Bars Ago and a few Comparisons is four nodes that can't agree which swing is current, and none of them knows whether the break went with the trend or against it, which is the whole difference between a continuation and a reversal. Use this node for breaks.
The builder won't let me wire Structure High into a Crossover
Market Structure keeps its own memory across the engine's monthly chunks of history, so a Crossover (or Since, Capture, a State Machine) can't read its history correctly, and the builder refuses rather than guess. Compare the level with a Comparison, which is exact on every bar, or trade the break flags.
Going further
Two of these nodes can disagree on purpose. Set one to break on a wick and the other on a close: when the wick version fires Break of Structure (Bull) and the close version doesn't, a wick took the level and the close couldn't hold it, which is what traders call a liquidity sweep. AND the first with a NOT of the second. The Patterns section of the node panel has it ready as Liquidity sweep, next to Break of structure and Change of character.
For a retest, Last Break Level is the line and Bars Since Break is the clock. Compare the last completed bar's low (a one-bar Price History) with Last Break Level, and AND in Bars Since Break under 10 so only fresh breaks count.
And be honest about the wick setting. Close and wick produce different sets of breaks, and so different strategies. Pick the one that matches your idea before you see results; trying both is an optimization like any other.