3-Candle Rejection Setup Detector

3-Candle Rejection + EMA Strategy - Complete Description
Overview:
A powerful intraday trading strategy that combines price action rejection patterns with moving average trend confirmation. This strategy identifies exhaustion points in the market where momentum players get trapped, then confirms entries using EMA 9/20 crossovers for optimal timing.
Strategy Components:
1. 3-Candle Rejection Pattern
The core setup identifies classic "trap" formations where price extends too far and gets rejected:
Bearish Rejection (SHORT Setup):
Candle 1: Establishes a range (base candle)
Candle 2: Breaks ABOVE Candle 1, creating bullish momentum (minimum 40% engulfing)
Candle 3: Pushes even HIGHER but fails to hold - creates large upper wick (minimum 20% rejection) and closes back down below Candle 2's close
Bullish Rejection (LONG Setup):
Candle 1: Establishes a range (base candle)
Candle 2: Breaks BELOW Candle 1, creating bearish momentum (minimum 40% engulfing)
Candle 3: Pushes even LOWER but fails to hold - creates large lower wick (minimum 20% rejection) and closes back up above Candle 2's close
2. EMA Trend Confirmation
EMA 9 (Fast - Blue line): Responds quickly to price changes
EMA 20 (Slow - Red line): Provides trend direction
Bullish Confirmation: EMA 9 above or crossing above EMA 20
Bearish Confirmation: EMA 9 below or crossing below EMA 20
Entry Logic:
LONG Entries:
Bullish 3-candle rejection pattern completes
EMA 9/20 shows bullish alignment (cross or already trending up)
Within allowed trading session
No existing position
Daily trade limit not exceeded
SHORT Entries:
Bearish 3-candle rejection pattern completes
EMA 9/20 shows bearish alignment (cross or already trending down)
Within allowed trading session
No existing position
Daily trade limit not exceeded
Exit Strategy:
Fixed Targets:
Take Profit: 160 ticks (40 points for NQ) - Default 2:1 Risk/Reward
Stop Loss: 80 ticks (20 points for NQ)
Dynamic EMA Exit (Optional):
Exit LONG positions when EMA 9 crosses below EMA 20 (trend reversal)
Exit SHORT positions when EMA 9 crosses above EMA 20 (trend reversal)
Key Parameters:
Pattern Detection:
Minimum Engulfing: 40% (how much Candle 2 must break through Candle 1)
Minimum Rejection: 20% (size of the rejection wick on Candle 3)
Minimum Expansion: 5 points (how far Candle 3 must extend beyond Candle 2)
Moving Averages:
Fast EMA: 9 periods
Slow EMA: 20 periods
Risk Management:
Default Risk/Reward: 2:1
Position Sizing: Fixed (1 contract default)
Daily Trade Limit: 5 trades maximum
Session Filter:
NY Session: 9:30 AM - 4:00 PM ET (default enabled)
London Session: 3:00 AM - 11:30 AM ET (optional)
Asian Session: 6:00 PM - 3:00 AM ET (optional)
Strategy Philosophy:
This strategy capitalizes on failed breakouts and exhaustion moves. When momentum traders push price too far in one direction (Candle 2 breaking Candle 1, then Candle 3 extending even further), they often get trapped when price reverses. The large rejection wick on Candle 3 shows that buyers/sellers couldn't hold the extreme level.
The EMA confirmation ensures we're trading WITH the emerging trend after the rejection, not against it. This dual-filter approach (rejection pattern + trend alignment) significantly improves win rate by avoiding counter-trend setups.
Best Use Cases:
Ideal For:
NQ/ES Futures - High liquidity, clear rejection patterns
1-5 Minute Charts - Scalping and day trading
Trending Markets - EMA filter keeps you on right side
Session-Based Trading - NY session has best volume/volatility
Market Conditions:
Works best in trending or ranging markets with clear rejections
Less effective in choppy, low-volume conditions
Optimal during high-volume sessions (NY open, London/NY overlap)
Visual Indicators:
On Chart:
Blue line (EMA 9) and Red line (EMA 20)
Green/Red boxes highlighting 3-candle patterns
Entry labels showing "LONG/SHORT" with EMA status
Exit labels for EMA-based exits
Small triangles marking EMA crossovers
Info Table (Top Right):
Current session and trend status
Active position information
EMA values and trend direction
Pattern detection status
Trades today counter
Risk parameters (target/stop)
Performance Optimization:
For Scalping (Quick Trades):
Use EMA exits: ON
Tighter stops: 40-60 ticks
Max trades: 10 per day
For Higher Win Rate:
Min Rejection: 30-40%
Min Engulfing: 60%
Trade NY session only
For Larger Profits:
Disable EMA exits
Larger targets: 3:1 or 4:1 R/R
Let winners run to full target
Risk Disclosure:
This strategy is designed for active intraday trading and requires:
Understanding of futures trading and leverage
Proper risk management (never risk more than 1-2% per trade)
Real-time monitoring or automation
Practice on demo/paper trading first
Past performance does not guarantee future results. Always backtest thoroughly on historical data before live trading.
Recommended Timeframes:
Primary: 1-minute chart (original specification)
Alternative: 3-minute or 5-minute for less noise
EMA Settings: Optimized for 1-5 minute timeframes
Summary:
A professional-grade algorithmic strategy combining price action rejection patterns with moving average trend filters. Designed for traders who want high-probability setups with clear entry/exit rules and built-in risk management. The strategy excels at identifying trapped traders and capitalizing on reversals while maintaining trend alignment for optimal risk/reward.
This description can be used for:
Strategy documentation
Publishing on TradingView
Educational materials
Trading journals
Performance reporting
סקריפט להזמנה בלבד
רק משתמשים שאושרו על ידי המחבר יכולים לגשת לסקריפט הזה. יהיה עליך לשלוח בקשת גישה ולקבל אישור לשימוש. בדרך כלל, הגישה ניתנת לאחר תשלום. למידע נוסף, עקוב אחר ההוראות של היוצר בהמשך או צור קשר עם yossetdifo ישירות.
TradingView לא ממליצה לשלם עבור סקריפט או להשתמש בו אלא אם כן אתה סומך לחלוטין על המחבר שלו ומבין כיצד הוא פועל. ייתכן שתוכל גם למצוא חלופות חינמיות וקוד פתוח ב-סקריפטים הקהילתיים שלנו.
הוראות המחבר
כתב ויתור
סקריפט להזמנה בלבד
רק משתמשים שאושרו על ידי המחבר יכולים לגשת לסקריפט הזה. יהיה עליך לשלוח בקשת גישה ולקבל אישור לשימוש. בדרך כלל, הגישה ניתנת לאחר תשלום. למידע נוסף, עקוב אחר ההוראות של היוצר בהמשך או צור קשר עם yossetdifo ישירות.
TradingView לא ממליצה לשלם עבור סקריפט או להשתמש בו אלא אם כן אתה סומך לחלוטין על המחבר שלו ומבין כיצד הוא פועל. ייתכן שתוכל גם למצוא חלופות חינמיות וקוד פתוח ב-סקריפטים הקהילתיים שלנו.