Percentile - Price vs Fundamentals

This is done in the same lines of below scripts

Instead of using drawdown, here we are only plotting percentile of drawdown. Also added few more fundamental stats to the indicator. Also using part of the code from Random-Color-Generator/ to automatically generate colors. This in turn uses code from @RicardoSantos for convering color based on HSL to RGB

This is how the study can be used:

Study plots percentile of price and each of the listed fundamentals based on history. History can be chose All time or particular window. If any fundamental or price is near 100 - which means it is nearer to its peak. And if something is near its bottom, it is nearer to its 0th percentile.

Price of the stock is considered undervalued based on historical levels when it is below most of the fundamentals. Price is considered overvalued based on historical levels when it is above all the fundamentals. Please note, being undervalued does not guarantee immediate mean reversion. Stocks can stay undervalued for prolonged time and can go further down. Similarly overvalued stock can stay overvalued for prolonged time before correcting itself or justifying the position. Hence, further discretion needs to be used while using this study.

Few examples:

AMZN seems to be trading in range and so are the fundamentals:

MSFT at peak along with half of the fundamentals. But, debt levels are going up along with margins reducing.

LPX is trading at 15% discount whereas most of the fundamentals are at the peak.

FLGT price seems to have gone down further whereas fundamentals look pretty healthy.
Notas de prensa: Added signature
Notas de prensa: Update color function
Notas de prensa: Added display headers
Notas de prensa: Convert to pine 5

Please PM me if you need access to any invite only scripts.

Join tradingview: https://www.tradingview.com/gopro/?share_your_love=sudh
Script de código abierto

Siguiendo el verdadero espíritu de TradingView, el autor de este script lo ha publicado en código abierto, para que los traders puedan entenderlo y verificarlo. ¡Un hurra por el autor! Puede utilizarlo de forma gratuita, aunque si vuelve a utilizar este código en una publicación, debe cumplir con lo establecido en las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.

¿Quiere utilizar este script en un gráfico?