OPEN-SOURCE SCRIPT
Pullback Sweep - Choppiness Filter

Pullback Sweep Indicator - User Guide
Identifies pullback entry points in trending markets. Waits for price to pull back against the trend, then enters when price "sweeps" through the pullback start - confirming trend resumption.
________________________________________
Best Settings (1H Chart)
• EMA Length: 50
• Min Pullback Bars: 2
• Max Duration: 24 (1 day)
• Risk:Reward: 2.0 (1:2)
• ADX Threshold: 25
________________________________________
🎨 Color Guide
Color What It Shows
🔵 Blue Line EMA - must be above/below for trades
💜 Magenta Line SHORT sweep trigger (sell below this)
💎 Cyan Line LONG sweep trigger (buy above this)
🟠 Orange Circles SHORT stop loss level
🟢 Lime Circles LONG stop loss level
🔺 Red Triangle SELL signal
🔻 Green Triangle BUY signal
Pink Background SHORT pullback active
Green Background LONG pullback active
Gray Background Choppy market - no signals
SHORT Setup
1. Price BELOW blue EMA ✓
2. Magenta line appears (pullback starts)
3. Price bounces up (pullback)
4. Price drops and closes BELOW magenta line
5. RED TRIANGLE = SELL! ✓
LONG Setup
1. Price ABOVE blue EMA ✓
2. Cyan line appears (pullback starts)
3. Price dips down (pullback)
4. Price rises and closes ABOVE cyan line
5. GREEN TRIANGLE = BUY! ✓
________________________________________
📊 Info Table (Top-Right)
┌──────────┬──────────┐
│ Market │ CLEAN │ ← Trending (✓) or Choppy (✗)
│ ADX │ 28.5 │ ← Trend strength
│ EMA │ BELOW │ ← Price position
│ Pullback │ SHORT │ ← Active pullback type
│ Duration │ 8h │ ← How long pullback has lasted
│ Sweep @ │ 1.15330 │ ← Entry trigger price
│ SL @ │ 1.15637 │ ← Stop loss price
│ Trade │ NONE │ ← Current trade status
└──────────┴──────────┘
Status Colors:
• Green = Good to trade
• Red = Wait/no trade
• Gray = Neutral/no data
________________________________________
⚙️ Key Settings
EMA Length (Trend Filter)
• 20-30 = Fast, more signals, more noise
• 50 = Balanced (recommended) ✓
• 100-200 = Slow, fewer signals, very clean
ADX Threshold (Choppiness Filter)
• 20 = Aggressive (more signals)
• 25 = Balanced (recommended) ✓
• 30-35 = Conservative (cleaner signals)
Entry Checklist
Before Taking Any Trade:
☑️ Table shows "Market: CLEAN" (not choppy)
☑️ ADX > 25 (green cell)
☑️ Price clearly above/below EMA
☑️ Pullback duration < 24h
☑️ Entry triangle appears
☑️ Risk is 1-2% of account
Choppiness Filter Settings
Default (Recommended):
Enable Choppiness Filter: ON
ADX Threshold: 25
ATR Multiplier: 0.5
EMA Range %: 0.3
If Too Few Signals:
ADX Threshold: 20 (lower)
ATR Multiplier: 0.3 (lower)
EMA Range %: 0.2 (lower)
If Too Many False Signals:
ADX Threshold: 30 (higher)
ATR Multiplier: 0.7 (higher)
EMA Range %: 0.5 (higher)
Identifies pullback entry points in trending markets. Waits for price to pull back against the trend, then enters when price "sweeps" through the pullback start - confirming trend resumption.
________________________________________
Best Settings (1H Chart)
• EMA Length: 50
• Min Pullback Bars: 2
• Max Duration: 24 (1 day)
• Risk:Reward: 2.0 (1:2)
• ADX Threshold: 25
________________________________________
🎨 Color Guide
Color What It Shows
🔵 Blue Line EMA - must be above/below for trades
💜 Magenta Line SHORT sweep trigger (sell below this)
💎 Cyan Line LONG sweep trigger (buy above this)
🟠 Orange Circles SHORT stop loss level
🟢 Lime Circles LONG stop loss level
🔺 Red Triangle SELL signal
🔻 Green Triangle BUY signal
Pink Background SHORT pullback active
Green Background LONG pullback active
Gray Background Choppy market - no signals
SHORT Setup
1. Price BELOW blue EMA ✓
2. Magenta line appears (pullback starts)
3. Price bounces up (pullback)
4. Price drops and closes BELOW magenta line
5. RED TRIANGLE = SELL! ✓
LONG Setup
1. Price ABOVE blue EMA ✓
2. Cyan line appears (pullback starts)
3. Price dips down (pullback)
4. Price rises and closes ABOVE cyan line
5. GREEN TRIANGLE = BUY! ✓
________________________________________
📊 Info Table (Top-Right)
┌──────────┬──────────┐
│ Market │ CLEAN │ ← Trending (✓) or Choppy (✗)
│ ADX │ 28.5 │ ← Trend strength
│ EMA │ BELOW │ ← Price position
│ Pullback │ SHORT │ ← Active pullback type
│ Duration │ 8h │ ← How long pullback has lasted
│ Sweep @ │ 1.15330 │ ← Entry trigger price
│ SL @ │ 1.15637 │ ← Stop loss price
│ Trade │ NONE │ ← Current trade status
└──────────┴──────────┘
Status Colors:
• Green = Good to trade
• Red = Wait/no trade
• Gray = Neutral/no data
________________________________________
⚙️ Key Settings
EMA Length (Trend Filter)
• 20-30 = Fast, more signals, more noise
• 50 = Balanced (recommended) ✓
• 100-200 = Slow, fewer signals, very clean
ADX Threshold (Choppiness Filter)
• 20 = Aggressive (more signals)
• 25 = Balanced (recommended) ✓
• 30-35 = Conservative (cleaner signals)
Entry Checklist
Before Taking Any Trade:
☑️ Table shows "Market: CLEAN" (not choppy)
☑️ ADX > 25 (green cell)
☑️ Price clearly above/below EMA
☑️ Pullback duration < 24h
☑️ Entry triangle appears
☑️ Risk is 1-2% of account
Choppiness Filter Settings
Default (Recommended):
Enable Choppiness Filter: ON
ADX Threshold: 25
ATR Multiplier: 0.5
EMA Range %: 0.3
If Too Few Signals:
ADX Threshold: 20 (lower)
ATR Multiplier: 0.3 (lower)
EMA Range %: 0.2 (lower)
If Too Many False Signals:
ADX Threshold: 30 (higher)
ATR Multiplier: 0.7 (higher)
EMA Range %: 0.5 (higher)
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.