OPEN-SOURCE SCRIPT

Swing Pivot Pullback Detector

44

Identifies pullback movements that occur immediately after a confirmed swing pivot in price.
It focuses on recognizing how deep the retracement travels relative to the most recent price leg, helping traders visualize short-term corrections that often precede trend continuations or reversals.

How It Works

  • The script uses built-in pivot logic to confirm swing highs and lows, defined by a user-set number of left and right bars.

  • Once a pivot of the opposite type forms, the indicator measures the retracement that develops from the end of that leg.

  • When a valid pullback is found, a small label appears on the chart showing the percentage size of that retracement compared to the previous pivot leg.

  • Optional alerts can notify the user when a pullback exceeds the specified minimum retrace percentage.


Inputs

  • Pivot left/right bars: define how far back and forward a swing point must extend to be confirmed.

  • Lookback: limits how many bars are scanned when searching for the pullback extreme.

  • Min retrace %: sets the smallest correction percentage to trigger an alert.

  • Show label / Enable alert: toggle visual or alert output.


Usage

This tool is most useful for visual analysis of price rhythm, measuring the strength of retracements within ongoing swings.
It does not generate trade signals on its own but can complement manual or algorithmic methods that rely on pullback structure or market symmetry.

Pernyataan Penyangkalan

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.