SwingArm ATR Trail
An ATR trailing stop that flips with the trend, pullback zones at 50, 61.8 and 78.6 percent between the stop and the trend's extreme, and the track record of entries into the zone.
mdtSwingArmA trail that flips, zones that fill.
The trail
In a long trend the trail sits 3 ATR(14) below the trend's extreme by default and only ratchets up; the trend flips when a bar closes through the previous bar's trail. Mirror for short. Each bar is judged against the trail in force during it, the previous bar's.
Pullback zones at 50, 61.8 and 78.6 percent
Measured from the trend's extreme back to the trail and recomputed every bar from closed data; shaded between 50 and 61.8 and between 61.8 and 78.6.
Zone marks and flip marks
The first bar of a pullback that reaches a deeper zone gets a mark beyond its extreme; flip bars are marked. Nothing is drawn on a candle or on the line.
Zone entries, one per pullback
The first bar to trade into the 50 percent level after a new extreme fills there, or at the open when the bar opens beyond it; stop at the trail, target the trend's extreme. A new extreme re-arms the next entry. A pullback bar that then closes through the trail counts as a stop-out in its own bar.
The track record on the chart's bars
The stop counts first, and in the entry bar only the stop counts; a time stop of 40 bars by default; slippage and commission included. The panel shows the entries, targets, stops, timed out and the average net R.
Series for strategies, and alerts
Trend, Trail, the three zone levels and a Signal on a zone entry are exposed for a NinjaScript strategy. Alerts on a trend flip and on a zone entry.
What it looks like in a session.
The trail as a trend definition.
An ATR trailing stop is the simplest honest definition of a trend: the stop follows price at a distance scaled to recent volatility, moves only in the trend's direction, and the trend is over when a bar closes through it. The SwingArm idea adds Fibonacci retracement zones between the stop and the trend's extreme, so a pullback can be measured against the room the trend has before it would flip. SwingArm ATR Trail draws that picture and adds a record of what happened when price entered the zone.
The step line is the trail, coloured by the trend; a riser where it changes marks a new level. The shaded bands are the zones in force during each bar. A mark beyond a bar shows the deepest zone it reached; a flip bar carries its own mark. An entry shows its fill, stop and target until the outcome, then the result in R beside it. The corner panel is the record of all zone entries as of the bar in view.
The zones do not predict where a pullback ends; they say how deep it has gone relative to the trail. The record is the chart's own history on its own bars, costs included, and shows its n. ATR period, trail distance, time stop, slippage and commission are settings and rebuild live.
Every setting, explained.
Read from the indicator's own settings, so this table always matches the current build.
| Group | Setting | What it does |
|---|---|---|
| Trail | ATR period (chart bars) | |
| Trail distance (x ATR) | ||
| Track record | Time stop (bars) | |
| Slippage (ticks per side) | ||
| Commission (per round turn) | Futures only; other instruments count the slippage only. | |
| Alerts | Alert on a trend flip | |
| Alert on a zone entry |
One license. Every tool.
SwingArm ATR Trail is one of 76 tools in the Suite.