OPEN-SOURCE SCRIPT
Updated

Swing Leg 61.8% Fib

621
Utilizes `ta.pivothigh` and `ta.pivotlow` to detect the most recent Swing High and Swing Low at the close of each candlestick (default lookback period: 5 bars; adjustable).

Automatically calculates the 61.8% Fibonacci retracement level based on the most recent swing leg, marking the corresponding price with a solid orange line.

Additionally, the current Swing High and Swing Low are highlighted using red and green dashed lines, respectively (this feature can be disabled in the settings).
The calculations and plotted lines are automatically recalculated and updated with every confirmed candlestick.
Release Notes
Utilizes `ta.pivothigh` and `ta.pivotlow` to detect the most recent Swing High and Swing Low at the close of each candlestick (default lookback period: 5 bars; adjustable).

Automatically calculates the 61.8% Fibonacci retracement level based on the most recent swing leg, marking the corresponding price level with a solid orange line.

Additionally highlights the current Swing High and Swing Low using dashed red and green lines, respectively (this feature can be disabled in the settings).

The plotted lines are recalculated and updated with every confirmed candlestick.

Disclaimer

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.