OPEN-SOURCE SCRIPT
Updated Dynamic 21 SMA Zone S/R (Weekly and 2-Day)

This custom indicator creates a dynamic support and resistance zone based on the 21-period Simple Moving Average (SMA) from the weekly timeframe and the 21-period SMA from the 2-day timeframe. The zone is visible and functional across all chart timeframes, adapting seamlessly to provide multi-timeframe insights.
Color Logic:
Green: When the current price is fully above the upper boundary of the zone, indicating potential bullish strength or a support level.
Gray: When the price is fully below the lower boundary, signaling potential bearish pressure or a resistance level.
Light Blue: When the price is within the zone (between the two SMAs), representing a neutral "no man's land" where the market is indecisive.
As the two SMAs converge or diverge, the zone naturally thins or widens, visually reflecting changes in market momentum—such as a thinning green zone during a potential reversal. Ideal for higher-timeframe swing trading to identify key levels, this indicator is also useful on lower timeframes for gauging the relative position of these SMAs, helping traders align short-term moves with broader trends.
Color Logic:
Green: When the current price is fully above the upper boundary of the zone, indicating potential bullish strength or a support level.
Gray: When the price is fully below the lower boundary, signaling potential bearish pressure or a resistance level.
Light Blue: When the price is within the zone (between the two SMAs), representing a neutral "no man's land" where the market is indecisive.
As the two SMAs converge or diverge, the zone naturally thins or widens, visually reflecting changes in market momentum—such as a thinning green zone during a potential reversal. Ideal for higher-timeframe swing trading to identify key levels, this indicator is also useful on lower timeframes for gauging the relative position of these SMAs, helping traders align short-term moves with broader trends.
Release Notes
This custom indicator creates a dynamic support and resistance zone based on the 21-period Simple Moving Average (SMA) from the weekly timeframe and the 21-period SMA from the 2-day timeframe. The zone is visible and functional across all chart timeframes, adapting seamlessly to provide multi-timeframe insights.Color Logic:
Green: When the current price is fully above the upper boundary of the zone, indicating potential bullish strength or a support level.
Gray: When the price is fully below the lower boundary, signaling potential bearish pressure or a resistance level.
Light Blue: When the price is within the zone (between the two SMAs), representing a neutral "no man's land" where the market is indecisive.
As the two SMAs converge or diverge, the zone naturally thins or widens, visually reflecting changes in market momentum—such as a thinning green zone during a potential reversal. Ideal for higher-timeframe swing trading to identify key levels, this indicator is also useful on lower timeframes for gauging the relative position of these SMAs, helping traders align short-term moves with broader trends.
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.
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.
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.