Expert Advisor (EA) Specification for MT4 ------------------------------------------ Project Title: Doji Outside Bollinger Band Strategy EA Date: July 28, 2025 Platform: - MetaTrader 4 (MT4) Overview: This EA executes trades based on a simple but effective price action strategy — entering trades when a Doji candlestick forms outside the Bollinger Bands, while additional RSI conditions are met. It uses ATR for stop loss and Bollinger Bands for take profits. The strategy is designed for full automation across multiple currency pairs and timeframes. --- Strategy Logic: 1. **Entry Condition:** - A Doji candle forms **outside** the upper or lower Bollinger Band. - RSI value at the time of the candle is within the user-defined bounds (e.g., < 55 for shorts, > 45 for longs). - The Doji candle must meet the body-to-wick ratio threshold defined by the user. 2. **Trade Type:** - Two entries are opened per signal (each 50% of total risk). - Both orders are market orders. 3. **Stop Loss (SL):** - Based on ATR(14) × user-defined multiplier. - SL is placed on both trades. 4. **Take Profits (TP):** - TP1: Bollinger Band Mean (middle band). - TP2: Opposite outer Bollinger Band from entry direction. - When TP1 is hit, half the position closes and the SL is moved to break even. --- Supported Symbols: - EUR/USD - GBP/USD - USD/JPY - USD/CHF - AUD/USD - NZD/USD - USD/CAD - EUR/JPY - GBP/JPY - AUD/JPY - NZD/JPY --- Features and Inputs: **Strategy Configuration (User Inputs):** - `TimeframesToScan`: Boolean flags for H1, H4, D1 - `SymbolsList[]`: List of symbols to trade - `MaxOpenTradesPerSymbol`: Integer (default 1) - `RiskPercentPerTrade`: Float (default 1.0) - `UseFixedLotSize`: true/false - `FixedLotSize`: 0.01 (if used and risk % is too small) - `ATRMultiplier`: Float (e.g., 1.5) for SL - `BodyToWickPercentMin`: Minimum % of body vs. full candle (default: 25) - `BodyToWickPercentMax`: Optional max % (default: 30) **Indicator Settings (User Inputs):** - `BB_Period`: Integer (default 20) - `BB_Deviation`: Float (default 2.0) - `RSI_Period`: Integer (default 14) - `RSI_LowerBound`: Float (default 45) - `RSI_UpperBound`: Float (default 55) --- Execution Behavior: - EA scans selected timeframes for all selected pairs - Executes 2 trades per valid setup - Uses Bollinger Band mean and opposite band as TPs - SL moves to break even after TP1 is hit - Only 1 setup per symbol may be active at a time - If risk size is too small, EA defaults to 0.01 lots and still takes the trade --- Requirements: - MT4-compatible EA - All user inputs adjustable via UI - Must run efficiently on a VPS 24/5 - No slippage or magic number filters required --- Deliverables: - Fully functional and compiled `.mq4` file - Source code (.mq4) - Easy-to-edit inputs via MetaTrader 4 interface - Clean and documented code preferred