Overlay PE Ratio on Upper Price Chart using Left Axis

RobnATL

New member
Is anyone aware of a study that will overlay the PE Ratio on the price chart relative to the Day? I would guess that the left axis would come into play as well.

Thanks!
 
Solution
Is anyone aware of a study that will overlay the PE Ratio on the price chart relative to the Day? I would guess that the left axis would come into play as well.

Thanks!
Limitations to Indicator is that you have to Set Manual EPS. In the indicator settings input, adjust manualEPS to match the stock’s latest trailing 12-month EPS (e.g., $1.70 for TSLA as of recent data). Update this periodically based on earnings reports.
***Note: Without real-time EPS integration, the indicator’s accuracy depends on your input.

Now let’s Interpret the Plot.

Difference Mode: Positive values (above zero) indicate current P/E exceeds the historical average; negative values suggest undervaluation.
Ratio Mode: Values above 0% show P/E is...
Is anyone aware of a study that will overlay the PE Ratio on the price chart relative to the Day? I would guess that the left axis would come into play as well.

Thanks!
Limitations to Indicator is that you have to Set Manual EPS. In the indicator settings input, adjust manualEPS to match the stock’s latest trailing 12-month EPS (e.g., $1.70 for TSLA as of recent data). Update this periodically based on earnings reports.
***Note: Without real-time EPS integration, the indicator’s accuracy depends on your input.

Now let’s Interpret the Plot.

Difference Mode: Positive values (above zero) indicate current P/E exceeds the historical average; negative values suggest undervaluation.
Ratio Mode: Values above 0% show P/E is higher than the average; below 0% indicates it’s lower.
The label displays the current value with green (bullish) or red (bearish) coloring.

Here is an example behavior scenario-
  • Scenario: Stock price is $100, manualEPS is $5, so currentPE = 20. HistoricalPE over 252 days is 18. Difference: Oscillator = 20 - 18 = 2 (green, above zero).
Ratio: Oscillator = (20 / 18) * 100 - 100 = 11.11% (green, above 0%).
  • Adjustment: If EPS changes to $4 (e.g., after an earnings report), update manualEPS to 4, and currentPE becomes 25, shifting the oscillator.
Here are some limitations to this indicator-
  • Manual Input: The reliance on manualEPS means you must update it regularly, which can be inconvenient. TOS lacks a direct EPS feed for this purpose.
  • Data Gaps: If EPS is zero or negative (common in loss-making companies), currentPE becomes NaN or undefined, breaking the oscillator unless handled (e.g., with a default value).
  • Lookback Sensitivity: A 252-day lookback assumes stable earnings; adjust more often if the stock has volatile cycles.
Let’s put this in a Valuation Context. Overlaying P/E on a price chart can highlight overvaluation or undervaluation. If price rises sharply while P/E stays flat (due to earnings growth), it might signal a healthy trend. Conversely, a rising P/E with stagnant price could indicate overbought conditions.
  • Example: If SPY’s price climbs 10% but P/E drops from 25 to 22 (earnings up 15%), the chart shows fundamental strength, not just speculation.
Using it to identify Divergence. Discrepancies between price and P/E trends can signal reversals. A rising price with a falling P/E might suggest earnings catching up, while a rising P/E with flat price could warn of a bubble.
  • Example: In 2020, tech stocks’ prices soared, but P/E divergences later signaled corrections as earnings lagged.
Long-Term Analysis- Over months or years, charting P/E against price can reveal cycles. High P/E during price peaks (e.g., dot-com bubble) versus low P/E during recoveries can guide entry/exit points.
  • Example: S&P 500 P/E hit 30 in 2000 before crashing, a pattern visible on a combined chart.
Custom the Indicator- In TOS, you could normalize P/E (e.g., P/E minus industry average) and plot it against price to filter noise, making it a comparative tool rather than a direct overlay. In this case presented to you we took the difference or ratio of historical to current to put beside the price action. Same interpretation applies as above.

https://tos.mx/!Disy5OnZ
1756284881138.png

Not sure if this is what you are looking for - there are better indicators in this group...
 
Last edited:
Solution

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Is anyone aware of a study that will overlay the PE Ratio on the price chart relative to the Day? I would guess that the left axis would come into play as well.

Thanks!
In the example chart attached we see that SPX has a oscillator value of 31.66 - anything over 10 would be overvalued in my opinion. I would consider SPX (SP500) extremely overvalued....
1756285256026.png
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
779 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top