OPEN-SOURCE SCRIPT
Distance from SMA Display

This indicator shows the percentage distance of the price from a selected SMA (e.g., SMA 20) and uses a red or green emoji to indicate whether the price is above or below that SMA. This makes it easier to spot stocks that are far below the SMA for potential long setups, or far above it for potential short setups. In other words, it provides a quick visual way to identify overextended or underextended price conditions relative to the chosen moving average.
In addition, the indicator can display the percentage distance from the daily SMA 150, which is commonly used to determine the broader trend direction. The main purpose of this is to quickly see whether the higher-timeframe trend is bullish (price above the daily SMA 150) or bearish (price below it), helping traders align short-term opportunities with the overall market trend.
In addition, the indicator can display the percentage distance from the daily SMA 150, which is commonly used to determine the broader trend direction. The main purpose of this is to quickly see whether the higher-timeframe trend is bullish (price above the daily SMA 150) or bearish (price below it), helping traders align short-term opportunities with the overall market trend.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
itamar.e
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
itamar.e
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.