OPEN-SOURCE SCRIPT

Enhanced OB Retest Strategy v7.0

618
The OB Retest Strategy is a full Order Block retest trading system that detects, plots, and trades OB zones across multiple timeframes. It uses structure breaks, retrace depth, and ATR filters to identify strong reversal or continuation setups.



⚙️ Core Features
• Multi-timeframe OB detection using break-of-structure (BOS) logic
• Automatic zone creation for bullish and bearish order blocks
• Smart merging of overlapping OB zones
• Dynamic flip-zone logic that turns invalidated OBs into new zones
• Wick zone detection for high-precision entries
• ATR-based trailing stop and optional breakeven
• Adjustable retrace depth, breakout %, and ATR filters
• Built-in performance table showing PnL, win rate, and total trades
• Fully backtestable with date range and commission control



🧠 Logic Summary
1. Detects a BOS on the higher timeframe.
2. Identifies the last opposing candle as the valid OB.
3. Validates the OB based on ATR size and breakout strength.
4. Waits for price to retest the zone to a set depth.
5. Executes trades and manages exits using trailing stop or breakeven.
6. Flips invalidated zones automatically.



💡 Usage Tips
• Best used on 1H to 4H charts for swing setups.
• Tune ATR and breakout thresholds for your market’s volatility.
• Combine with higher-timeframe bias or liquidity levels for better accuracy.



⚠️ Notes
• For educational and testing purposes only.
• Backtested results do not predict future performance.
• Always test before live use.

Pernyataan Penyangkalan

Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.