OPEN-SOURCE SCRIPT
Fibonacci Retracement Levels

📘 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
Toggle the Fibonacci levels on or off.
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.
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.
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
No need to manually draw retracements. The script automatically picks the highest and lowest points in the selected range.
Buyers often look for price to bounce near 38.2% or 61.8% retracement levels.
Sellers often target retracements during rallies.
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
📌 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
- Identify Swing Points Automatically
No need to manually draw retracements. The script automatically picks the highest and lowest points in the selected range.
- Trade Reversals & Pullbacks
Buyers often look for price to bounce near 38.2% or 61.8% retracement levels.
Sellers often target retracements during rallies.
- 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
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
I am nothing
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
I am nothing
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。