Skip to content

Structural Stop

Risk · Stop Loss

Structural Stop node on the canvas

Stop loss placed just beyond the most recent swing low (long) or swing high (short). Wire a Swings block in to drive the structure detection. Output is a per-bar pip distance — wire into the Output node's SL socket. Bars before the first swing emit no value (engine falls back to inline SL).

Structural Stop places your stop where it actually belongs — just beyond the last swing — rather than at an arbitrary fixed distance. For a long, it sits below the most recent swing low; for a short, above the most recent swing high. This is how discretionary and smart-money traders set stops: at the price that, if broken, genuinely invalidates the trade idea. It turns "20 pips because that's round" into "below the structure that needs to hold."

How it works

The block takes Bars (for the current price) and a Swings feed (for the structure), and for each bar measures the pip distance from the close to the relevant swing, plus a small Buffer (default 2 pips) so the stop sits past structure rather than right on it. The Side parameter picks which swing: long measures down to the most recent swing low below price; short measures up to the most recent swing high above price. The output is a per-bar pip distance you wire into the Tester's SL socket. Before the first swing forms, it emits no value and the engine falls back to the inline SL.

When to use it

Use Structural Stop for structure-based and smart-money strategies where stops should respect market structure, not a fixed count. It's the natural stop for setups built on Supply/Demand Zones, Liquidity Sweeps, and Market Structure — the stop goes beyond the swing that defines the setup, so you're risking exactly to the point of invalidation. Pair it with a Reward-to-Risk Target and your target scales with each setup's actual structural risk. Tune the Swings lookback to control how major a swing the stop hangs on.

Example

A structural long: detect pivots with a Swings block, wire them and Bars into Structural Stop (side = long, buffer = 2), and route its output into the Tester's SL socket. Branch the same SL into a Reward-to-Risk Target at 2× for the TP. Now your stop sits below real structure and your target is 2× that risk. Backtest in the Tester.

Tips & gotchas

  • Risk to invalidation, not to a round number — the stop sits past the swing that, if broken, kills the idea.
  • Drive it with Swings — the swing lookback controls how major a structure the stop respects.
  • The buffer keeps you off the exact swing — a touch of room so a precise wick doesn't clip you.
  • No swing yet → falls back to inline SL — early bars before structure forms use the Tester's slider value.
  • Pairs with Reward-to-Risk Target so reward scales with each setup's real risk.

Inputs

Socket Type What to wire in
Bars bars Bars to align the output series to. Used for the close price at signal time.
Swings swings Swing highs/lows from a Swings block.

Outputs

Output Type Plots as Description
SL series Line · sub-pane Per-bar SL pip distance from close to the relevant swing + buffer.

Parameters

Parameter Type Default What it does
Side choice (long, short) long Which side this stop applies to. Long → distance to the most recent swing low BELOW current price. Short → distance to the most recent swing high ABOVE current price.
Buffer (pips) number · 0.0–50.0 2.0 Extra distance beyond the swing so the stop sits just past structure, not on it.

Reference auto-generated from the block catalog · category Risk.