OPEN-SOURCE SCRIPT
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.
Script open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.