OPEN-SOURCE SCRIPT
Fibonacci Spectrum + Regression Channel + Confirmations

A versatile multi-strategy tool for technical traders using Fibonacci levels, regression channels, and dynamic confirmations.
๐ Overview
This TradingView strategy script helps traders detect high-probability breakouts, reversals, and trend continuations using:
๐ข Fibonacci retracement zones
๐ Regression channels (local & multi-timeframe)
โ Multiple confirmations (Volume, RSI, MACD, Candlestick)
๐ Preset strategy modes (Trend-follow, Mean-reversion, Breakout, Custom)
๐ Visual dashboard for real-time analysis
๐ Alerts for breakout and breakdown signals
๐ ๏ธ Inputs & Configuration
๐๏ธ Preset Modes
Choose from 4 trading modes:
Custom โ manually enable/disable confirmations
Trend-follow โ emphasizes RSI & MACD alignment
Mean-reversion โ tight channels, ignores volume
Breakout โ aggressive setup, tighter fib lookback & wider bands
๐ง Changing preset automatically adjusts parameters like regression length, fib lookback, and confirmation rules.
๐ข Fibonacci Settings
Fib Lookback: Number of bars to calculate the high/low range.
Fib Ratios A-E: Defines retracement levels (0.236 to 0.786 by default).
Zones are shaded for clarity:
๐ง 0.236โ0.382
๐จ 0.382โ0.5
๐ฉ 0.5โ0.618
๐ฆ 0.618โ0.786
๐ Regression Channel
Reg Channel Length: Period used for linear regression.
StdDev Multiplier: Defines channel width.
Multi-Timeframe Support: Choose a higher timeframe (like 1h) to overlay broader trends.
โ Confirmations (toggle ON/OFF or preset controlled)
Volume: Must be above its 20-bar average.
RSI: Must be above 50 and rising (or below 50 and falling for shorts).
MACD: Line must cross above Signal (bull) or below (bear).
Candlestick Pattern: Looks for Bullish or Bearish Engulfing candles.
๐ Backtest Settings
Enable/disable strategy entries and exits for simulation.
Entries:
Long when price breaks above Fib 0.618 with all confirmations met
Short when price breaks below Fib 0.382 with all bearish confirmations
Exits:
Long exits when price breaks below Fib 0.382
Short exits when price breaks above Fib 0.618
๐ How to Use the Strategy
๐น Step 1: Choose a Preset
Pick one of the four Preset Modes:
Want to follow a trend? Select Trend-follow
Expect a price bounce? Try Mean-reversion
Expect volatility? Use Breakout
Prefer full control? Use Custom
๐น Step 2: Enable Confirmations (if in Custom mode)
Activate/deactivate:
Volume
RSI
MACD
Candlestick Patterns
These filters increase signal quality.
๐น Step 3: Watch for Signals
Look for:
๐ "READY" labels (potential breakout or breakdown)
Color-coded Fibonacci zones and channel bounds
๐ Entry/Exit signals (when backtesting is enabled)
๐น Step 4: Use the Dashboard
Located in the top-right, the table shows:
Indicator values
Trend direction (Up/Down)
Status (Bull/Bear, High/Low, Above/Below)
Closest Fibonacci level and candlestick patterns
Colors:
๐ข Green = Bullish or Positive
๐ด Red = Bearish or Negative
๐ก Yellow = Close to a key Fib level
๐ Alerts (Included)
You can set alerts on the following conditions:
Pre-Breakout โ all bullish confirmations + Fib 0.618 cross
Pre-Breakdown โ all bearish confirmations + Fib 0.382 break
Position Opened โ any strategy entry (for backtest tracking)
To activate:
Right-click the chart โ Add Alert
Select this strategy and the condition (e.g., โPre-Breakout Signalโ)
๐ Example Use Cases
๐ข Breakout Trader
Set to Breakout
Watch for โREADYโ label above Fib 0.618
Confirm with strong volume & bullish MACD
Alert triggers โ enter trade
๐ด Mean Reversion Trader
Set to Mean-reversion
Price hits lower channel + Fib 0.382
Weak volume, but RSI rebounds โ consider long
โ๏ธ Trend Follower
Set to Trend-follow
RSI, MACD, and price all moving up above midline
Enter on Fib 0.618 bounce
๐งช Tips & Notes
Combine with multi-timeframe analysis by enabling the MTF Channel
Tweak Fib ratios if you're using alternative levels (e.g., 0.886)
Use strategy.percent_of_equity for dynamic position sizing in backtests
Set proper timeframes (e.g., 15m, 1h) based on your trading style
Not financial advice at all. Strategy still WIP, i mainly think the indicator is ready.
๐ Overview
This TradingView strategy script helps traders detect high-probability breakouts, reversals, and trend continuations using:
๐ข Fibonacci retracement zones
๐ Regression channels (local & multi-timeframe)
โ Multiple confirmations (Volume, RSI, MACD, Candlestick)
๐ Preset strategy modes (Trend-follow, Mean-reversion, Breakout, Custom)
๐ Visual dashboard for real-time analysis
๐ Alerts for breakout and breakdown signals
๐ ๏ธ Inputs & Configuration
๐๏ธ Preset Modes
Choose from 4 trading modes:
Custom โ manually enable/disable confirmations
Trend-follow โ emphasizes RSI & MACD alignment
Mean-reversion โ tight channels, ignores volume
Breakout โ aggressive setup, tighter fib lookback & wider bands
๐ง Changing preset automatically adjusts parameters like regression length, fib lookback, and confirmation rules.
๐ข Fibonacci Settings
Fib Lookback: Number of bars to calculate the high/low range.
Fib Ratios A-E: Defines retracement levels (0.236 to 0.786 by default).
Zones are shaded for clarity:
๐ง 0.236โ0.382
๐จ 0.382โ0.5
๐ฉ 0.5โ0.618
๐ฆ 0.618โ0.786
๐ Regression Channel
Reg Channel Length: Period used for linear regression.
StdDev Multiplier: Defines channel width.
Multi-Timeframe Support: Choose a higher timeframe (like 1h) to overlay broader trends.
โ Confirmations (toggle ON/OFF or preset controlled)
Volume: Must be above its 20-bar average.
RSI: Must be above 50 and rising (or below 50 and falling for shorts).
MACD: Line must cross above Signal (bull) or below (bear).
Candlestick Pattern: Looks for Bullish or Bearish Engulfing candles.
๐ Backtest Settings
Enable/disable strategy entries and exits for simulation.
Entries:
Long when price breaks above Fib 0.618 with all confirmations met
Short when price breaks below Fib 0.382 with all bearish confirmations
Exits:
Long exits when price breaks below Fib 0.382
Short exits when price breaks above Fib 0.618
๐ How to Use the Strategy
๐น Step 1: Choose a Preset
Pick one of the four Preset Modes:
Want to follow a trend? Select Trend-follow
Expect a price bounce? Try Mean-reversion
Expect volatility? Use Breakout
Prefer full control? Use Custom
๐น Step 2: Enable Confirmations (if in Custom mode)
Activate/deactivate:
Volume
RSI
MACD
Candlestick Patterns
These filters increase signal quality.
๐น Step 3: Watch for Signals
Look for:
๐ "READY" labels (potential breakout or breakdown)
Color-coded Fibonacci zones and channel bounds
๐ Entry/Exit signals (when backtesting is enabled)
๐น Step 4: Use the Dashboard
Located in the top-right, the table shows:
Indicator values
Trend direction (Up/Down)
Status (Bull/Bear, High/Low, Above/Below)
Closest Fibonacci level and candlestick patterns
Colors:
๐ข Green = Bullish or Positive
๐ด Red = Bearish or Negative
๐ก Yellow = Close to a key Fib level
๐ Alerts (Included)
You can set alerts on the following conditions:
Pre-Breakout โ all bullish confirmations + Fib 0.618 cross
Pre-Breakdown โ all bearish confirmations + Fib 0.382 break
Position Opened โ any strategy entry (for backtest tracking)
To activate:
Right-click the chart โ Add Alert
Select this strategy and the condition (e.g., โPre-Breakout Signalโ)
๐ Example Use Cases
๐ข Breakout Trader
Set to Breakout
Watch for โREADYโ label above Fib 0.618
Confirm with strong volume & bullish MACD
Alert triggers โ enter trade
๐ด Mean Reversion Trader
Set to Mean-reversion
Price hits lower channel + Fib 0.382
Weak volume, but RSI rebounds โ consider long
โ๏ธ Trend Follower
Set to Trend-follow
RSI, MACD, and price all moving up above midline
Enter on Fib 0.618 bounce
๐งช Tips & Notes
Combine with multi-timeframe analysis by enabling the MTF Channel
Tweak Fib ratios if you're using alternative levels (e.g., 0.886)
Use strategy.percent_of_equity for dynamic position sizing in backtests
Set proper timeframes (e.g., 15m, 1h) based on your trading style
Not financial advice at all. Strategy still WIP, i mainly think the indicator is ready.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.