명시
# 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
등급
프로젝트
519
24%
중재
61
57%
/
25%
기한 초과
60
12%
작업중
2
등급
프로젝트
647
53%
중재
35
63%
/
20%
기한 초과
7
1%
작업중
3
등급
프로젝트
1
0%
중재
0
기한 초과
1
100%
무료
4
등급
프로젝트
184
25%
중재
25
16%
/
76%
기한 초과
16
9%
무료
5
등급
프로젝트
12
33%
중재
0
기한 초과
2
17%
작업중
게재됨: 1 코드
6
등급
프로젝트
0
0%
중재
0
기한 초과
0
무료
7
등급
프로젝트
17
35%
중재
0
기한 초과
1
6%
작업중
8
등급
프로젝트
53
57%
중재
2
100%
/
0%
기한 초과
1
2%
무료
게재됨: 5 코드
9
등급
프로젝트
8
38%
중재
2
50%
/
50%
기한 초과
2
25%
무료
10
등급
프로젝트
4
0%
중재
0
기한 초과
0
무료
11
등급
프로젝트
21
29%
중재
2
50%
/
0%
기한 초과
4
19%
작업중
12
등급
프로젝트
4
25%
중재
0
기한 초과
0
무료
13
등급
프로젝트
33
18%
중재
6
50%
/
33%
기한 초과
4
12%
무료
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
등급
프로젝트
21
24%
중재
0
기한 초과
2
10%
무료
게재됨: 3 코드
19
등급
프로젝트
14
43%
중재
0
기한 초과
3
21%
무료
20
등급
프로젝트
309
76%
중재
14
71%
/
0%
기한 초과
6
2%
로드됨
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
무료
게재됨: 11 코드
34
등급
프로젝트
1
0%
중재
0
기한 초과
0
무료
게재됨: 2 코드
35
등급
프로젝트
0
0%
중재
0
기한 초과
0
무료
36
등급
프로젝트
0
0%
중재
0
기한 초과
0
무료
비슷한 주문
Optimizing martingale EA and specific stressdays
50 - 125 USD
Hello, I am looking for someone who can optimize my personal Martingale EA and perform thorough backtesting, especially on stress days and periods of high market volatility. A few important details: The EA trades XAUUSD (Gold) on the 1-minute timeframe (M1) . I use 1:500 leverage with TMGM as my broker. The account size is €50,000 . The EA already includes a News Filter and several other safety features. I need Low
can you help me use a Tickblaze Algo NRBO on the NT platform? I have it somewhat set up, but I have other questions about running it & knowing how to operate it in NT. Thank you if anyone have experience in this kindly bib and let do it asap
I need a fully automated custom Expert Advisor for MetaTrader 5 (MQL5). The EA is intended for use on a The5ers $100,000 2-Step prop-firm account. IMPORTANT DELIVERY REQUIREMENT: I must receive the complete editable .mq5 source code as well as the compiled .ex5 file. Compiled-only delivery is NOT acceptable. The EA must be coded specifically for this project and must not copy trades, use external trading signals or
I've got a Pine Script from Trading View. I need help from a programmer who can help with optimising the strategy by 1) Adding a couple of further rules 2) Redesign the trading alert arrows & colours I need, please, a programmer who is 1) Good at Pine language 2) Has excellent after-job support (not for free though) 3) Possess the ability to work with others. 4) Able to deliver the job at the shortest possible time
I need a trading system similar to the attached files. Check attachment for details on the indicator. i guess the indicator contains some of (Rainbow MA , MTF Dashboard , Symbol Switcher , and Trend Histogram), though may not be exactly as listed
I am looking for an experienced MQL5 developer to build a professional MT5 Expert Advisor specifically for XAUUSD (Gold) and other indices. I saw that XAUUSD is one of your primary areas of specialization, so I would like to discuss a custom EA with you. My priority is NOT extremely high returns. I want a robust EA designed for controlled risk and long-term survival. Requirements: • MT5 / MQL5 • XAUUSD, usoil,btc and
VENOM EA
35 - 50 USD
So, im a beginner and I'm pleading you to built me a bot that runs 24hrs and that can buy and sell at the same time, choose a better and profitable strategy. I will do anything thing it takes to get the bot. I hope you take my request into consideration
I have an existing working MQL5 Expert Advisor and require an experienced MQL5 programmer/trading-system analyst to independently analyse its historical performance. This is NOT initially a request to rewrite the EA or simply optimize parameters. Current strategy: - MetaTrader 5 - M15 timeframe - EMA / ADX / ATR based - Approximately 1,337 historical trades - Gross Profit approximately USD 271,000 - Gross Loss
Overview I am looking for an experienced MQL5 developer to design and deliver a professional Expert Advisor for MetaTrader 5. Rather than dictating the strategy, I want the developer to propose a proven, well-documented approach they have personally built and validated — one with a genuine statistical edge, not curve-fitted results. Quality and transparency matter more than speed of delivery. Budget is negotiable for
Zwivhuya
100+ USD
I would like to be part of this trade because i want to help my family out of the hopeless life we are living now . i thoughts going to school will help me get better job but no i am still sitting for us to eat at home i have to sell my body to someone and get pay with that small money i can buy bread and cooldrink for my family that we can not sleep with emyter stomach
프로젝트 정보
예산
30+ USD
기한
로 10 일