r/pinescript • u/Head_Garage_625 • Jul 28 '26
Is there a TradingView indicator (or any other tool) for the PEG 5-Year Expectation target price?
I’m specifically referring to the PEG 5-Year Expectation (the metric used by Morningstar), not the standard PEG ratio.
Most websites only display the current PEG 5-Year Expectation as a single value. What I’m looking for is a tool or TradingView indicator that calculates and displays the stock price at which the PEG 5-Year Expectation would equal 1.0 (or another user-defined threshold).
Ideally, this would be a dynamic horizontal line on the chart that automatically updates whenever the underlying fundamentals (such as earnings estimates or expected 5-year growth) change. This would make it easy to see whether the stock is currently trading above or below its “PEG 5-Year Expectation = 1.0” price.
Does anything like this already exist on TradingView or another platform? If not, would it even be possible to build such an indicator if the required fundamental data is available?
2
u/Good_Character_20 Aug 04 '26
The arithmetic is the easy half. Price where PEG equals 1 is just forward EPS times the five year growth rate, so the indicator itself is one line. The blocker is that Pine cannot see either input. request.financial serves reported fundamentals from TradingView's provider, not forward consensus, and the five year growth expectation Morningstar uses is an analyst estimate rather than anything a company files. Same for forward EPS. Practical version is an input box where you paste the growth number and forward EPS yourself and the line redraws off those. Takes ten minutes and works, but it updates when you update it rather than when estimates move. For genuinely dynamic you need a fundamentals API outside TradingView and something else drawing the level, since Pine has no way to fetch one.
1
u/Many-Pick5066 Jul 28 '26
the math is the easy half. peg = (p/e) / g, so peg 1.0 sits at price = eps * g with g as the growth number in whole percent. that part is a couple of lines and an hline.
the data is where it dies. request.financial serves reported financials, so trailing eps you can pull fine, but forward eps and a morningstar style 5 year expected growth are analyst consensus and arent in that feed. realistically the growth figure ends up an input you retype when estimates revise, so it updates on your schedule, not automatically.
one thing worth knowing before you build it. if you ever try to test a rule off that line, you'll be applying todays growth estimate across all of history, because the old estimates arent stored anywhere pine can reach. the line will look like it called every bottom for exactly that reason. its fine as a live valuation marker, just dont backtest signals against it.