OPEN-SOURCE SCRIPT
Fibonacci Pivot Oscillator

FIB PIVOT OSCILLATOR - Price Position Indicator
See exactly WHERE your price sits between Fibonacci pivot levels. This oscillator normalizes price position relative to classic Pivot Points, giving you a clear view of market structure.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 WHAT DOES IT DO?
Instead of cluttering your chart with multiple pivot lines, this indicator displays a single oscillator showing WHERE price is within the pivot range. Instantly see if price is in support or resistance territory.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙️ HOW IT WORKS
1. Calculates Standard Pivot Point from previous period:
Pivot = (High + Low + Close) / 3
2. Applies Fibonacci ratios to determine Support/Resistance levels:
• R1/S1 = Pivot ± (Range × 38.2%)
• R2/S2 = Pivot ± (Range × 61.8%)
• R3/S3 = Pivot ± (Range × 100%)
3. Normalizes current price position on a fixed scale:
• +100 = Price at R3 (100% Fib extension)
• +61.8 = Price at R2
• +38.2 = Price at R1
• 0 = Price at Pivot Point
• -38.2 = Price at S1
• -61.8 = Price at S2
• -100 = Price at S3
4. Adds a 9-period EMA signal line for momentum confirmation
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 SIGNALS
- BUY: Price crosses ABOVE the Pivot (oscillator crosses above 0)
- SELL: Price crosses BELOW the Pivot (oscillator crosses below 0)
- Optional: Display all Fibonacci level crossings
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 HOW TO USE
- Oscillator > 0 → Price in RESISTANCE zone (bullish bias)
- Oscillator < 0 → Price in SUPPORT zone (bearish bias)
- Extreme values (±100) → Price at major Fib levels, watch for reversals
- Histogram color intensity reflects momentum strength
- Use signal line crossovers for additional confirmation
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙️ SETTINGS
- Period: Daily, Weekly, or Monthly pivot calculation
- Display: Toggle histogram, position line, zones, info table
- Signals: Show/hide BUY/SELL and secondary Fib crossings
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔔 ALERTS INCLUDED
- Pivot crossover (main BUY/SELL)
- R1, R2, R3 breakouts
- S1, S2, S3 breakdowns
See exactly WHERE your price sits between Fibonacci pivot levels. This oscillator normalizes price position relative to classic Pivot Points, giving you a clear view of market structure.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 WHAT DOES IT DO?
Instead of cluttering your chart with multiple pivot lines, this indicator displays a single oscillator showing WHERE price is within the pivot range. Instantly see if price is in support or resistance territory.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙️ HOW IT WORKS
1. Calculates Standard Pivot Point from previous period:
Pivot = (High + Low + Close) / 3
2. Applies Fibonacci ratios to determine Support/Resistance levels:
• R1/S1 = Pivot ± (Range × 38.2%)
• R2/S2 = Pivot ± (Range × 61.8%)
• R3/S3 = Pivot ± (Range × 100%)
3. Normalizes current price position on a fixed scale:
• +100 = Price at R3 (100% Fib extension)
• +61.8 = Price at R2
• +38.2 = Price at R1
• 0 = Price at Pivot Point
• -38.2 = Price at S1
• -61.8 = Price at S2
• -100 = Price at S3
4. Adds a 9-period EMA signal line for momentum confirmation
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 SIGNALS
- BUY: Price crosses ABOVE the Pivot (oscillator crosses above 0)
- SELL: Price crosses BELOW the Pivot (oscillator crosses below 0)
- Optional: Display all Fibonacci level crossings
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 HOW TO USE
- Oscillator > 0 → Price in RESISTANCE zone (bullish bias)
- Oscillator < 0 → Price in SUPPORT zone (bearish bias)
- Extreme values (±100) → Price at major Fib levels, watch for reversals
- Histogram color intensity reflects momentum strength
- Use signal line crossovers for additional confirmation
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙️ SETTINGS
- Period: Daily, Weekly, or Monthly pivot calculation
- Display: Toggle histogram, position line, zones, info table
- Signals: Show/hide BUY/SELL and secondary Fib crossings
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔔 ALERTS INCLUDED
- Pivot crossover (main BUY/SELL)
- R1, R2, R3 breakouts
- S1, S2, S3 breakdowns
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.