Spezifikation
# H4 Zone Retest EA (MQL5)
An automated trading Expert Advisor (EA) for MetaTrader 5, developed in MQL5.
The EA trades gold (XAUUSD) using a multi-timeframe breakout and retest strategy: it defines the first H4 candle of each day as a trading zone, detects breakouts on the M5 chart, waits for a retest, and executes trades with risk management, trailing stops, and optional news filtering.
---
## Features
- H4 → M5 breakout and retest trading logic
- Configurable fixed lot or risk-based position sizing
- Trailing stop management
- **Smart news filter** that avoids trading around high-impact events
- Spread and terminal safety checks
- Dynamic lot calculation based on risk percentage
## Strategy Overview
1. **Zone identification (H4)**
The EA marks the first H4 candle of the current day and stores its high and low as the trading zone boundaries.
2. **Breakout detection (M5)**
On each new M5 candle:
- A bullish breakout occurs when the candle closes above `zoneHigh`.
- A bearish breakout occurs when the candle closes below `zoneLow`.
When a breakout occurs, the EA starts waiting for a retest.
3. **Retest entry**
- If price returns to the broken zone within a specified window (`MaxWaitSeconds`):
- **Buy** on bullish retest → SL = breakout candle low, TP = 1.5 × risk distance.
- **Sell** on bearish retest → SL = breakout candle high, TP = 1.5 × risk distance.
- Uses either a fixed lot (`Lots`) or a risk-based lot (`UseRiskPercent`, `RiskPercent`).
4. **Trade management and protection**
- Trailing stop control (`UseTrailingStop`, `TrailingStart`, `TrailingStep`).
- Spread and trade-permission checks (`MaxSpreadPoints`, `TERMINAL_TRADE_ALLOWED`).
- **Built-in news filter**: the EA checks the MetaTrader 5 economic calendar (`CalendarValueHistory`) and automatically avoids opening new trades within the defined window around **high-impact news events** for a selected currency (`NewsFilterCurrency`, `NewsFilterMinutes`).
- This filter helps prevent entries during volatile periods and improves stability during major market announcements.
## Input Parameters
| Parameter | Description | Default |
|------------|-------------|----------|
| `Lots` | Fixed lot size per trade | 0.01 |
| `UseRiskPercent` | Enable dynamic lot sizing by risk | false |
| `RiskPercent` | Percent of balance risked per trade | 1.0 |
| `MaxWaitSeconds` | Maximum time allowed for retest | 86400 |
| `UseTrailingStop` | Enable trailing stop | true |
| `TrailingStart` | Profit (points) before trailing begins | 200 |
| `TrailingStep` | Distance (points) of trailing stop | 100 |
| `UseNewsFilter` | Enable high-impact news filter | true |
| `NewsFilterMinutes` | Minutes before/after news to avoid trading | 30 |
| `MagicNumber` | Unique identifier for EA positions | 202503 |
---
## Requirements
- MetaTrader 5 platform
- Broker supporting XAUUSD (gold) trading
- MQL5 environment (MetaEditor)
- Historical data for backtesting
---
## Installation
1. Open **MetaEditor** → *File → Open Data Folder*
2. Copy the `.mq5` file into `MQL5/Experts/`
3. Compile the EA
4. In MetaTrader 5, open *Navigator → Expert Advisors*
5. Attach the EA to a **XAUUSD** chart
6. Adjust input parameters as needed
---
## Backtest
**Symbol:** XAUUSD
**Timeframe:** M5
**Period:** Jan 2024 – Apr 2026
**Model:** Every tick (MetaTrader 5 Strategy Tester)
### Notes
- Default parameters were used unless otherwise stated.
- The test includes realistic spreads and commissions.
- Results are for research and educational purposes only and do not guarantee future performance.
Bewerbungen
1
Bewertung
Projekte
506
23%
Schlichtung
60
57%
/
25%
Frist nicht eingehalten
59
12%
Frei
2
Bewertung
Projekte
640
53%
Schlichtung
34
62%
/
21%
Frist nicht eingehalten
6
1%
Arbeitet
3
Bewertung
Projekte
1
0%
Schlichtung
0
Frist nicht eingehalten
1
100%
Frei
4
Bewertung
Projekte
180
25%
Schlichtung
24
17%
/
75%
Frist nicht eingehalten
16
9%
Frei
5
Bewertung
Projekte
4
25%
Schlichtung
0
Frist nicht eingehalten
0
Beschäftigt
Veröffentlicht: 1 Beispiel
6
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
7
Bewertung
Projekte
1
100%
Schlichtung
0
Frist nicht eingehalten
0
Frei
8
Bewertung
Projekte
52
58%
Schlichtung
2
100%
/
0%
Frist nicht eingehalten
1
2%
Frei
Veröffentlicht: 5 Beispiele
9
Bewertung
Projekte
8
38%
Schlichtung
1
100%
/
0%
Frist nicht eingehalten
2
25%
Frei
10
Bewertung
Projekte
4
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
11
Bewertung
Projekte
18
22%
Schlichtung
1
100%
/
0%
Frist nicht eingehalten
4
22%
Beschäftigt
12
Bewertung
Projekte
4
25%
Schlichtung
0
Frist nicht eingehalten
0
Frei
13
Bewertung
Projekte
32
19%
Schlichtung
5
40%
/
40%
Frist nicht eingehalten
4
13%
Arbeitet
14
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
15
Bewertung
Projekte
10
10%
Schlichtung
0
Frist nicht eingehalten
0
Frei
16
Bewertung
Projekte
8
0%
Schlichtung
2
50%
/
0%
Frist nicht eingehalten
1
13%
Arbeitet
17
Bewertung
Projekte
478
40%
Schlichtung
105
40%
/
24%
Frist nicht eingehalten
82
17%
Beschäftigt
Veröffentlicht: 2 Beispiele
18
Bewertung
Projekte
20
25%
Schlichtung
0
Frist nicht eingehalten
2
10%
Frei
Veröffentlicht: 3 Beispiele
19
Bewertung
Projekte
14
43%
Schlichtung
0
Frist nicht eingehalten
3
21%
Frei
20
Bewertung
Projekte
301
76%
Schlichtung
13
77%
/
0%
Frist nicht eingehalten
4
1%
Beschäftigt
21
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
22
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
23
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
24
Bewertung
Projekte
0
0%
Schlichtung
1
0%
/
100%
Frist nicht eingehalten
0
Frei
25
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
26
Bewertung
Projekte
74
18%
Schlichtung
30
17%
/
53%
Frist nicht eingehalten
31
42%
Frei
27
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
28
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
29
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
30
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
31
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
32
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
33
Bewertung
Projekte
1
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
Veröffentlicht: 2 Beispiele
34
Bewertung
Projekte
1
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
Veröffentlicht: 1 Beispiel
35
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
36
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
Ähnliche Aufträge
I am looking to see if you can convert my pinescript into a NinjaTrader bot so I can get automated trading instead of manually doing it in TradingView i would like to get it to just do the trades for me based on my script. let me know who can do this perfectly
Jona copilot v12
30 - 40 USD
Hi, I'm interested in ordering an MT4 trading bot. Before we begin, could you please send me the technical specifications and requirements you'll need? Specifically, I'd like to know: - The trading strategy the bot will use. - The currency pairs or instruments it will trade. - The timeframes it supports. - Risk management features (lot sizing, stop loss, take profit, trailing stop, maximum drawdown). - Whether it
Iconic Boy
300 - 400 USD
Am looking for a bot to trade .so that I can be able to trade and become very successful and make some profit so that I cannot sleep on a empty stomach
Macd Rsi stochastic vwap Bot. I have code.
150 - 300 USD
Привіт. Шукаю когось, хто б застосував мій код як бота . Я торгую індексом Aus_200 SFE (не XJO). Бот базується на MACD входу/виходу, RSI, стохастиці та vwap. Як тільки роботу приймуть, мені потрібно внести кілька коректив; однак, нічого суттєвого. Дякую
MT4/MT5 HFT EA us30
30 - 3000 USD
Hello everybody, I'm looking for an experienced MQL4/MQL5 developer to optimize a High-Frequency Trading (HFT) Expert Advisor for both MT4 and MT5. The EA performs consistently and profitably on demo accounts, but when it is run on Raw and Standard live accounts under what appear to be the same trading conditions, it begins generating losses. I do not have the original source code (.mq4/.mq5); I only have the
8 cap prop firm passing
30 - 3000 USD
I am looking for an experienced MQL4/MQL5 HFT developer to build or optimize a High-Frequency Trading (HFT) Expert Advisor that can successfully pass proprietary trading firm challenges and perform consistently under live trading conditions with brokers such as 8cap or BlackBull Markets . The developer should have proven experience with HFT execution, ultra-low-latency trading, broker execution, slippage, spreads
MT4/MT5 HFT EA Live Trading
40 - 10000 USD
I have a High-Frequency Trading (HFT) Expert Advisor for both MT4 and MT5 designed primarily for US30 (Dow Jones Index) . The EA performs consistently and profitably on demo accounts, but when I run it on an IC Markets Raw or Standard live account, it starts generating losses under what appear to be the same trading conditions. At this time, I cannot provide the source code (.mq4/.mq5). I can only provide the
Fundamental News Trading Strategy
50 - 200 USD
I want to build a fundamental news trading bot that trade off economic news data, as we know every economic news data released always have effect on the asset associated with it, so this bot will take a trade instantly based on the news data released either to buy or sell, it will come with good money management and also SL and TP target based on price and pips value
TumiiFX
30 - 20000 USD
1. Use two EMAs: 20 and 50. If EMA 20 is above EMA 50 → uptrend (look for buys) If EMA 20 is below EMA 50 → downtrend (look for sells) 2. Wait for a pullback into the area between the two EMAs. - For buys: price must touch or move between EMA 20 and EMA 50 during the last few candles. - For stils: same idea, but in a downtrend. 3. Entry signal: Buy: a bullish engulfing candle in an uptrend after the pullback
HFT / Latency Arbitrage pepperstone
30 - 5000 USD
I am looking for an experienced MQL5 developer to build a high-frequency (HFT) latency arbitrage Expert Advisor for Pepperstone MT5 , using LMAX as the leading price feed. The initial focus will be on US30 (Dow Jones) , and if the strategy proves successful, I want the EA to be easily expandable to additional symbols such as NAS100, GER40, XAUUSD, major forex pairs, and other supported instruments. The EA should
Projektdetails
Budget
30+ USD
Ausführungsfristen
bis 10 Tag(e)