OPEN-SOURCE SCRIPT
PEG RSI [Auto EPS Growth]

The PEG RSI [Auto EPS Growth] is a hybrid indicator that combines fundamental valuation with technical momentum. It applies the Relative Strength Index (RSI) directly to the Price/Earnings-to-Growth (PEG) Ratio.
Unlike traditional PEG indicators that require manual input for growth rates, this script automatically calculates the Compound Annual Growth Rate (CAGR) of Earnings Per Share (EPS) based on historical data.
Key Features
- Auto-Calculated Growth: Uses historical TTM Earnings Per Share (EPS) to calculate the CAGR over a user-defined period (Default: 4 years).
- Dynamic Valuation: Converts the static PEG ratio into an oscillator (RSI) to identify relative valuation extremes.
- Trend & Momentum: Visualizes the momentum of the PEG ratio relative to its own history.
Educational Case Study
This indicator is designed for educational purposes and research. Instead of relying on fixed overbought or oversold levels, users are encouraged to study the correlation between the PEG RSI and price action independently.
- Observe how the price reacts when the PEG RSI reaches upper or lower extremes.
- Different stocks may respect different RSI zones based on their growth stability.
- Use this tool to analyze how market valuation momentum shifts over time.
Settings:
- Years for CAGR Growth: Timeframe to calculate EPS growth (Default: 4 years).
- RSI Length: Lookback period for the RSI calculation (Default: 14).
Note: This indicator works best on stocks with a consistent history of earnings. It requires financial data to function (will not work on assets without EPS like Crypto or Forex).
Unlike traditional PEG indicators that require manual input for growth rates, this script automatically calculates the Compound Annual Growth Rate (CAGR) of Earnings Per Share (EPS) based on historical data.
Key Features
- Auto-Calculated Growth: Uses historical TTM Earnings Per Share (EPS) to calculate the CAGR over a user-defined period (Default: 4 years).
- Dynamic Valuation: Converts the static PEG ratio into an oscillator (RSI) to identify relative valuation extremes.
- Trend & Momentum: Visualizes the momentum of the PEG ratio relative to its own history.
Educational Case Study
This indicator is designed for educational purposes and research. Instead of relying on fixed overbought or oversold levels, users are encouraged to study the correlation between the PEG RSI and price action independently.
- Observe how the price reacts when the PEG RSI reaches upper or lower extremes.
- Different stocks may respect different RSI zones based on their growth stability.
- Use this tool to analyze how market valuation momentum shifts over time.
Settings:
- Years for CAGR Growth: Timeframe to calculate EPS growth (Default: 4 years).
- RSI Length: Lookback period for the RSI calculation (Default: 14).
Note: This indicator works best on stocks with a consistent history of earnings. It requires financial data to function (will not work on assets without EPS like Crypto or Forex).
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.