OPEN-SOURCE SCRIPT

EPS Trendline (Fundamentals Insight by Mazhar Karimi)

69
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

Exención de responsabilidad

La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.