OPEN-SOURCE SCRIPT
Mis à jour 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
Notes de version
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
Notes de version
🚀 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]
Notes de version
UPDATE RELEASE – Auto-Fibonacci Levels [ChartWhizzperer] Version 2.1 – Price-Scale Stability & PSv6 Refinement
This update focuses on rock-solid price-scale stability — your Fibonacci levels now stay exactly where the market says they are.
──────────────────────────────
WHAT’S NEW – VISUAL STABILITY & PSv6 POLISH
1) Price-Scale Stability (Fixed Y-Axis Drift)
• All Fibonacci levels are now fully anchored to the price scale.
• Implemented invisible autoscale anchors using plot(..., trackprice = true) with full transparency, keeping every level and label locked to its exact price even while you pan or zoom vertically.
• Removed the unstable scale = scale.none parameter that caused desyncs between candles and levels.
• Labels remain at yloc.price and follow their level precisely under all chart movements.
2) Cleaner, Faster & Safer PSv6 Engine
• Rewritten to strict single-line ternaries (no multi-line logic).
• Arrays and objects now fully guarded against empty or index errors.
• Drawing and reset cycles are leak-free and optimized for performance.
• Visuals, alerts, and UI remain unchanged — only the internals are stronger.
3) Classic vs. Live Mode – Sturdier than Ever
• Classic Mode (non-repainting) updates only on confirmed pivot highs/lows.
• Live Mode (rolling window) adapts in real time within the swing window — now equally scale-anchored for perfect visual sync.
──────────────────────────────
KEY FEATURES (UPDATED SUMMARY)
• True Autoscale Lock – levels and labels stay price-anchored under any zoom or scale change.
• Two Modes, One Click – Classic (non-repainting pivots) or Live (rolling window).
• Elegant Visuals – dashed lines, precise labels aligned to the price scale.
• Lightweight Core – PSv6 arrays, runtime guards, single-pass drawing.
• Flexible UI – Swing Detection Length, color picker, label size.
• Full Alert Suite – per-level Up/Down alerts, machine-readable payloads for automation.
──────────────────────────────
TECHNICAL HIGHLIGHTS
• Eliminated runtime risks (array access checks and bounds).
• Removed legacy transp calls and replaced with color.new(..., 100) for true PSv6 compliance.
• Optimized autoscale handling via transparent anchor plots (kept in scale).
• Fully compile-clean, no warnings or deprecated syntax.
──────────────────────────────
WHY IT MATTERS
• Levels, labels, and candles stay perfectly aligned — no visual drift when scrolling or resizing.
• Screenshots and replays show exact price relations.
• A cleaner, more professional charting experience for Fibonacci traders.
──────────────────────────────
COMPATIBILITY & USE
• TradingView Pine Script v6 fully compliant.
• Works with all chart types and timeframes.
• Ideal for price-action and Fibonacci structure analysis.
• Alerts plug-and-play for PineConnector and any automation workflow.
──────────────────────────────
LICENCE
CC BY-NC-SA 4.0 – Non-Commercial Use Only, Attribution Required
© ChartWhizzperer | 2025
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.