The Forward P/E indicator calculates and visualizes the forward price-to-earnings (P/E) ratio of a stock based on its most recent quarterly earnings per share (EPS) and the current market price.

Key Features:
  • Quarterly EPS Data: The script retrieves the diluted EPS for the most recent fiscal quarter (FQ) of the selected stock using financial data.
  • Annualized EPS: The quarterly EPS is multiplied by four to estimate the annualized EPS, assuming consistent earnings throughout the year.
  • Forward P/E Calculation: The forward P/E is derived by dividing the stock's current closing price by its annualized EPS.
  • Visualization: The calculated forward P/E ratio is plotted for easy interpretation.
  • Reference Line: An optional horizontal reference line at 0 helps quickly identify when the P/E ratio becomes invalid or potentially negative due to anomalies in EPS data.


This tool is useful for investors and traders seeking to evaluate a stock's valuation relative to its projected earnings, helping identify potentially overvalued or undervalued opportunities.
ملاحظات الأخبار
The Forward P/E with Median indicator calculates and visualizes the forward price-to-earnings (P/E) ratio of a stock and includes a rolling median to help identify trends or central tendencies in valuation over time.

Key Features:
  • Quarterly EPS Data: Retrieves the diluted EPS for the most recent fiscal quarter (FQ) of the selected stock using financial data.
  • Annualized EPS: Quarterly EPS is multiplied by four to estimate annualized EPS, assuming consistent earnings throughout the year.
  • Forward P/E Calculation: The forward P/E is derived by dividing the stock's current closing price by its annualized EPS.
  • Median Forward P/E: A rolling median of the forward P/E ratio is calculated over a user-defined window (default: 14 periods) and plotted for trend analysis.
  • Visualization:
  • The Forward P/E ratio is plotted in blue.
  • The Median Forward P/E is plotted in orange for comparison and trend analysis.


Reference Line: An optional horizontal line at 0 helps identify anomalies, such as negative or invalid P/E values.

This enhanced tool is useful for investors and traders aiming to assess a stock's valuation trends and stability relative to its projected earnings, helping identify consistent overvaluation or undervaluation opportunities.
forecastingstatisticsValue

نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الرمز في المنشور يخضع لقواعد‎‎قوانين الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟

إخلاء المسؤولية