Trapline
Indicator
Trapline marks three steps on one sequence: the trend, a wick past a swing that closes back inside, and a pullback box on the leg after it.
Joe's price-action model, first written 19 Sep 2026 and named the next day. Reviewed by the ChartLabs team, updated Nov 2026.
Latest long box is 59748.66 to 61667.09.
Long 59748.66 to 61667.09
Latest long box is 59748.66 to 61667.09.
Long 59748.66 to 61667.09
Illustration on simulated data.
TraplineWhat is the Trapline indicator?
Trapline is not an engine kernel. It is a Community script. Swing length is 3 (2 to 30). It keeps the last 3 swings that can be trapped (1 to 10). A trap is a wick through one of those swings, against the trend, that closes back inside. Closed bars only. The forming bar is not judged.
The leg after the trap has to be at least 1.5 times the 14-bar ATR, and at least 3 bars after the trap, before a box is drawn. ATR length is fixed. It is not a setting. A long leg from 100 up to 110, with the zone from 50% to 79%, puts the top at 105 and the bottom at 102.1. The middle of that box is 103.55.
The box locks when a bar does not extend the leg. If price later takes that extreme out, the box is pulled and drawn again. A pullback counts when a later bar reaches the middle of the box, not when a wick only nicks the first line. Longs are #089981 and shorts are #f23645. Past sequences stay faint. There are no buy or sell arrows and no target or stop lines.
Not in the engine
The numbers above are the script inputs and the fixed ATR rule, not a kernel in packages/engine.
Three steps
Trend, trap, pullback box. A close past the trap wick ends the sequence. One that never pulls back is dropped after 120 bars.
Trapline signalsFive patterns to know.
Long sequence
Trend is up, a wick takes out a recent low and closes back above it, then a box hangs under the leg high.
Short sequence
The mirror: a wick through a recent high that closes back inside, then a box above the leg low.
Box locked
The leg paused, so the box is drawn from the extreme as it stands.
Close past the wick
A close through the trap wick says it was not a trap. The sequence comes off.
Faint past boxes
Older sequences stay on the chart, lighter than the live one. The default keeps 20.
Trapline formulaHow it is calculated.
Read the trend
Higher highs and higher lows, or the opposite, from swings with 3 bars on each side.
Catch the wick
Price pokes through one of the last 3 swings and closes back inside. That bar is the trap.
Draw the box
Once the leg is at least 1.5 ATR and 3 bars old, and then pauses, the 50% to 79% band is the box. On a 100 to 110 leg the band is 105 to 102.1.
Trapline settingsEvery setting, explained.
| Setting | Default | Range | What it changes |
|---|---|---|---|
| Swing length | 3 | 2 to 30 | Bars each side of a swing. Not a kernel length. |
| Swings that can be trapped | 3 | 1 to 10 | How many recent swings are still allowed to be a trap. |
| Pullback zone from % | 50 | 10 to 90 | The near edge of the box, as a percent of the leg. |
| to % | 79 | 20 to 100 | The far edge. On a 10-point leg, 79% is 7.9 points, so 110 becomes 102.1. |
| Past traplines to keep | 20 | 0 to 100 | How many finished sequences stay, drawn faint. |
| Swing labels (HH/HL/LH/LL) | Off | On or off | Tags on the swings. Off by default. |
| Step guide | On | On or off | The on-chart step notes. |
| Longs | #089981 | Any colour | Colour of an up sequence. |
| Shorts | #f23645 | Any colour | Colour of a down sequence. |
| ATR length | 14 | Fixed | Used only to require a leg of 1.5 ATR. Not an input. |
- Setting
- Swing length
- Default
- 3
- Range
- 2 to 30
- What it changes
- Bars each side of a swing. Not a kernel length.
- Setting
- Swings that can be trapped
- Default
- 3
- Range
- 1 to 10
- What it changes
- How many recent swings are still allowed to be a trap.
- Setting
- Pullback zone from %
- Default
- 50
- Range
- 10 to 90
- What it changes
- The near edge of the box, as a percent of the leg.
- Setting
- to %
- Default
- 79
- Range
- 20 to 100
- What it changes
- The far edge. On a 10-point leg, 79% is 7.9 points, so 110 becomes 102.1.
- Setting
- Past traplines to keep
- Default
- 20
- Range
- 0 to 100
- What it changes
- How many finished sequences stay, drawn faint.
- Setting
- Swing labels (HH/HL/LH/LL)
- Default
- Off
- Range
- On or off
- What it changes
- Tags on the swings. Off by default.
- Setting
- Step guide
- Default
- On
- Range
- On or off
- What it changes
- The on-chart step notes.
- Setting
- Longs
- Default
- #089981
- Range
- Any colour
- What it changes
- Colour of an up sequence.
- Setting
- Shorts
- Default
- #f23645
- Range
- Any colour
- What it changes
- Colour of a down sequence.
- Setting
- ATR length
- Default
- 14
- Range
- Fixed
- What it changes
- Used only to require a leg of 1.5 ATR. Not an input.
Trapline strategiesUse it in 3 setups.
Wait for the box
Traders often wait until the leg has paused and the box is actually drawn. The script does not place the trade.
Read a long box under the high
That is the default 50% to 79% band of a 10-point rise. The middle is 103.55.
Drop a trap that closes through
A wick that does not close back inside is not kept.
Trapline mistakesCommon mistakes.
Treating a one-bar bounce as a leg
The leg needs 1.5 times the 14-bar ATR and at least 3 bars after the trap. A single wide bar is not enough.
Counting a nick of the first line
The pullback is a later bar that reaches the middle of the box. Touching only the near edge does not complete it.
Looking for an arrow
There is no buy arrow, no sell arrow, and no target or stop. The box is the whole output.
Trapline combinationsPair it with these.
Trapline + ATR
The script uses a fixed 14-bar ATR, times 1.5, as the smallest leg. The ATR indicator shows that range on its own.
Trapline + ZigZag
ZigZag also marks swings. Trapline uses a 3-bar pivot and then asks for a failed break of one of them.
Trapline + EMA
The EMA is a separate read of direction. Trapline's trend comes from swing structure, not from the average.
Trapline FAQQuestions traders ask.
What are the Trapline settings?
Swing length 3, swings that can be trapped 3, pullback zone from 50% to 79%, 20 past sequences, swing labels off, step guide on. ATR is fixed at 14.
Where is the engine file?
There is none. Trapline lives as a Community script. The defaults are that script's inputs.
What is the worked box?
A leg from 100 to 110. Top 105, bottom 102.1, middle 103.55, at the default 50% and 79%.
When does the box appear?
After the leg is at least 1.5 ATR and at least 3 bars past the trap, and a bar fails to extend it.
What completes the pullback?
A later bar that reaches the middle of the box. A wick that only touches the first line does not.
Are there arrows?
No. No buy or sell arrows, and no target or stop lines. Past sequences are drawn faint.
Does the forming bar count?
No. Steps are judged on closed bars. The bar that is still forming is left out.
Who made Trapline?
It is Joe's model from September 2026, not a published classical indicator. The script draws the box and leaves the trade to the reader.
Related indicatorsMore trend tools.
All trend indicatorsTry Trapline on a live chart.
Free. No download.
Works in your browser and on iPhone too.