What it does
This indicator draws a single stop line that follows price at a distance based on the Average True Range. In an uptrend the line sits below price in green and can only move up; in a downtrend it sits above price in red and can only move down. When price closes through the line, the stop flips to the other side and an arrow marks the change.
It is useful both as a trend filter and as a guide for where a volatility-adjusted stop-loss could sit.
How it works
- True range = the largest of: high - low, |high - previous close|, |low - previous close|.
- ATR = previous ATR + (true range - previous ATR) / ATR period (Wilder smoothing).
- Offset = multiplier x ATR.
- If the current and previous close are both above the previous stop, the new stop = max(previous stop, close - offset).
- If both closes are below the previous stop, the new stop = min(previous stop, close + offset).
- Otherwise price has crossed the line: the stop resets to close - offset (if price is above) or close + offset (if below).
- Direction is up when the close is above the stop, down otherwise. A flip arrow prints on the closed bar where the direction changes.
The live bar's line moves with price until the bar closes; arrows and alerts use closed bars only.
How to use it
As a trend filter, many traders only look for buy setups while the line is green and sell setups while it is red. As a trade-management tool, the line shows where a trailing stop would be if it were set at the chosen ATR multiple. A multiplier of 2 trails tightly and flips often; 3 to 4 gives trends more room.
Because the distance is measured in ATR, it adapts automatically to quiet and volatile instruments. Use the Position Size Calculator with the distance between your entry and the line to keep risk per trade consistent. For background on why volatility matters for stops, see the volatility lesson.
Settings
| Input | Default | What it changes |
|---|---|---|
| ATR period | 14 | Smoothness of the volatility estimate |
| ATR multiplier | 3.0 | Larger values trail further away and flip less often |
| Show flip arrows | true | Turns the flip arrows on or off |
| Popup alert / Push notification | false | Alerts once per bar on a closed-bar flip |
Limitations
- In sideways markets the line flips back and forth, producing a series of small losses if used as an entry signal.
- The stop reacts after price moves; it will never exit at the top or bottom of a move.
- A sudden volatility spike widens the ATR, but the ratchet rule keeps the stop from moving backwards.
- The indicator does not place or modify orders; it only displays a level.

