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
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。