OPEN-SOURCE SCRIPT
EPS Trendline (Fundamentals Insight by Mazhar Karimi)

Overview
This indicator visualizes a company’s Earnings Per Share (EPS) data directly on the chart—pulled from TradingView’s fundamental database—and applies a dynamic linear regression trendline to highlight the long-term direction of earnings growth or decline.
It’s designed to help investors and quantitative traders quickly see how the company’s profitability (EPS) has evolved over time and whether it’s trending upward (growth), flat (stagnant), or downward (decline).
How it Works
Uses request.financial() to fetch EPS data (Diluted or Basic).
You can select whether to use TTM (Trailing Twelve Months), FQ (Fiscal Quarter), or FY (Fiscal Year) data.
The script fits a regression line (using ta.linreg) over a configurable window to visualize the underlying EPS trend.
Updates automatically when new financial data is released.
Inputs
EPS Period: Choose between FQ / FY / TTM
Use Diluted EPS: Toggle to compare Diluted vs. Basic EPS
Regression Window: Adjust how many bars are used to fit the trendline
Interpretation Tips
A rising trendline indicates earnings momentum and potential investor confidence.
A flat or declining trendline may warn of profitability slowdowns.
Combine with price action or valuation ratios (like P/E) for deeper analysis.
Works best on stocks or ETFs with fundamental data (not available for crypto or FX).
Suggestions / Use Cases
Pair with Price/Earnings ratio indicators to evaluate valuation vs. fundamentals.
Use in conjunction with earnings release events for context.
Ideal for long-term investors, swing traders, or fundamental quants tracking financial health trends.
Future Enhancements (Planned Ideas)
🔹 Option to display multiple regression lines (short-term and long-term)
🔹 Support for comparing multiple tickers’ EPS in the same pane
🔹 Integration with Net Income, Revenue, or Free Cash Flow trends
🔹 Add a “Rate of Change” signal for momentum-based EPS analysis
This indicator visualizes a company’s Earnings Per Share (EPS) data directly on the chart—pulled from TradingView’s fundamental database—and applies a dynamic linear regression trendline to highlight the long-term direction of earnings growth or decline.
It’s designed to help investors and quantitative traders quickly see how the company’s profitability (EPS) has evolved over time and whether it’s trending upward (growth), flat (stagnant), or downward (decline).
How it Works
Uses request.financial() to fetch EPS data (Diluted or Basic).
You can select whether to use TTM (Trailing Twelve Months), FQ (Fiscal Quarter), or FY (Fiscal Year) data.
The script fits a regression line (using ta.linreg) over a configurable window to visualize the underlying EPS trend.
Updates automatically when new financial data is released.
Inputs
EPS Period: Choose between FQ / FY / TTM
Use Diluted EPS: Toggle to compare Diluted vs. Basic EPS
Regression Window: Adjust how many bars are used to fit the trendline
Interpretation Tips
A rising trendline indicates earnings momentum and potential investor confidence.
A flat or declining trendline may warn of profitability slowdowns.
Combine with price action or valuation ratios (like P/E) for deeper analysis.
Works best on stocks or ETFs with fundamental data (not available for crypto or FX).
Suggestions / Use Cases
Pair with Price/Earnings ratio indicators to evaluate valuation vs. fundamentals.
Use in conjunction with earnings release events for context.
Ideal for long-term investors, swing traders, or fundamental quants tracking financial health trends.
Future Enhancements (Planned Ideas)
🔹 Option to display multiple regression lines (short-term and long-term)
🔹 Support for comparing multiple tickers’ EPS in the same pane
🔹 Integration with Net Income, Revenue, or Free Cash Flow trends
🔹 Add a “Rate of Change” signal for momentum-based EPS analysis
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.