Custom Fibonacci Support & Resistance Lines

The script detects the latest confirmed swing high and swing low on the chart and calculates two adaptive lines:
A Fibonacci Support Line below price (retracement from swing high to swing low).
A Fibonacci Resistance Line above price (retracement from swing low to swing high).
Both levels are smoothed using a simple moving average for a cleaner visual appearance — similar to an adaptive support/resistance band that follows recent market structure.
⚙️ Features
🔹 Auto-detects swing highs & lows using left/right bar pivots.
🔹 Adjustable Fibonacci levels for both Support and Resistance.
🔹 Adjustable smoothing length for smoother or more reactive lines.
🔹 Works across any timeframe and instrument.
🔹 Ideal for spotting potential reversal zones, trend continuation areas, and dynamic price support/resistance.
🧮 Default Settings
Fibonacci Level (Support) = 0.618
Fibonacci Level (Resistance) = 0.618
Left/Right Swing Bars = 5 / 5
Smoothing Length = 3
💡 Usage Tips
Combine these dynamic Fibonacci lines with trend indicators (EMA, RSI, or structure breaks) to confirm entries.
Increase Left/Right Swing Bars for stronger structural pivots on higher timeframes.
Change Fibonacci Levels (e.g., 0.382, 0.5, 0.786) to visualize multiple retracement zones.
สคริปต์แบบเฉพาะผู้ได้รับเชิญเท่านั้น
เฉพาะผู้ใช้ที่ได้รับการอนุมัติจากผู้เขียนเท่านั้นที่สามารถเข้าถึงสคริปต์นี้ได้ คุณจะต้องร้องขอและได้รับอนุญาตก่อนจึงจะสามารถใช้งานได้ โดยปกติจะได้รับอนุญาตหลังจากชำระเงินแล้ว สำหรับรายละเอียดเพิ่มเติม ทำตามคำแนะนำของผู้เขียนด้านล่างหรือติดต่อ ChartTechnical โดยตรง
TradingView ไม่แนะนำให้ชำระเงินหรือใช้สคริปต์ เว้นแต่ว่าคุณจะเชื่อถือผู้เขียนสคริปต์และเข้าใจวิธีการทำงานของมัน คุณยังอาจพบทางเลือกของโอเพนซอร์ส แบบฟรีในสคริปต์ชุมชนของเรา
คำแนะนำของผู้เขียน
คำจำกัดสิทธิ์ความรับผิดชอบ
สคริปต์แบบเฉพาะผู้ได้รับเชิญเท่านั้น
เฉพาะผู้ใช้ที่ได้รับการอนุมัติจากผู้เขียนเท่านั้นที่สามารถเข้าถึงสคริปต์นี้ได้ คุณจะต้องร้องขอและได้รับอนุญาตก่อนจึงจะสามารถใช้งานได้ โดยปกติจะได้รับอนุญาตหลังจากชำระเงินแล้ว สำหรับรายละเอียดเพิ่มเติม ทำตามคำแนะนำของผู้เขียนด้านล่างหรือติดต่อ ChartTechnical โดยตรง
TradingView ไม่แนะนำให้ชำระเงินหรือใช้สคริปต์ เว้นแต่ว่าคุณจะเชื่อถือผู้เขียนสคริปต์และเข้าใจวิธีการทำงานของมัน คุณยังอาจพบทางเลือกของโอเพนซอร์ส แบบฟรีในสคริปต์ชุมชนของเรา
