Custom MQL5 XAUUSD M5 Breakout EA with News Filter & Trailing

MQL5 Experten

Spezifikation

# Technical Specification: GoldGuardian Institutional Breakout EA (MQL5)

## 1. Project Overview
Develop an institutional-grade, low-latency Expert Advisor (EA) in **MQL5** for MetaTrader 5, specifically engineered for **XAUUSD (Gold)** on the **M5 timeframe**. The EA executes confirmed range breakouts aligned with higher-order trend filters while enforcing strict capital preservation, partial profit taking, dynamic trailing, Friday market-close protection, mobile push notifications, and an integrated MQL5 Economic Calendar news filter.

*Note: All optimized parameters listed below MUST be hardcoded as the default input values inside the `.mq5` source code so the EA runs out-of-the-box without requiring external `.set` preset files.*

---

## 2. Core Strategy Logic & Entry Rules

### A. Dynamic Range Box Calculation & Quality Filter
* **Lookback Period (`InpBoxLookback` = 12):** Calculate the highest high (`BoxHigh`) and lowest low (`BoxLow`) over the preceding 12 closed candles (bars `2` to `13`), excluding the most recently closed signal candle (bar `1`).
* **Box Size Quality Filter (`InpMinBoxPoints` = 150 | `InpMaxBoxPoints` = 1500):** Ignore breakouts if the 12-bar box height is too narrow (dead market) or excessively wide (exhausted move).
* **Visual Monitor:** Draw a clean, non-repainting rectangle on the chart displaying active box boundaries and an on-chart status dashboard (Spread, Daily P/L, Active Session Status, News Filter Countdown).

### B. Trend & Volatility Filters
* **Trend Alignment:** Fast EMA (`InpFastEMA` = 50) and Slow EMA (`InpSlowEMA` = 200) applied to `PRICE_CLOSE`.
  * **Buy Bias:** `Close > FastEMA` AND `FastEMA > SlowEMA`.
  * **Sell Bias:** `Close < FastEMA` AND `FastEMA < SlowEMA`.
* **Volatility Measurement:** ATR (`InpATR_Period` = 14) on bar `1`.

### C. Confirmed Breakout Execution (Bar Close Only)
* Evaluate entry conditions strictly **once per new bar open** (using closed bar `1` data):
  * **Long Entry:** `Buy Bias` is true AND `Close > BoxHigh` AND `Close <= BoxHigh`.
  * **Short Entry:** `Sell Bias` is true AND `Close < BoxLow` AND `Close >= BoxLow`.
* Maximum of **1 open position** at any time per Magic Number.

---

## 3. Trade Management: Partial Profit, Break-Even & Price Trailing

1. **Initial Stop Loss (`InpSL_ATR_Mult` = 2.4):** Set at `2.4 * ATR(14)` from entry price.
2. **Partial Take Profit (`InpUsePartialTP` = true | `InpTP1_RR` = 1.5 | `InpPartialClosePct` = 50%):**
   * When profit reaches `1.5 * SL Distance`, automatically close **50% of the position volume** to bank realized profits (respecting broker `SYMBOL_VOLUME_MIN` and `SYMBOL_VOLUME_STEP`).
3. **Fast Break-Even Lock (`InpBE_TriggerRR` = 0.8 | `InpBE_ProfitPoints` = 50):**
   * Once unrealized profit reaches `0.8 * SL Distance`, move SL to `Entry Price +/- 50 points` to guarantee a risk-free runner.
4. **Dynamic Price Trailing (`InpTrail_StartRR` = 1.5 | `InpTrail_DistATR` = 1.2):**
   * For the remaining runner volume, once profit reaches `1.5 * SL Distance`, trail the SL dynamically at `1.2 * ATR(14)` behind current market price (ratcheting SL strictly in the profitable direction on every tick).

---

## 4. Capital Preservation, News Filter & Market Close Protection

1. **Dynamic Position Sizing (`InpTotalRiskPercent` = 1.5%):**
   * Calculate lot size automatically based on account balance and exact SL distance so a full SL hit never exceeds `1.5%` of equity.
2. **Hard Daily Loss Circuit Breaker (`InpMaxDailyLossPct` = 3.0%):**
   * Track daily starting equity at `00:00` server time. If combined floating + closed daily loss hits `3.0%`, close all open EA positions immediately and suspend new entries until the next trading day.
3. **Over-Trading Safeguard (`InpMaxTradesPerDay` = 3):**
   * Restrict the EA to a maximum of 3 executed trades per calendar day to prevent consecutive whipsaw losses during choppy markets.
