EPS and Sales Magic Indicator V2EPS and Sales Magic Indicator V2
EPS and Sales Magic Indicator V2
Short Title: EPS V2
Author: Trading_Tomm
Platform: TradingView (Pine Script v6)
License: Free for public use under fair usage guidelines
Overview
The EPS and Sales Magic Indicator V2 is a powerful stock fundamental visualization tool built specifically for TradingView users who wish to incorporate earnings intelligence directly onto their price chart. Designed and developed by Trading_Tomm, this upgraded version of the original 'EPS and Sales Magic Indicator' includes an enriched and more insightful presentation of company performance metrics — now with TTM EPS support, advanced color-coding, label sizing, and refined control options.
This indicator is tailored for retail traders, swing investors, and long-term fundamental analysts who need to view Quarter-over-Quarter (QoQ) earnings and revenue changes directly on the price chart without switching tabs or breaking focus.
What Does It Display?
The EPS and Sales Magic Indicator V2 intelligently detects quarterly financial updates and displays the following data points via labels:
1. EPS (Earnings Per Share) – Current Quarterly Value
This is the most recent Diluted EPS published by the company, fetched using TradingView’s request.financial() function.
Displayed in the format: EPS: ₹20.45
2. EPS QoQ Percentage Change
Shows the percentage change in EPS compared to the previous quarter.
Highlights improvement or decline using arrows (up for improvement, down for decline).
Displayed in the format: EPS: ₹20.45 (up 15.3 percent)
3. Sales (Revenue) – Current Quarterly Value
Fetches and displays Total Revenue of the company in ₹Crores for easier Indian-market readability.
Displayed in the format: Sales: ₹460Cr
4. Sales QoQ Percentage Change
Measures and presents the quarter-over-quarter percentage change in total revenue.
Uses arrows to indicate growth or contraction.
Displayed in the format: Sales: ₹460Cr (down 3.8 percent)
5. EPS TTM (Trailing Twelve Months)
You now get the TTM EPS — the sum of the last four quarterly EPS values.
This value provides a better long-term earnings snapshot compared to a single quarter.
Displayed in the format: TTM EPS: ₹78.12
All of these values are automatically calculated and displayed only on the bars where a new financial report is detected, keeping your chart clean and insightful.
Customization Features
This indicator is built with user control in mind, allowing you to personalize how and what you want to see:
Show EPS in Label: Enable or disable the display of EPS and EPS QoQ values.
Show Sales in Label: Toggle the visibility of revenue and sales change percentage.
Color Options for Label Themes: The label background color is automatically determined based on performance.
Green: Both EPS and Sales increased QoQ.
Red: Both decreased.
Orange: One increased and the other decreased.
Gray: Default color (if values are unavailable or mixed).
Label Text Size: Choose from Tiny, Small (default), or Normal.
Visual Design
Placement: The labels are positioned just below the candlesticks using yloc.belowbar, so they do not obstruct price action or interfere with technical indicators.
Anchor: Aligned precisely with the financial reporting bars to maintain clarity in historical comparisons.
Background Style: Clean, semi-transparent styling with soft text colors for comfortable viewing.
How It Works
The indicator relies on TradingView’s powerful request.financial() function to extract fiscal quarterly financials (FQ). Internally, it uses detection logic to identify fresh data updates by comparing current vs. previous values, arithmetic to compute QoQ percentage changes in EPS and Sales, logic to build formatted labels dynamically based on user selections, and conditional color and sizing logic to enhance interpretability.
Use Cases
For Long-Term Investors: Quickly identify if a company’s profitability and revenue are improving over time.
For Swing Traders: Combine recent earnings trends with price action to evaluate if post-result momentum has real backing.
For Technical and Fundamental Traders: Layer it with moving averages, RSI, or volume to create a hybrid analysis environment.
Limitations and Notes
Financial data is provided by TradingView’s financial API, and occasional missing values may occur for less-covered stocks.
This tool does not repaint but depends on the timing of the official financial updates.
All values are rounded and formatted to prioritize readability.
Works best on Daily or higher timeframes (weekly or monthly also supported).
License and Fair Use
This script is free to use and share under TradingView’s open-use guidelines. You may copy, fork, and build upon this indicator for personal or educational purposes, but commercial usage requires attribution to the author: Trading_Tomm.
Future Enhancements (Planned)
Addition of Net Profit (QoQ and TTM)
Inclusion of Operating Margin, Profit Margin, and Book Value
Option to switch between numeric and graphical display (table mode)
Alerts on extreme earnings deviation or sales slumps
Final Thoughts
The EPS and Sales Magic Indicator V2 represents a clean, visual, and smart way to monitor a company’s core performance from your chart screen. It helps you align fundamental strength with technical strategies and provides instant financial clarity, which is especially vital in today’s fast-moving markets.
Whether you’re preparing for an earnings season or scanning past performance to pick your next investment, this indicator saves time, enhances insights, and sharpens decisions.