PROTECTED SOURCE SCRIPT
ORB Strategy W/ Confluence

This is an Opening Range Breakout (ORB) strategy designed for intraday trading on futures or indices (e.g., MNQ, MES, ES). It identifies the opening range (default 30-minute session from 9:30-10:00 ET) and enters long on a bullish breakout above the range high (ORH) or short below the range low (ORL), with optional daily bias filtering. Targets are set as multiples of the range width (default 50% per level), with partial profit-taking at each hit level. Stop-loss is dynamically set based on a factor of the range width (default 1.0x full range). Optional confluence filters (RSI >70 for long/<30 for short, price above/below 200 EMA, Williams Vix Fix above/below 0.3, or following previous day's close color) can be enabled for entry confirmation. Position sizing is fixed (default 10 contracts), with an option to double after a losing day. Entries are restricted to a user-defined session (default 8:00-17:00), and all positions close at a specified time (default 16:00 ET) to comply with prop firm rules.
Key Parameters to Test:
Instrument/Timeframe: Test on 5-min or 1-min charts for MNQ/MES/ES futures (e.g., tick value 0.5 for MNQ, 1.25 for MES).
Core Settings: OR timeframe=30m, Target %=50, SL Factor=1.0, TP % Remaining=20 (for partial closes). Enable/disable bias ("Daily Bias" for conservative entries).
Filters: Start with all off; test enabling RSI (len=14, level=50, offset=20), EMA (len=200), WVF (period=22, thresh=0.3), and Prev Day Trend individually/combined to see impact on win rate/false signals.
Risk/Sizing: Fixed contracts=10; test double sizing after loss. For risk-based sizing, adjust to use equity risk % (e.g., 1%) and tick value.
Time Rules: Entry session=0800-1700, Exit=16:00; test on NY session data.
Expected Behavior & Test Focus:
Entry Logic: Long signal on close crossover ORH (or ORH + target1 if bearish bias); short on crossunder ORL. Expect 1-2 trades per day, filtered by confluence to reduce whipsaws.
Exits: SL at ORL - factor*range for long (vice versa for short); partial TP at each target level (e.g., 20% of position at T1, reducing thereafter). Full close at 4 PM if open.
Backtest Metrics: Aim for >50% win rate, positive expectancy over 1-2 years (e.g., 2023-2025 NY session data). Monitor drawdown (<10%), profit factor (>1.5), and Sharpe ratio. Test sensitivity to volatility (e.g., high-vol days may hit more targets but risk larger SL). Visuals: OR box, dashed targets/SL lines, signals (▲/▼).
Edge Cases: Test on low-vol days (tight range, fewer breakouts); gaps; after news events. Ensure no over-entries (pyramiding=0) and daily reset works.
This setup emphasizes disciplined intraday breakouts with risk control—backtest on historical data to validate profitability before live use.
Key Parameters to Test:
Instrument/Timeframe: Test on 5-min or 1-min charts for MNQ/MES/ES futures (e.g., tick value 0.5 for MNQ, 1.25 for MES).
Core Settings: OR timeframe=30m, Target %=50, SL Factor=1.0, TP % Remaining=20 (for partial closes). Enable/disable bias ("Daily Bias" for conservative entries).
Filters: Start with all off; test enabling RSI (len=14, level=50, offset=20), EMA (len=200), WVF (period=22, thresh=0.3), and Prev Day Trend individually/combined to see impact on win rate/false signals.
Risk/Sizing: Fixed contracts=10; test double sizing after loss. For risk-based sizing, adjust to use equity risk % (e.g., 1%) and tick value.
Time Rules: Entry session=0800-1700, Exit=16:00; test on NY session data.
Expected Behavior & Test Focus:
Entry Logic: Long signal on close crossover ORH (or ORH + target1 if bearish bias); short on crossunder ORL. Expect 1-2 trades per day, filtered by confluence to reduce whipsaws.
Exits: SL at ORL - factor*range for long (vice versa for short); partial TP at each target level (e.g., 20% of position at T1, reducing thereafter). Full close at 4 PM if open.
Backtest Metrics: Aim for >50% win rate, positive expectancy over 1-2 years (e.g., 2023-2025 NY session data). Monitor drawdown (<10%), profit factor (>1.5), and Sharpe ratio. Test sensitivity to volatility (e.g., high-vol days may hit more targets but risk larger SL). Visuals: OR box, dashed targets/SL lines, signals (▲/▼).
Edge Cases: Test on low-vol days (tight range, fewer breakouts); gaps; after news events. Ensure no over-entries (pyramiding=0) and daily reset works.
This setup emphasizes disciplined intraday breakouts with risk control—backtest on historical data to validate profitability before live use.
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể tự do sử dụng tập lệnh mà không có bất kỳ hạn chế nào – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể tự do sử dụng tập lệnh mà không có bất kỳ hạn chế nào – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.