OPEN-SOURCE SCRIPT
RVE v3 Retracement Validity Engine

Core Philosophy
RVE v2 only gives signals when ALL of the following align:
Higher-Timeframe Trend Alignment
Trades only in the direction of the HTF trend (default: 4H EMA filter)
No counter-trend noise
Real Retracement Location (Not Extension)
Price must pull back into the EMA20–EMA50 zone
Filters fake “grazes” — requires meaningful interaction with the zone
Controlled Pullback (No Panic Candles)
Uses ATR + candle body + wick analysis
Filters out:
Panic momentum candles
Chaotic liquidity sweeps
Over-extended retracements
Close-Based Confirmation (Execution Discipline)
No signals mid-candle
Entry only after reclaim of EMA levels
⚙️ Entry Modes (Important)
🟢 AGGRESSIVE (Recommended for Retracement Traders)
Triggers on EMA9 reclaim after zone touch
Earlier entries
Best for traders who struggle with late entries
🔵 SAFE
Requires reclaim of EMA9 + EMA20
Fewer signals
Higher confirmation, later entry
🧠 Smart Filters Included
✅ HTF trend filter (lookahead-safe)
✅ ATR-adaptive pullback control
✅ Optional 2-bar zone confirmation
✅ Anti-chop cooldown (prevents signal spam)
✅ Optional key-level reclaim gate
✅ ATR-buffered SL guide (zone + structure)
RVE v2 only gives signals when ALL of the following align:
Higher-Timeframe Trend Alignment
Trades only in the direction of the HTF trend (default: 4H EMA filter)
No counter-trend noise
Real Retracement Location (Not Extension)
Price must pull back into the EMA20–EMA50 zone
Filters fake “grazes” — requires meaningful interaction with the zone
Controlled Pullback (No Panic Candles)
Uses ATR + candle body + wick analysis
Filters out:
Panic momentum candles
Chaotic liquidity sweeps
Over-extended retracements
Close-Based Confirmation (Execution Discipline)
No signals mid-candle
Entry only after reclaim of EMA levels
⚙️ Entry Modes (Important)
🟢 AGGRESSIVE (Recommended for Retracement Traders)
Triggers on EMA9 reclaim after zone touch
Earlier entries
Best for traders who struggle with late entries
🔵 SAFE
Requires reclaim of EMA9 + EMA20
Fewer signals
Higher confirmation, later entry
🧠 Smart Filters Included
✅ HTF trend filter (lookahead-safe)
✅ ATR-adaptive pullback control
✅ Optional 2-bar zone confirmation
✅ Anti-chop cooldown (prevents signal spam)
✅ Optional key-level reclaim gate
✅ ATR-buffered SL guide (zone + structure)
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.