OPEN-SOURCE SCRIPT

Custom EMA/ATR/Keltner/Bollinger with Squeeze Setup

21-EMA and ATR-Based Analysis
21-EMA (Exponential Moving Average):

Acts as a dynamic support/resistance level.
The price's relationship with the 21-EMA is used to detect trends and potential reversals.
ATR (Average True Range):

Measures volatility.
Used to define price thresholds for buy/sell conditions (e.g., price not more than 1 ATR above 21-EMA for a buy signal).
2. Bollinger Bands and Keltner Channels for Squeeze Setup
Bollinger Bands (BB):

Calculated using a 20-period simple moving average and standard deviations.
Represents high and low volatility zones.
Keltner Channels (KC):

Based on a 20-period EMA and ATR.
Provides narrower channels for price action compared to Bollinger Bands.
Squeeze Condition:

Occurs when Bollinger Bands fall inside Keltner Channels, signaling low volatility.
These periods often precede significant price movements (breakouts).
3. Momentum Indicator (MACD Histogram)
MACD Histogram:
Measures momentum during a squeeze.
Positive histogram values suggest bullish momentum, while negative values suggest bearish momentum.
Used to predict breakout direction from a squeeze.
4. RSI (Relative Strength Index) for Overbought/Oversold Conditions
Buy Signal:
RSI below 50 indicates a potential oversold condition, supporting a buy signal.
Sell Signal:
RSI above 80 indicates overbought conditions, supporting a sell signal.
5. Buy/Sell Signal Conditions
Buy Signal:

Price is not more than 1 ATR above the 21-EMA.
RSI is below 50 (oversold).
Price touches the 21-EMA within a small tolerance.
Squeeze condition is active.
Sell Signal:

Price is 3 ATR above the 21-EMA.
RSI is above 80 (overbought).
Additional Signals:

Buy: Price is 2 standard deviations below the 21-EMA.
Sell: Price is 2 standard deviations above the 21-EMA.
6. Visual Enhancements
Chart patternsforecastingMoving Averages

Script open-source

Dans le plus pur esprit TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par nos Règles. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Vous voulez utiliser ce script sur un graphique ?

Clause de non-responsabilité