OPEN-SOURCE SCRIPT

Fibonacci Retracement Levels

58
📘 User Guide & Detailed Explanation
📌 Overview

This indicator automatically plots Fibonacci retracement levels on your chart based on the highest high and lowest low within a chosen lookback period. It helps traders quickly identify potential support and resistance zones derived from Fibonacci ratios.

Unlike manual Fibonacci drawing tools, this script continuously updates the levels as new candles form, saving time and ensuring consistency.

⚙️ Inputs & Settings

  • Show Fibonacci Retracement (true/false)


Toggle the Fibonacci levels on or off.

  • Fib Lookback Range (bars)


Defines how many past candles are used to find the swing high and swing low.

Example: If set to 100, the indicator scans the last 100 bars for the highest high and lowest low, then plots the retracement levels between those two points.

  • Fib Levels to Show


All → Displays all common retracement levels (0%, 23.6%, 38.2%, 50%, 61.8%, 78.6%, 100%).

Main only → Displays only the key levels (38.2%, 50%, 61.8%) with thicker lines for emphasis.

None → Hides all Fibonacci levels (useful if you just want to see high/low markers).

📊 What Appears on the Chart

Horizontal Fib Lines:

The retracement levels are drawn across the chart.

  • 38.2% (green), 50% (orange), 61.8% (red) → Main Fibonacci levels that often act as strong support/resistance.


  • Other levels (0%, 23.6%, 78.6%, 100%) → Optional additional retracements.


Range High Marker (red triangle up):

Marks the highest high within the lookback range.

Range Low Marker (green triangle down):

Marks the lowest low within the lookback range.

🛠 How to Use It

  1. Identify Swing Points Automatically


No need to manually draw retracements. The script automatically picks the highest and lowest points in the selected range.

  1. Trade Reversals & Pullbacks


Buyers often look for price to bounce near 38.2% or 61.8% retracement levels.

Sellers often target retracements during rallies.

  1. Trend Continuation


If price breaks through a level and holds, the next Fibonacci level becomes the next target zone.

Combine with Other Tools

Works best when combined with:

Support/Resistance zones

Candlestick patterns

Trend indicators (EMA, SMA, MACD)

📈 Example Use Cases

In an uptrend, use the indicator to find pullback entries at 38.2%–61.8% retracements.

In a downtrend, watch for rejection at retracement levels as potential continuation signals.

On range-bound markets, Fibonacci levels often line up with key support/resistance.

⚠️ Notes & Limitations

Fibonacci levels are not guaranteed reversal points — they are probability-based support/resistance areas.

The lookback range setting is crucial. Too short = noisy signals, too long = levels may not reflect the most recent swing.

Should always be used with other confirmation tools (volume, trend analysis, candlestick structure).

📝 Credits & License

This script is published as open source for educational and trading purposes.
You are free to use, share, and modify it under TradingView’s open-source script guidelines.

Regards,
Shunya.Trade
world wide web shunya dot trade

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.