Shiller PE ratio for the S&P 500 . is based on average inflation-adjusted from the previous 10 years, known as the Cyclically Adjusted PE Ratio (CAPE Ratio)
HOW TO USE
It provide historic Shiller PE which will provide over-bought or over-sold condition historically from 19th century.
When the pe ratio crosses 30 considered as Greed
When the pe ratio fall below 15 considered as Fear
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.