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 อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน