OPEN-SOURCE SCRIPT
Aggiornato Auto-Fibonacci Levels [ChartWhizzperer]

Auto-Fibonacci Levels [ChartWhizzperer]
Discover one of the most elegant and flexible Fibonacci indicators for TradingView – fully automatic, tastefully understated, and built entirely in Pine Script V6.
Key Features:
- Automatically detects the most recent swing high and swing low.
- Plots Fibonacci retracement levels and extensions (including 161.8%, 261.8%) perfectly aligned
to the prevailing trend.
- Distinctive, dashed lines with crystal-clear price labels right at the price scale
for maximum clarity.
- Line length and label offset are fully customisable for your charting preference.
- Absolutely no repainting: Only confirmed swings are used for reliable signals.
- Parameter: "Swing Detection Length"
The “Swing Detection Length” parameter determines how many bars must appear to the left and right of a potential high or low for it to be recognised as a significant swing point.
- Higher values make the script less sensitive (only major turning points are detected).
- Lower values make it more responsive to minor fluctuations (more fibs, more signals).
For best results, adjust this setting according to your preferred timeframe and trading style.
Pro Tip:
Fibonacci levels refresh automatically whenever a new swing is confirmed.
Ideal for price action enthusiasts and Fibonacci purists alike.
Licence:
// Licence: CC BY-NC-SA 4.0 – Non-commercial use only, attribution required.
// © ChartWhizzperer
Discover one of the most elegant and flexible Fibonacci indicators for TradingView – fully automatic, tastefully understated, and built entirely in Pine Script V6.
Key Features:
- Automatically detects the most recent swing high and swing low.
- Plots Fibonacci retracement levels and extensions (including 161.8%, 261.8%) perfectly aligned
to the prevailing trend.
- Distinctive, dashed lines with crystal-clear price labels right at the price scale
for maximum clarity.
- Line length and label offset are fully customisable for your charting preference.
- Absolutely no repainting: Only confirmed swings are used for reliable signals.
- Parameter: "Swing Detection Length"
The “Swing Detection Length” parameter determines how many bars must appear to the left and right of a potential high or low for it to be recognised as a significant swing point.
- Higher values make the script less sensitive (only major turning points are detected).
- Lower values make it more responsive to minor fluctuations (more fibs, more signals).
For best results, adjust this setting according to your preferred timeframe and trading style.
Pro Tip:
Fibonacci levels refresh automatically whenever a new swing is confirmed.
Ideal for price action enthusiasts and Fibonacci purists alike.
Licence:
// Licence: CC BY-NC-SA 4.0 – Non-commercial use only, attribution required.
// © ChartWhizzperer
Note di rilascio
Auto-Fibonacci Levels [ChartWhizzperer]Discover one of the most elegant and flexible Fibonacci indicators for TradingView – fully automatic, tastefully understated, and built entirely in Pine Script V6.
Key Features:
- Automatically detects the most recent swing high and swing low.
- Plots Fibonacci retracement levels and extensions (including 161.8%, 261.8%) perfectly
aligned to the prevailing trend.
- Distinctive, dashed lines with crystal-clear price labels right at the price scale
for maximum clarity.
- Line length and label offset are fully customisable for your charting preference.
- Absolutely no repainting: Only confirmed swings are used for reliable signals.
- Parameter: "Swing Detection Length"
The “Swing Detection Length” parameter determines how many bars must appear to the left and right of a potential high or low for it to be recognised as a significant swing point.
- Higher values make the script less sensitive (only major turning points are detected).
- Lower values make it more responsive to minor fluctuations (more fibs, more signals).
For best results, adjust this setting according to your preferred timeframe and trading style.
Pro Tip:
Fibonacci levels refresh automatically whenever a new swing is confirmed.
Ideal for price action enthusiasts and Fibonacci purists alike.
Licence:
// Licence: CC BY-NC-SA 4.0 – Non-commercial use only, attribution required.
// © ChartWhizzperer
Note di rilascio
🚀 Update Release: Auto-Fibonacci Levels [ChartWhizzperer & Sunny Pro] – Dynamic EditionDear Community,
we are excited to present the biggest update ever for the popular Auto-Fibonacci indicator!
This release is the result of deep collaboration with power users, PineConnector developers, and the community.
You’ll gain more flexibility, precision, and brand-new possibilities for automation, alerting, and professional trading workflows.
🌟 What’s New?
1. Switchable Modes: PIVOT vs. LIVE (Realtime)
Classic PIVOT Mode:
Fibonacci levels are calculated based on confirmed swing highs and lows (Pivot Detection, non-repainting).
→ No retroactive changes! Levels remain as soon as a swing is confirmed.
Brand-New LIVE Mode (Rolling High/Low):
With just a click on the new checkbox in the UI, you can switch to “Live Mode”:
Fibo levels continuously adapt to the highest and lowest prices within the current swing detection window (rolling window logic).
Maximum reactivity: Lines adjust in real-time, so you always see the relevant Fibo structure as the market moves!
Note: This is perfect for short-term traders, but is repainting (levels can move retrospectively).
Bottom line:
Ultimate flexibility! Choose between classic pivot logic or dynamic real-time adjustment.
2. 100% Pine Script v6 Compliance, Lightning Fast & Robust
Completely refactored engine:
- Full PSv6 arrays and objects, bulletproof error handling, no risk of array or index errors.
- Every operation (deleting lines/labels, alert triggers) is airtight and secure.
- All calculations (draw, reset, alert) are single-line, maintainable blocks.
- Fully compatible with all TradingView versions and templates.
3. User-Friendly Inputs
- All key settings are neatly organized in the “Fibonacci Settings” UI group:
- Swing Detection Length
- Fibo line color picker
- Live Mode (ON/OFF, dynamic toggle)
- Enable or disable all features with just a click.
4. Smart Object Management
- Automatic cleanup:
- On mode switch or new range detection, all previous lines/labels are completely deleted.
- No more chart clutter or “ghost” objects.
- Dedicated arrays for lines and labels keep your chart lightning-fast, even with many swings/ranges.
5. Power Alerts: Perfect for PineConnector & Automation
- Every Fibonacci level (and direction, Up/Down) has its own alertcondition.
- Machine-readable alert messages
Each signal includes:
- Level (e.g., FIBLEVEL=61.8%)
- Direction (DIR=UP or DIR=DOWN)
- Symbol (SYMBOL={ticker})
- Trigger price (PRICE={close})
Example alert message:
FIBLEVEL=61.8% DIR=UP SYMBOL={ticker} PRICE={close}
Instant PineConnector-Ready!
No remapping or manual adjustment required.
You can connect to any workflow, bot, webhook, or trading automation immediately.
6. Error Tolerance & Future-Proof Design
- All typical Pine Script error sources have been eliminated:
- No dynamic strings in alert titles/messages (100% TradingView compliant).
- Every array and object operation is checked for existence before execution.
- No inconsistencies, even when switching quickly between Live/Pivot mode.
7. Maximum Clarity & Documentation
Sectioned code structure:
- Every part of the script is clearly organized and commented (in English, internationally usable).
- Copy & Paste Ready:
- The entire indicator is ready to drop into TradingView, with no manual tweaking needed.
8. Who Is This Update For?
- Scalpers & Real-Time Traders:
- Live Mode gives you maximum agility and perfect signals for fast moves and breakouts.
- Swing & Position Traders:
- Pivot Mode delivers non-repainting levels, ideal for setups that rely on strict chart history.
- Automation fans & PineConnector users:
- No more hacks or workarounds – every alert is instantly machine-readable and uniquely addressable.
9. Best Practice & Notes
- Live Mode is repainting! If you require perfect signal history, stick to Pivot Mode.
- You can switch between modes anytime – adapt to market phase, instrument, or your personal style.
- For PineConnector users, you may want to add custom order syntax in the TradingView alert window for even more automation.
We wish you great success with the new Auto-Fibonacci [ChartWhizzperer]!
For feedback, feature requests, or questions:
Leave a comment below,
Or contact me directly via PM,
Happy Trading! [ChartWhizzperer]
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.