2002issue C041-7
Parabolic SAR construction from stop outputs to reversal signals
A multiple-output Parabolic SAR construction can expose today's stop, tomorrow's initial stop, end-of-bar position, and a reversal-day flag. A three-parameter form with a switch from 1 through 6 is six formulas in one.
- A multiple-output construction can expose today's stop, tomorrow's initial stop, end-of-bar position, and a reversal-day flag at once.
- Today's stop can differ from the next-bar initial stop on reversal days, so a current-bar plot is not the same object as the next-bar order price.
- A switch-parameter from 1 through 6 selects today's stop, tomorrow's stop, or a reversal flag, using highs and lows or closes only.
- End-of-bar position encoded as 1 or -1 is enough to write long-entry and short-entry rules from the position channel alone.
Four channels in one construction
Parabolic SAR is a stop-and-reverse construction that updates a stop from extreme prices and an acceleration factor, then can emit today's stop, tomorrow's stop, a position flag, or a reversal flag.
A multiple-output construction can expose four named channels at once. oParCl is today's stop. oParOp is tomorrow's initial stop. oPosition is the end-of-bar position. oTransition is a reversal-day flag.
In that construction, the acceleration-factor step is generally set to 0.02 and the acceleration-factor limit is generally set to 0.2. The acceleration-factor step is the increment applied to the acceleration factor as a trend continues. The acceleration-factor limit is the ceiling on the acceleration factor.
Today's stop versus the next-bar order
Today's stop output can differ from the initial stop on reversal days. oParCl is the constructed stop for the current bar and differs from the initial stop on reversal bars. oParOp is the constructed initial stop for the next bar. A plot of the current-bar stop is not the same object as the next-bar order price.
oPosition encodes end-of-bar position as 1 for long or -1 for short. oTransition returns 1 or -1 on a flip and 0 on a holding bar. Reversal days return 1 or -1 while holding days return 0. That encoding is enough to write long-entry and short-entry rules from the position channel alone.
Parabolic SAR stop on daily DJ_D1

Read off the labeled 49.12–56.97 price scale at roughly one sample every few sessions. Precision is about 0.1 point; the unused DMI pane was not digitized.
A switch that selects six formulas
A three-parameter SAR formula with a switch-parameter from 1 through 6 is six formulas in one. The switch-parameter is an integer selector that chooses which SAR output to return and whether highs and lows or closes alone enter the calculation. The six forms cover highs and lows or closes only, and either today's stop, tomorrow's stop, or a reversal flag.
Switch 1 overlays today's stop on today's bars so reversals appear when bars penetrate the stops. Switch 2 returns tomorrow's stop so an order can be placed in advance. Switch 3 marks a short-to-long reversal as 1, a long-to-short reversal as -1, and a non-reversal as 0. Switches 4 through 6 repeat those three outputs using closes only.
Wrappers and a separate increment
Wrapper functions can hide the extra channels and return only today's stop. A custom wrapper still lets the caller set the acceleration-factor step and limit.
An alternate four-parameter form increments the acceleration factor by a separate increment argument instead of reusing the initial-value argument as the increment.
All readings on this track · 21 readings
- 1987Constructing parabolic stops and cycle-window averages
- 1989Evaluating always-in parabolic SAR trailing stops
- 1993Constructing parabolic time-price trailing stops
- 1995Constructing parabolic SAR as an accelerating trail
- 1995Constructing a noise-buffered parabolic trailing stop
- 1997Constructing a parabolic trailing stop that only tightens
- 1998Triangle breakouts filtered by an exponential average and exited with parabolic stops
- 2000Treat volume-price imbalance as a hypothesis and let Parabolic SAR hold the exit
- 2002Constructing volatility stops from average true range and parabolic SAR
- 2002Parabolic SAR construction from stop outputs to reversal signals
- 2002Always-in-market SAR trail with directional confirmation
- 2004Forex trend confirmation with Average Directional Index, Parabolic SAR, and trendlines
- 2006Permission and fill gates for mechanical systems
- 2008A Relative Strength Index channel for profit lock and a trailing stop for capital protection
- 2010Building loss limits from the parabolic stop-and-reverse plot
- 2015Dual-zone currency indexes filter parabolic SAR signals
- 2016A parabolic trailing stop is not a complete system
- 2019Assigning jobs in a stochastic, parabolic, and moving-average stack
- 2019A three-filter stack as a redundancy test
- 2020Mechanical Parabolic SAR as an always-in flip after a breakout
- 2020Layering Relative Strength Index, MACD, and Parabolic SAR onto relative rotation maps