4. **Built-in MQL5 Economic Calendar News Filter (`InpUseNewsFilter` = true):**
   * Utilize native MQL5 `CalendarValueHistory()` functions (no external DLLs required) to monitor **High-Impact USD news events** (NFP, FOMC, CPI, Interest Rate decisions).
   * Halt new trade entries **`InpMinsBeforeNews` = 30 minutes** before and **`InpMinsAfterNews` = 30 minutes** after high-impact USD releases.
   * Optional parameter (`InpCloseBeforeNews` = false) to close open trades prior to major news.
5. **Friday Pre-Market Close Liquidation (`InpCloseOnFriday` = true | `InpFridayCloseHour` = 21 | `InpFridayCloseMin` = 30):**
   * Automatically close all open EA positions and halt new entries every **Friday at `21:30` Server Time** to eliminate weekend gap risk and late-session spread spikes.
6. **Session Time Filter & Spread Guard:**
   * Restrict new entries between `InpStartHour = 9` and `InpEndHour = 18` (Broker Server Time).
   * Block execution if spread exceeds `InpMaxSpreadPoints = 350`.
7. **Mobile Push Notifications (`InpSendNotifications` = true):**
   * Send native MT5 mobile push notifications (`SendNotification()`) upon trade entry, partial profit/break-even activation, Friday close, or daily loss circuit breaker trigger.

---

## 5. Technical & Delivery Requirements for Developer

1. **Broker-Agnostic Execution:** Auto-detect 2/3-digit Gold quotes, symbol suffixes (`XAUUSD`, `XAUUSD.m`, `GOLD`), and broker filling modes (`IOC`, `FOK`, `RETURN`) to prevent `Error 10030`.
2. **VPS Restart Resilience:** Persist daily drawdown tracking in `GlobalVariables` so VPS reboots do not reset protection limits.
3. **Strategy Tester Compatibility:** Ensure the News Filter gracefully bypasses or handles historical simulation so `Every tick based on real ticks` backtesting runs smoothly without errors.
4. **Deliverables:** Full, clean `.mq5` source code (`0 errors`, `0 warnings`) + compiled `.ex5` file.

Dateien:

Bewerbungen

