OPEN-SOURCE SCRIPT
Regression Slope Oscillator

Description:
The Regression Slope Oscillator is a momentum indicator that measures the slope of a linear regression curve. It can help traders identify the current trend direction as well as the acceleration or deceleration of a trend early on.
How Does the Indicator Work?
The core of the indicator calculates the difference between the current and the previous value of a linear regression. This value reflects the slope:
Values above the zero line: Indicate an uptrend.
Values below the zero line: Indicate a downtrend.
Additionally, a signal line is calculated. Crossovers between the oscillator and the signal line provide indications of potential trend changes.
The Color Logic (Momentum Strength)
The oscillator line and its fill use a dynamic 4-color system to display the strength of the market momentum at a glance:
Dark Turquoise (Bull Strong): The oscillator is above zero and rising. The uptrend is gaining momentum.
Light Turquoise (Bull Weak): The oscillator is above zero but falling. The uptrend is flattening out.
Dark Pink (Bear Strong): The oscillator is below zero and falling further. The downtrend is accelerating.
Light Pink (Bear Weak): The oscillator is below zero but rising. The downtrend is losing strength (recovery).
Main Features & Settings
Customizable Signal Line: Flexibly choose between various moving averages for the signal line (SMA, EMA, HMA, or VWMA).
Customizable Lengths: The lengths for both the linear regression and the signal line can be freely adjusted in the settings.
Built-in Signals: White dots mark the exact moment the regression oscillator crosses the signal line (crossovers/crossunders).
The Regression Slope Oscillator is a momentum indicator that measures the slope of a linear regression curve. It can help traders identify the current trend direction as well as the acceleration or deceleration of a trend early on.
How Does the Indicator Work?
The core of the indicator calculates the difference between the current and the previous value of a linear regression. This value reflects the slope:
Values above the zero line: Indicate an uptrend.
Values below the zero line: Indicate a downtrend.
Additionally, a signal line is calculated. Crossovers between the oscillator and the signal line provide indications of potential trend changes.
The Color Logic (Momentum Strength)
The oscillator line and its fill use a dynamic 4-color system to display the strength of the market momentum at a glance:
Dark Turquoise (Bull Strong): The oscillator is above zero and rising. The uptrend is gaining momentum.
Light Turquoise (Bull Weak): The oscillator is above zero but falling. The uptrend is flattening out.
Dark Pink (Bear Strong): The oscillator is below zero and falling further. The downtrend is accelerating.
Light Pink (Bear Weak): The oscillator is below zero but rising. The downtrend is losing strength (recovery).
Main Features & Settings
Customizable Signal Line: Flexibly choose between various moving averages for the signal line (SMA, EMA, HMA, or VWMA).
Customizable Lengths: The lengths for both the linear regression and the signal line can be freely adjusted in the settings.
Built-in Signals: White dots mark the exact moment the regression oscillator crosses the signal line (crossovers/crossunders).
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.