AlgoPuzzle Open the Builder
← Back to all articles

Risk management

Trailing Stop Loss Explained

A trailing stop loss is a stop that moves automatically as a trade runs in your favor, staying a fixed distance behind the current price instead of sitting at one level for the whole trade. Buy at 1.1000 with a 20-pip trailing stop and it starts at 1.0980 - but if price rises to 1.1050, the stop moves up to 1.1030, always 20 pips behind the highest price reached since entry. It only ever moves in the direction that locks in more profit: if price pulls back without setting a new high, the stop stays exactly where it already was, rather than moving backward with it. The trade closes the moment price touches the stop, same as any other stop order - the only difference is where that level sits, not how the exit itself triggers. The point isn't guessing the exact top of a move; it's letting a winning trade keep running while automatically giving up less of the gain than a fixed exit would if the move reverses.

How the distance actually moves

A trailing stop updates in one direction only - the direction that protects more of the open profit. On a long position it can only move up, never down; on a short position it can only move down, never up. Each time price sets a new favorable extreme since entry, the stop recalculates as that extreme minus (long) or plus (short) the trailing distance. A pullback that doesn't reach a new extreme simply leaves the stop unchanged - it never retreats to "give the trade more room" once it has moved.

Fixed distance vs. ATR-based trailing

The trailing distance itself can be set two ways, and the tradeoff is the same one that applies to any stop loss.

Fixed-pip trailing distanceATR-based trailing distance
Adapts to volatilityNo - same distance alwaysYes - recalculated from recent price movement
Consistent across instrumentsNo - "20 pips" means something different per pairYes - relative to each instrument's own normal range
SimplicitySimpler, one numberOne extra input (ATR period and multiplier)
Best fitA single instrument under stable conditionsMultiple instruments, or volatility that changes over time

See ATR-based stop loss sizing for how that measurement actually works - the same logic applies whether it's sizing a fixed stop or a trailing one.

Trailing stop vs. a fixed take profit

A take profit closes a trade at one predetermined target, win locked in the moment price gets there. A trailing stop has no target at all - it lets a winning trade run indefinitely, only closing once price reverses by the trailing distance from wherever it peaked. That makes a trailing stop better suited to trend-following ideas that don't want to cap the size of a big move, and a fixed take profit better suited to setups with a specific, repeatable target in mind. Some strategies use only one; others use a take profit as a minimum win and a trailing stop to let the trade run further if the move keeps going.

What a trailing stop doesn't protect against

A trailing stop is still a stop order underneath - once triggered, it typically fills as a market order at whatever price is available next, not necessarily the exact stop price. In a fast-moving market or across a price gap, the real fill can land worse than the stop level, the same slippage risk that applies to any stop loss. A trailing stop guarantees a trigger point; it does not guarantee the exact price the trade actually exits at.

Adding one in a block-based builder

In a visual builder, a trailing stop is a risk block with a trailing distance operand instead of a fixed one - a plain pip value, or an ATR expression like "1.5x ATR(14)" for a distance that adapts per instrument. The block recalculates the stop level on each new candle using the same rule described above: move it only when doing so protects more profit, otherwise leave it alone. See how a visual strategy builder works for how blocks like this fit into a complete strategy.

Common questions

What is a trailing stop loss?

A stop loss that moves automatically as a trade moves in your favor, staying a fixed distance behind the best price reached since entry, instead of sitting at one level for the whole trade.

How is a trailing stop different from a regular stop loss?

A regular stop loss sits at one fixed price for the life of the trade. A trailing stop recalculates every time price makes a new favorable extreme, but only ever moves in the direction that locks in more profit - it never moves backward to give more room.

Can a trailing stop loss guarantee I lock in a certain profit?

No. Once triggered it typically fills as a market order, so in a fast-moving or gapping market the actual exit price can be worse than the stop level - the same slippage risk any stop order carries. It guarantees a trigger point, not an exact fill.

Should the trailing distance be fixed pips or based on ATR?

A fixed-pip distance is simpler but means something different on every instrument and under every volatility condition. An ATR-based distance scales with the instrument's own recent movement, so it stays roughly as tight or loose relative to normal noise - the same tradeoff as any ATR-based stop.

Does a trailing stop replace a take profit?

Not automatically. A take profit closes the trade at a fixed target; a trailing stop has no target and lets a winning trade run until price reverses by the trailing distance. Some strategies use one or the other, some combine both.

Build a trailing stop - Free