OPEN-SOURCE SCRIPT
Regression Slope Oscillator [BigBeluga]

🔵 OVERVIEW
The Regression Slope Oscillator is a trend–momentum tool that applies multiple linear regression slope calculations over different lookback ranges, then averages them into a single oscillator line. This design helps traders visualize when price is extending beyond typical regression behavior, as well as when momentum is shifting up or down.
🔵 CONCEPTS
🔵 FEATURES
🔵 HOW TO USE
🔵 CONCLUSION
The Regression Slope Oscillator [BigBeluga] transforms raw regression slope data into a smooth, color–coded oscillator. By averaging across multiple regression lengths, it avoids the noise of single–range analysis while still capturing trend extensions and momentum shifts.
With the addition of signal line crossovers and confirmed reversal markers, the indicator now provides both trend context and actionable momentum signals within a single regression-based framework.
The Regression Slope Oscillator is a trend–momentum tool that applies multiple linear regression slope calculations over different lookback ranges, then averages them into a single oscillator line. This design helps traders visualize when price is extending beyond typical regression behavior, as well as when momentum is shifting up or down.
🔵 CONCEPTS
- Regression Slope – Measures the steepness and direction of price trends over a selected length.
Pine Script® - Multi–Sample Averaging – Instead of relying on one regression slope, the indicator loops through many lengths (from Min Range to Max Range with Step increments) and averages their slopes.
Pine Script® - Color Gradient – The oscillator and candles are colored dynamically from oversold (orange) to overbought (aqua), based on slope extremes observed within the user–defined Color Range.
- Trend Oscillation – When the oscillator rises, price trend is strengthening; when it falls, momentum weakens.
🔵 FEATURES
- Calculates regression slopes across a user–defined range (e.g., 10–100 with steps of 5).
- Averages all sampled slopes into a single oscillator line.
- Dynamic coloring of oscillator and chart candles based on slope values.
- User–controlled Color Range:
High values (e.g., 50–100) → interpret as overbought vs oversold zones.
Low values (e.g., 2–5) → interpret as slope rising vs falling momentum shifts. - Dashboard table (top–right) displaying number of slope samples and current averaged slope value.
- Candle coloring mode (optional) – candles take on the oscillator gradient color for at–a–glance reading of trend bias.
- Signal Line (SMA) – A moving average of the slope oscillator used to identify momentum reversals.
- Bullish Reversal Signal – Triggered when the oscillator crosses above the signal line while below zero, indicating downside momentum exhaustion and potential trend recovery.
- Bearish Reversal Signal – Triggered when the oscillator crosses below the signal line while above zero, indicating upside momentum exhaustion and potential trend rollover.
- Dual Placement Signals – Reversal signals are plotted both:
- On the oscillator pane (for momentum context)
- On the price chart (for execution alignment)
- Confirmation Logic – Signals are only printed on confirmed bars to reduce repainting and false triggers.
🔵 HOW TO USE
- Watch the oscillator cross above/below zero: signals shifts in regression slope direction.
- Use the signal line crossovers near zero to identify early trend reversals.
- Use high Color Range settings to identify potential overbought/oversold extremes in trend slope.
- Use low Color Range settings for a faster, momentum–driven color change that tracks slope rising/falling.
- Candle coloring highlights short–term trend pressure in sync with the oscillator.
- Combine reversal signals with structure, support/resistance, or volume for higher–probability entries.
🔵 CONCLUSION
The Regression Slope Oscillator [BigBeluga] transforms raw regression slope data into a smooth, color–coded oscillator. By averaging across multiple regression lengths, it avoids the noise of single–range analysis while still capturing trend extensions and momentum shifts.
With the addition of signal line crossovers and confirmed reversal markers, the indicator now provides both trend context and actionable momentum signals within a single regression-based framework.
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
🔵Gain access to our powerful tools : bigbeluga.com/tv
🔵Join our free discord for updates : discord.com/invite/FuW63RKgdc
All scripts & content provided by BigBeluga are for informational & educational purposes only.
🔵Join our free discord for updates : discord.com/invite/FuW63RKgdc
All scripts & content provided by BigBeluga are for informational & educational purposes only.
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
🔵Gain access to our powerful tools : bigbeluga.com/tv
🔵Join our free discord for updates : discord.com/invite/FuW63RKgdc
All scripts & content provided by BigBeluga are for informational & educational purposes only.
🔵Join our free discord for updates : discord.com/invite/FuW63RKgdc
All scripts & content provided by BigBeluga are for informational & educational purposes only.
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。