Trend Indicators

Parabolic SAR: Trailing Stops & Reversals | AlfaTactix

📖 6 min read

📝 1,031 words

🏷️ Trend Indicators

In this page: what Parabolic SAR is, how it works, when to use it, a practical example with code, and a bonus tip.

Use Parabolic SAR in a real strategy—no code required

Create a free account to save your progress and build strategies with this indicator and 80+ others in minutes. Backtest, then export to MQL5.


Parabolic SAR on a price chart: illustration of the indicator and how it is used in technical analysis
Parabolic SAR – chart illustration

Parabolic SAR (Stop and Reverse) Indicator Explanation

The Parabolic SAR (Stop and Reverse) is a trend-following indicator that provides entry and exit signals along with dynamic stop-loss levels. Developed by J. Welles Wilder Jr. in 1978 and introduced in his book "New Concepts in Technical Trading Systems," Parabolic SAR appears as dots above or below price on a chart. When dots are below price, it indicates an uptrend and provides trailing stop-loss levels. When dots are above price, it indicates a downtrend and provides trailing stop-loss levels. The indicator accelerates as the trend progresses, making it particularly effective for capturing extended trends while managing risk through dynamic stop-losses.

How Parabolic SAR Works: Parabolic SAR is calculated using an acceleration factor (AF) that starts at 0.02 and increases by 0.02 each time a new extreme price (EP) is reached, up to a maximum of 0.20. The formula is: SAR = Prior SAR + AF × (EP - Prior SAR). In an uptrend, the EP is the highest high since the trend began, and in a downtrend, the EP is the lowest low. The SAR dots flip from below price to above price (or vice versa) when price crosses the SAR level, signaling a trend reversal. The acceleration factor ensures that the SAR moves closer to price as the trend progresses, providing tighter stop-losses in strong trends.

When to Use Parabolic SAR:

  • Trend Following with Trailing Stops: Parabolic SAR is highly effective for trend-following strategies as it provides clear entry signals (when SAR flips below price) and exit signals (when SAR flips above price) with automatic trailing stop-loss levels. The indicator works best in trending markets with clear directional movement.
  • Dynamic Stop-Loss Management: The accelerating nature of Parabolic SAR means that stop-losses tighten as trends progress, allowing traders to lock in profits while staying in strong trends. This feature makes it valuable for managing risk in extended trends.
  • Trend Reversal Identification: When Parabolic SAR flips from one side of price to the other, it signals a potential trend reversal. This can be used to exit existing positions and enter new positions in the opposite direction.

Advantages:

  • Provides clear, objective entry and exit signals without requiring interpretation, making it easy to implement in automated trading systems. The automatic trailing stop feature helps with risk management.
  • The accelerating stop-loss mechanism allows traders to lock in profits as trends progress, improving risk-reward ratios in strong trending markets. The stop-losses tighten automatically as trends strengthen.
  • Works effectively in trending markets across multiple asset classes, including stocks, forex, commodities, and cryptocurrencies. The indicator is particularly useful for medium to long-term trend following.

Limitations:

  • Parabolic SAR can produce false signals in ranging or sideways markets when price oscillates around the indicator, leading to whipsaws and multiple small losses. The indicator works best in clearly trending markets with sustained directional movement.
  • The indicator may lag behind price movements during rapid trend changes, as it relies on extreme prices and acceleration factors. This lag can result in delayed entry and exit signals, potentially missing significant portions of profitable moves.
  • Parabolic SAR does not provide information about trend strength or momentum, only trend direction and stop-loss levels. Traders should combine it with momentum indicators for more comprehensive analysis.

In summary, Parabolic SAR is a valuable trend-following indicator that provides clear signals with dynamic trailing stop-losses, making it ideal for traders seeking to capture extended trends while managing risk. For comprehensive understanding, refer to Wilder's original work "New Concepts in Technical Trading Systems" (1978), Investopedia's Parabolic SAR guide, TradingView's Parabolic SAR documentation, and academic research on trend-following indicators in technical analysis published in journals such as the Journal of Financial Markets and the Review of Financial Studies.

Practical Example: Using the Parabolic SAR Indicator in a Trading Strategy

The Parabolic SAR (Stop and Reverse) is a trend-following indicator used to identify trend direction and provide dynamic trailing stop-loss levels. In a trading strategy, the Parabolic SAR indicator helps traders make entry and exit decisions based on trend direction with automatic stop-loss management.

Scenario: You're creating a trend-following strategy for Gold (XAU/USD) on a 1-hour chart. You want to buy when Parabolic SAR flips below price (indicating uptrend) and sell when it flips above price (indicating downtrend), using the SAR dots as trailing stop-losses.

Strategy Logic:

  • Calculate the Parabolic SAR(0.02, 0.20) with an initial acceleration factor of 0.02 and a maximum of 0.20. The Parabolic SAR provides clear buy signals when dots flip below price and sell signals when dots flip above price, with the dots acting as trailing stop-losses.
  • Buy signal: When Parabolic SAR dots flip from above price to below price, indicating an uptrend has begun. The dots below price act as trailing stop-losses that accelerate as the trend progresses.
  • Sell signal: When Parabolic SAR dots flip from below price to above price, indicating a downtrend has begun or the uptrend has ended. Exit the position immediately.

Backtrader Example:

import backtrader as bt

class ParabolicSARStrategy(bt.Strategy):
    params = dict(
        af_start=0.02,
        af_increment=0.02,
        af_max=0.20
    )
    
    def __init__(self):
        self.psar = bt.ind.PSAR(af=self.p.af_start, afmax=self.p.af_max)
        
    def next(self):
        if not self.position:
            # Buy when SAR flips below price (uptrend)
            if (self.data.close[0] > self.psar[0] and 
                self.data.close[-1] <= self.psar[-1]):
                self.buy()
        else:
            # Sell when SAR flips above price (downtrend)
            if (self.data.close[0] < self.psar[0] and 
                self.data.close[-1] >= self.psar[-1]):
                self.sell()

# Usage
cerebro = bt.Cerebro()
cerebro.addstrategy(ParabolicSARStrategy)

Expected Outcome: By using the Parabolic SAR indicator, your strategy follows trends with clear entry and exit signals, while the trailing stop-loss feature helps lock in profits as trends progress. This approach leads to better trend-following performance, improved profit protection, and enhanced risk management by automatically adjusting stop-losses as trends strengthen.

💡 Bonus Tip

Consider using Parabolic SAR in combination with ADX for trend strength confirmation. When Parabolic SAR indicates an uptrend and ADX is above 25, it suggests a strong trend with higher probability of continuation. This technique, documented in Wilder's original methodology, can significantly improve the reliability of Parabolic SAR-based trading strategies.

Using the Parabolic SAR indicator ensures your strategy follows trends effectively with dynamic trailing stop-losses, improving entry and exit timing based on trend direction and automatic risk management.

Use Parabolic SAR in a real strategy—no code required

Create a free account to save your progress and build strategies with this indicator and 80+ others in minutes. Backtest, then export to MQL5.

Try Strategy Builder

Use this indicator in Strategy Builder — free

Create free account