1
Entwickler 1
Bewertung
(408)
Projekte
527
24%
Schlichtung
62
58% / 24%
Frist nicht eingehalten
60
11%
Arbeitet
2
Entwickler 2
Bewertung
(22)
Projekte
28
7%
Schlichtung
9
33% / 33%
Frist nicht eingehalten
1
4%
Arbeitet
3
Entwickler 3
Bewertung
(5)
Projekte
5
0%
Schlichtung
5
0% / 40%
Frist nicht eingehalten
0
Frei
4
Entwickler 4
Bewertung
(1)
Projekte
2
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
Veröffentlicht: 19 Beispiele
5
Entwickler 5
Bewertung
(216)
Projekte
284
20%
Schlichtung
28
61% / 14%
Frist nicht eingehalten
0
Arbeitet
6
Entwickler 6
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
7
Entwickler 7
Bewertung
(2)
Projekte
3
33%
Schlichtung
0
Frist nicht eingehalten
2
67%
Frei
8
Entwickler 8
Bewertung
(642)
Projekte
750
35%
Schlichtung
50
52% / 38%
Frist nicht eingehalten
14
2%
Arbeitet
9
Entwickler 9
Bewertung
(268)
Projekte
319
74%
Schlichtung
16
75% / 0%
Frist nicht eingehalten
6
2%
Arbeitet
10
Entwickler 10
Bewertung
(568)
Projekte
866
61%
Schlichtung
33
27% / 45%
Frist nicht eingehalten
24
3%
Frei
Veröffentlicht: 1 Beispiel
11
Entwickler 11
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
12
Entwickler 12
Bewertung
(11)
Projekte
18
17%
Schlichtung
3
0% / 67%
Frist nicht eingehalten
3
17%
Arbeitet
13
Entwickler 13
Bewertung
(190)
Projekte
204
47%
Schlichtung
4
50% / 25%
Frist nicht eingehalten
1
0%
Arbeitet
14
Entwickler 14
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
15
Entwickler 15
Bewertung
(7)
Projekte
6
0%
Schlichtung
4
25% / 75%
Frist nicht eingehalten
2
33%
Frei
16
Entwickler 16
Bewertung
(2)
Projekte
3
33%
Schlichtung
0
Frist nicht eingehalten
2
67%
Arbeitet
17
Entwickler 17
Bewertung
(4)
Projekte
11
55%
Schlichtung
1
100% / 0%
Frist nicht eingehalten
0
Frei
18
Entwickler 18
Bewertung
(2)
Projekte
2
0%
Schlichtung
1
0% / 100%
Frist nicht eingehalten
0
Frei
19
Entwickler 19
Bewertung
(30)
Projekte
37
38%
Schlichtung
0
Frist nicht eingehalten
2
5%
Arbeitet
Veröffentlicht: 1 Beispiel
20
Entwickler 20
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
Veröffentlicht: 3 Beispiele
21
Entwickler 21
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
Veröffentlicht: 2 Beispiele
22
Entwickler 22
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
23
Entwickler 23
Bewertung
(319)
Projekte
574
35%
Schlichtung
84
31% / 44%
Frist nicht eingehalten
207
36%
Arbeitet
24
Entwickler 24
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
Veröffentlicht: 2 Beispiele
25
Entwickler 25
Bewertung
(2680)
Projekte
3432
68%
Schlichtung
78
49% / 14%
Frist nicht eingehalten
343
10%
Arbeitet
Veröffentlicht: 1 Beispiel
26
Entwickler 26
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
27
Entwickler 27
Bewertung
(24)
Projekte
35
40%
Schlichtung
9
22% / 33%
Frist nicht eingehalten
5
14%
Beschäftigt
Veröffentlicht: 9 Artikel, 35 Beispiele
28
Entwickler 28
Bewertung
(1)
Projekte
1
100%
Schlichtung
0
Frist nicht eingehalten
0
Arbeitet
Veröffentlicht: 7 Beispiele
29
Entwickler 29
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
30
Entwickler 30
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
Ähnliche Aufträge
I want full experience devloper need , I want devlope 4 Type Bot , Grd strategy 2 , and other bias strategy 2 scaning on market condition choose one order buy or sell and take profit and target fully automatic management, I am explain full details on private chat only experience developer contact me
Hello, I want to clarify that my project is specifically for TradingView only. I am looking for an experienced TradingView Pine Script developer (Pine Script v5/v6) to develop advanced custom technical indicators. I am NOT looking for MT4, MT5, MQL4, MQL5, Expert Advisors (EAs), or automated trade execution. 1. Indicators I want developed A. Smart Money Concepts (SMC) - Buy-side and sell-side liquidity sweeps
Hello everyone, I am a final-year AI & Data Science student interested in building a career in algorithmic trading and EA development. I have good technical knowledge of MQL5, MT5 Expert Advisors, risk management, technical indicators, and automated trading strategies. I have also worked on building trading systems using Machine Learning and Neural Networks. I know how to develop EAs and trading strategies, but I am
Hello! I don't have time, but I bought some challanges and honestly I don't feel 100% confident yet for trading, I am eager to share prop firm account with good, profitable trader. 50% of profits are your, but first I need to make selection, I need to trust you somehow that you will not blow up account within few days. Only serious persons please, please don't waste me time and yours
Hello, I'm looking for a developer who can build an automated trading bot (Expert Advisor) for MetaTrader 5 (MT5). I want a smart trading robot that can scan the markets, identify high-probability trading opportunities, and automatically execute trades. Strategies and indicators I'd like included: RSI (75 overbought / 25 oversold). MACD crossover with strong momentum. 9/21 EMA crossover. 20/50 SMA crossover. Smart
I am looking for a GOLD (XAUUSD) SCALPING idea that still makes money after realistic costs. I will test it myself on real FTMO tick data before paying for any code. What I need in your application (written, no files): Exact entry and exit rules: timeframe (ticks, M1 or M5), time of day, stop, target, max holding time, spread filter. Why it should work: who is on the other side of the trade. If you have them: results
Delete/Remove . Integrate Support & Resistance . Prop Firm Expert. (Expert is Active With a firm's account) . (Tick Volume) spikes specifically when price interacts with pre-defined Support and Resistance zones. [ required ]
i need a good bot which can scalp and have a tight stop loss an advance bot with a two position only and alot size should be 0.02 AI Trading Bot Development Prompt Build a fast, precision-based scalping trading bot designed to capture small price movements in the market while maintaining strict risk management. 1. Trading Strategy Develop a scalping strategy focused on quick entries and exits. Trade only when
I am looking for an experienced MQL5 developer to create a simple, well-organized Expert Advisor for MetaTrader 5. Requirements: - Provide complete and editable MQL5 source code. - Explain the EA's functionality and logic clearly. - Include configurable settings. - Include appropriate risk-control features. - Provide clear installation and testing instructions. - Ensure the code is clean and properly documented. I
PROJECT NAME: BALISA AI VERSION 1.0 I want to develop my own automated trading robot called Balisa AI for MetaTrader 5 (MT5). REQUIREMENTS: 1. The robot must support Forex and Gold (XAUUSD). 2. It must operate as an Expert Advisor (EA) on MT5. 3. It must automatically identify trading opportunities and execute buy and sell orders. 4. It must have Stop Loss and Take Profit. 5. It must include risk management to

Projektdetails

Budget
150+ USD

Kunde

Veröffentlichte Aufträge1
Anzahl der Schlichtungen0