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).
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.