指定
# 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.
反馈
1
等级
项目
506
23%
仲裁
60
57%
/
25%
逾期
59
12%
空闲
2
等级
项目
640
53%
仲裁
34
62%
/
21%
逾期
6
1%
工作中
3
等级
项目
1
0%
仲裁
0
逾期
1
100%
空闲
4
等级
项目
180
25%
仲裁
24
17%
/
75%
逾期
16
9%
空闲
5
等级
项目
4
25%
仲裁
0
逾期
0
已载入
发布者: 1 代码
6
等级
项目
0
0%
仲裁
0
逾期
0
空闲
7
等级
项目
1
100%
仲裁
0
逾期
0
空闲
8
等级
项目
52
58%
仲裁
2
100%
/
0%
逾期
1
2%
空闲
发布者: 5 代码
9
等级
项目
8
38%
仲裁
1
100%
/
0%
逾期
2
25%
空闲
10
等级
项目
4
0%
仲裁
0
逾期
0
空闲
11
等级
项目
18
22%
仲裁
1
100%
/
0%
逾期
4
22%
已载入
12
等级
项目
4
25%
仲裁
0
逾期
0
空闲
13
等级
项目
32
19%
仲裁
5
40%
/
40%
逾期
4
13%
工作中
14
等级
项目
0
0%
仲裁
0
逾期
0
空闲
15
等级
项目
10
10%
仲裁
0
逾期
0
空闲
16
等级
项目
8
0%
仲裁
2
50%
/
0%
逾期
1
13%
工作中
17
等级
项目
478
40%
仲裁
105
40%
/
24%
逾期
82
17%
已载入
发布者: 2 代码
18
等级
项目
20
25%
仲裁
0
逾期
2
10%
空闲
发布者: 3 代码
19
等级
项目
14
43%
仲裁
0
逾期
3
21%
空闲
20
等级
项目
301
76%
仲裁
13
77%
/
0%
逾期
4
1%
已载入
21
等级
项目
0
0%
仲裁
0
逾期
0
空闲
22
等级
项目
0
0%
仲裁
0
逾期
0
空闲
23
等级
项目
0
0%
仲裁
0
逾期
0
空闲
24
等级
项目
0
0%
仲裁
1
0%
/
100%
逾期
0
空闲
25
等级
项目
0
0%
仲裁
0
逾期
0
空闲
26
等级
项目
74
18%
仲裁
30
17%
/
53%
逾期
31
42%
空闲
27
等级
项目
0
0%
仲裁
0
逾期
0
空闲
28
等级
项目
0
0%
仲裁
0
逾期
0
空闲
29
等级
项目
0
0%
仲裁
0
逾期
0
空闲
30
等级
项目
0
0%
仲裁
0
逾期
0
空闲
31
等级
项目
0
0%
仲裁
0
逾期
0
空闲
32
等级
项目
0
0%
仲裁
0
逾期
0
空闲
33
等级
项目
1
0%
仲裁
0
逾期
0
空闲
发布者: 2 代码
34
等级
项目
1
0%
仲裁
0
逾期
0
空闲
发布者: 1 代码
35
等级
项目
0
0%
仲裁
0
逾期
0
空闲
36
等级
项目
0
0%
仲裁
0
逾期
0
空闲
相似订单
MQL5 Forex Trading Robot Development
30 - 100 USD
I need an MQL5 trading robot for Forex. It should open and close trades based on my strategy rules. Please include money management, stop loss, take profit, and lot size settings. The EA should be stable, easy to edit, and tested before delivery. I will share the exact entry and exit rules with the developer
I need a professional programmer who can code this top tier professional synthetic index EA structure perfectly to my laptop extra perfectly payment after successful job very urgent needed here in Nigeria at onitsha Here is my contact you can message me on my WhatsApp 09121052987/ direct call 09038568050
Hello, I am looking for an experienced MQL5 developer to develop a professional and reliable Expert Advisor (EA) for MetaTrader 5. The EA will be based on a custom automated Forex trading strategy that I have developed and tested. The detailed trading logic and proprietary rules will be provided privately to the selected developer. General requirements: • Development in MQL5 for MetaTrader 5. • The EA will initially
Martingale / Grid CHALLENGE!
31 - 466 USD
I would like you to create, or if you already have one: purchase a profitable martingale OR grid EA from you that NEVER blows up the account. REQUIREMENTS Platform : only MT4 Pair : any Timeframe : any Strategy : any Profitability : 10% / month, every month. Not an "average", but: every month. Lots : dynamic (as the account grows, so do the lot sizes) THE PROCESS Send me a trial version of the .ex4 file. I will
Anallysis
30+ USD
Market signal analysis is the process of identifying, interpreting, and evaluating specific indicators or cues in the financial market to predict the direction of asset price movements. The results of this analysis generate trading signals that provide specific recommendations regarding the best time to buy, sell, or hold an asset
We are looking for an expert algorithmic trading developer to build a high-performance, fully automated Custom Expert Advisor (EA) or trading bot. The bot must integrate advanced Smart Money Concepts (SMC) , Inner Circle Trader (ICT) methodologies, and Volume Spread Analysis (VSA) with a high-frequency trading (HFT) style execution and scaling model. The core objective is to program a bot that identifies
An Expert Advisor builder needed!
100 - 300 USD
I need an MT5 Expert Advisor based on my A+ ICT/SMC Institutional Anticipation Framework. The EA must use a strict multi-timeframe hierarchy: Daily = Liquidity Map ONLY: Identify BSL/SSL, swept/unswept liquidity, equal highs/lows, major OBs, FVGs and institutional POIs. H4 = Institutional Direction: H4 determines the ONLY bias (BUY or SELL) using structure, BOS/CHoCH, OB, FVG and Premium/Discount. Lower timeframes
Automatic buy and sell entries. stoploss (sl) take profit (tp) risk management and adjustable lot size. Adjustable risk percentage per trade. Trailing stop maximum number of open trades. Trading hours filter. Ability to backtest and optimize the strategy. Easy to use settings. The EA should work reliably on mt5 and provide the source code. I want the developer to test the EA and provide backtest results before
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
EA: Smart Break-Even & Partial Close Manager
30 - 200 USD
Develop an Expert Advisor for MetaTrader 5 that manages existing positions. Features Automatically detect all open positions. Apply Break-Even after price reaches a configurable profit. Partial Close: Close X% of volume at the first target. Move Stop Loss to Break-Even. ATR Trailing Stop (optional). Magic Number filter. Comment filter. Symbol filter. Trading session filter. Retry mechanism for trade operations
项目信息
预算
30+ USD
截止日期
到 10 天