# P/E Price Predictor for ThinkorSwim

##### Active member
VIP
VIP Enthusiast
Intro: This indicator is very simple and just slightly more sophisticated then the original found at thinkorswims site here. This indicator uses the trailing 12 month PE average over the last 12 months and gives you the price the stock normally trades at relative to that value. This could be used to identify overhyped stocks that are good for shorting. One strategy I am researching is finding stocks that are deviating significantly from their average PE going into earnings, creating an unrealistic expectation scenario that the stock will be unlikely to live up to. My research is combining this with V shaped RSI spikes and resistance levels to identify top heavy stocks.

Caveats: Only works on daily charts and is not split adjusted so will give inaccurate results at times. Obviously the values would be meaningless on a company that had a negative eps.

Notes: Sometimes the predicted price doesnt make sense, but I believe that is the purpose of this indicator, to find values that dont make sense in order to find out if there is a way to profit from the unbalance. As always it is just another tool, mostly to try to bridge the gap from our normal TA to the fundamental analysis.

Code:
Code:
``````declare lower;
def AE = if IsNaN(GetActualEarnings()) then 0 else GetActualEarnings();
def EPS_TTM = Sum(AE, 252);
plot pe = close / EPS_TTM;
plot SMA = Average(pe, 252);
AddLabel(yes, "EPS TTM " + EPS_TTM, color.Gray);
AddLabel(yes, "P/E Ratio: " + pe, color.Green);
AddLabel(yes, "Avg PE " + SMA, Color.DARK_GREEN);
AddLabel(yes, "Predicted Price " + SMA*EPS_TTM,Color.Yellow);``````

Hi, I would like to know if this is the best way to write this code? I'm wanting to get the forecasts growth rate

def AE = if IsNaN(GetActualEarnings()) then 0 else GetActualEarnings();
def EPS_TTM = Sum(AE, 252);
def AE_PY = SUM(AE,504)-EPS_TTM;
plot GRWTH = ((EPS_TTM-AE_PY)/AE_PY)*100;

Intro: This indicator is very simple and just slightly more sophisticated then the original found at thinkorswims site here. This indicator uses the trailing 12 month PE average over the last 12 months and gives you the price the stock normally trades at relative to that value. This could be used to identify overhyped stocks that are good for shorting. One strategy I am researching is finding stocks that are deviating significantly from their average PE going into earnings, creating an unrealistic expectation scenario that the stock will be unlikely to live up to. My research is combining this with V shaped RSI spikes and resistance levels to identify top heavy stocks.

Caveats: Only works on daily charts and is not split adjusted so will give inaccurate results at times. Obviously the values would be meaningless on a company that had a negative eps.

Notes: Sometimes the predicted price doesnt make sense, but I believe that is the purpose of this indicator, to find values that dont make sense in order to find out if there is a way to profit from the unbalance. As always it is just another tool, mostly to try to bridge the gap from our normal TA to the fundamental analysis.

Code:
Code:
``````declare lower;
def AE = if IsNaN(GetActualEarnings()) then 0 else GetActualEarnings();
def EPS_TTM = Sum(AE, 252);
plot pe = close / EPS_TTM;
plot SMA = Average(pe, 252);
AddLabel(yes, "EPS TTM " + EPS_TTM, color.Gray);
AddLabel(yes, "P/E Ratio: " + pe, color.Green);
AddLabel(yes, "Avg PE " + SMA, Color.DARK_GREEN);
AddLabel(yes, "Predicted Price " + SMA*EPS_TTM,Color.Yellow);``````
add this to the end of the code to add a Cloud

87k+ Posts
183 Online

## The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
• Exclusive indicators
• Proven strategies & setups
• Private Discord community
• Exclusive members-only content
• 1 full year of unlimited support

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?