Range Breakout XXX Pro
- Experts
- Version: 1.0
- Activations: 20
Range Breakout XXX Pro is a multi-currency basket trading Expert Advisor built around session-based range breakout logic with adaptive volatility targeting. Attach it to a single chart, define your symbol basket, and the EA independently tracks and trades each instrument while enforcing global portfolio-level risk controls.
The core strategy identifies the High and Low price levels formed during a user-defined session window. Once the session closes, the EA waits for a confirmed breakout beyond those levels and enters in the direction of momentum. Take Profit and Stop Loss are calculated dynamically using ATR multipliers, adapting automatically to current market volatility rather than relying on fixed pip values.
This EA is designed for traders who want a structured, rules-based approach to breakout trading across multiple instruments without the need to manage separate charts or manually correlate exposure.
Key Advantages
Multi-Symbol Basket Engine Trade up to any number of symbols from a single chart attachment. The EA creates an independent trading instance per symbol, each with its own session tracking, range calculation, and trade management. A built-in Correlation Guard cross-references the base and quote currencies of all open positions to prevent over-exposure to a single currency.
Adaptive Session Intelligence Instead of relying on fixed session times, the EA can automatically scan the last 20 days of H1 ATR data for each symbol and mathematically identify the most volatile 4-hour window. This adaptive engine recalibrates on a user-defined schedule, ensuring the trading session evolves alongside changing market conditions.
Dynamic ATR-Based Targets Stop Loss and Take Profit distances are calculated as multiples of the Average True Range. This means the EA naturally widens stops during volatile conditions and tightens them during quiet markets, maintaining a consistent risk-reward profile regardless of the instrument or market phase.
Partial Close and Breakeven Protection When price reaches a configurable ATR milestone in profit, the EA automatically closes a percentage of the position and moves the Stop Loss of the remaining volume to breakeven. This locks in partial profit while allowing a risk-free runner to capture extended moves.
ATR Trailing Stop After the breakeven trigger, an optional ATR-based trailing stop continuously ratchets the Stop Loss in the direction of profit, adapting the trail distance to real-time volatility.
Comprehensive Risk Management The EA enforces multiple layers of protection: maximum daily loss percentage, maximum global floating drawdown, maximum trades per day per symbol, maximum consecutive losses per session, maximum spread filter, and maximum execution slippage control. If any threshold is breached, trading halts automatically.
Trend and Volume Confirmation Filters An optional H1 EMA trend filter restricts entries to the prevailing trend direction. A separate volume filter requires breakout-bar tick volume to exceed a configurable multiple of the 50-bar average, filtering out low-conviction breakouts.
News Event Filter The EA reads the native MQL5 Economic Calendar and automatically blocks new entries during a configurable window before and after high-impact news events for both the base and quote currencies of each traded symbol.
Starvation Recovery If no trades have been executed within a configurable number of hours, the EA relaxes its entry confirmation requirements to prevent extended periods of inactivity during unusually quiet markets.
Broker Defense Suite Includes an Equity Guard with high-water mark trailing drawdown protection, margin spike monitoring, execution quality logging to CSV, optional virtual SL/TP to hide real exit levels from the broker, order size and timing randomization, external price feed validation, and DOM spoofing detection.
On-Chart Dashboard A real-time heads-up display shows equity, free margin, drawdown percentage, and per-symbol status including range size, session state, ATR value, spread, and floating P/L. The dashboard automatically repairs itself if labels are accidentally deleted from the chart.
How It Works
- During the defined session window, the EA records the highest high and lowest low across all bars for each symbol.
- Once the session ends and the confirmation period passes, the EA checks if price has broken above the range high or below the range low.
- If the breakout is confirmed and all filters pass (trend, volume, spread, news, correlation, daily limits), the EA enters a market order in the breakout direction.
- Stop Loss and Take Profit are applied based on ATR multipliers, with full compliance to the broker's stops level and freeze level requirements.
- Active trades are managed through partial closes, breakeven moves, and trailing stops until the position hits TP, SL, or the time-based exit.
Recommended Usage
Attach to a single H1 chart. Configure the Symbols to Trade input with your desired basket (e.g., EURUSD,GBPUSD,XAUUSD). Use the provided preset files as starting points: Conservative for lower risk, Aggressive for wider targets, or Gold Only for XAUUSD-specific calibration. Start with the Adaptive Session enabled to let the EA find the optimal trading window automatically.
Input Parameters
Basket Engine
- Symbols to Trade: Comma-separated list of symbols the EA will trade simultaneously.
- Correlation Guard: When enabled, prevents trading symbols that share the same base or quote currency as an existing open position.
Session Intelligence
- Auto-detect Volatile Session: Enables the Adaptive Session Engine, which scans 20 days of H1 ATR data to find the most volatile 4-hour window for each symbol.
- Recalculate Adaptive Session (Days): How often the adaptive engine recalibrates. Set to 7 for weekly recalibration. Set to 0 to disable.
- Range Start (HH:MM): Manual start time of the session range if Adaptive Session is disabled.
- Range End (HH:MM): Manual end time of the session range if Adaptive Session is disabled.
- Use Local Time: Uses your computer's local clock instead of the broker's server time.
- Timeframe for Sampling: The chart timeframe used to track the session High and Low.
Breakout Parameters
- Confirmation Bars: Number of bars to wait after the session ends before validating a breakout.
- Require Close Beyond Boundary: If enabled, the candle must close outside the range. If disabled, a wick touching the level is sufficient.
- Buffer Outside Range (Points): Extra padding added to the range boundaries to reduce false breakouts.
Dynamic ATR Targets
- Use ATR for TP/SL: Enables ATR-based dynamic targets instead of using the raw range size.
- ATR Period: The lookback period for the ATR indicator.
- ATR Multiplier Take Profit: Multiplier applied to ATR for the Take Profit distance.
- ATR Multiplier Stop Loss: Multiplier applied to ATR for the Stop Loss distance.
Risk Management
- Magic Number: Unique identifier for this EA's trades.
- Fixed Lot Size: Used when Risk per Trade is set to 0.
- Risk per Trade (% of Equity): Dynamic lot sizing based on account equity and the Stop Loss distance.
- Max Daily Loss %: Maximum allowed daily loss as a percentage of starting equity. Trading halts if breached.
- Max Global Floating DD %: If floating drawdown of all basket trades exceeds this percentage, the EA halts all trading.
- Max Trades per Day per Symbol: Daily trade limit per symbol. Set to 0 to disable.
- Max Consecutive Losses per Day: Halts trading for a symbol after this many consecutive losses in one session.
- Max Spread (Points): Maximum allowed spread to permit a new entry.
- Max Execution Slippage (Points): Maximum tolerated execution slippage.
- Partial Close %: Percentage of the position to close when the ATR milestone is reached. Set to 0 to disable.
- ATR Milestone for Partial Close: Distance in ATR that price must travel in profit before triggering the partial close and breakeven move.
Confirmation Filters
- Use Trend Filter: Enables the H1 EMA filter. Longs are only allowed above the EMA, shorts only below.
- Trend Period: Period for the Exponential Moving Average.
- Use Volume Filter: Enables the tick volume confirmation filter.
- Min Volume Ratio vs 50-SMA: Breakout bar volume must exceed this multiple of the 50-bar average volume.
Trade Management
- Use ATR Trailing Stop: Enables trailing stop after breakeven is triggered.
- Trailing Stop ATR Multiplier: ATR multiplier for the trailing stop distance.
- Use Time Exit: Enables a daily forced exit at a specified time.
- Exit Hour (Server Time): Hour to close all positions.
- Exit Minute: Minute to close all positions.
Market Environment
- Use News Filter: Blocks new entries around high-impact economic events.
- Min News Importance: Minimum event importance level to trigger the filter.
- Minutes Before News: How many minutes before a news event to halt entries.
- Minutes After News: How many minutes after a news event to resume entries.
- Relax Entry After X Hours Without Trades: If no trade has been placed within this many hours, the EA relaxes confirmation requirements to prevent prolonged inactivity.
Broker Defense
- Enable Equity Guard: Activates high-water mark trailing drawdown protection.
- Trailing Drawdown %: Maximum allowed drawdown from the equity high-water mark.
- Daily Loss Dollar Limit: Absolute dollar limit for daily losses. Set to 0 to use the percentage-based limit instead.
- Enable Margin Monitoring: Detects sudden broker margin requirement spikes and closes affected positions.
- Margin Spike Multiplier Threshold: Triggers an alert if margin requirements increase by this factor.
- Enable External Price Validation: Compares broker prices against an external API feed.
- Price API URL: URL of the external price feed endpoint.
- Max Price Deviation %: Maximum tolerated deviation before flagging price manipulation.
- Enable Virtual SL/TP: Hides real exit levels from the broker using internal monitoring.
- Decoy SL/TP Distance Multiplier: Places visible decoy stops at this multiple of the real distance.
- Randomize Order Sizes and Timing: Adds noise to lot sizes and entry timing to obscure the EA's pattern.
- Lot Size Variation %: Range of randomization applied to lot sizes.
- Entry Timing Variation (ms): Maximum random delay added before order execution.
- Enable Execution Quality Logger: Logs all execution details (slippage, spread, commission) to a CSV file.
- Enable DOM Spoofing Detection: Monitors the Depth of Market for abnormally large orders that may indicate spoofing. Live trading only.
