指定

# 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
開発者 1
評価
(392)
プロジェクト
506
23%
仲裁
60
57% / 25%
期限切れ
59
12%
2
開発者 2
評価
(434)
プロジェクト
640
53%
仲裁
34
62% / 21%
期限切れ
6
1%
仕事中
3
開発者 3
評価
プロジェクト
1
0%
仲裁
0
期限切れ
1
100%
4
開発者 4
評価
(109)
プロジェクト
180
25%
仲裁
24
17% / 75%
期限切れ
16
9%
5
開発者 5
評価
(3)
プロジェクト
4
25%
仲裁
0
期限切れ
0
取り込み中
パブリッシュした人: 1 code
6
開発者 6
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
7
開発者 7
評価
(1)
プロジェクト
1
100%
仲裁
0
期限切れ
0
8
開発者 8
評価
(45)
プロジェクト
52
58%
仲裁
2
100% / 0%
期限切れ
1
2%
パブリッシュした人: 5 codes
9
開発者 9
評価
(6)
プロジェクト
8
38%
仲裁
1
100% / 0%
期限切れ
2
25%
10
開発者 10
評価
(3)
プロジェクト
4
0%
仲裁
0
期限切れ
0
11
開発者 11
評価
(14)
プロジェクト
18
22%
仲裁
1
100% / 0%
期限切れ
4
22%
取り込み中
12
開発者 12
評価
(4)
プロジェクト
4
25%
仲裁
0
期限切れ
0
13
開発者 13
評価
(25)
プロジェクト
32
19%
仲裁
5
40% / 40%
期限切れ
4
13%
仕事中
14
開発者 14
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
15
開発者 15
評価
(9)
プロジェクト
10
10%
仲裁
0
期限切れ
0
16
開発者 16
評価
(8)
プロジェクト
8
0%
仲裁
2
50% / 0%
期限切れ
1
13%
仕事中
17
開発者 17
評価
(298)
プロジェクト
478
40%
仲裁
105
40% / 24%
期限切れ
82
17%
取り込み中
パブリッシュした人: 2 codes
18
開発者 18
評価
(14)
プロジェクト
20
25%
仲裁
0
期限切れ
2
10%
パブリッシュした人: 3 codes
19
開発者 19
評価
(10)
プロジェクト
14
43%
仲裁
0
期限切れ
3
21%
20
開発者 20
評価
(258)
プロジェクト
302
76%
仲裁
13
77% / 0%
期限切れ
4
1%
取り込み中
21
開発者 21
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
22
開発者 22
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
23
開発者 23
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
24
開発者 24
評価
(1)
プロジェクト
0
0%
仲裁
1
0% / 100%
期限切れ
0
25
開発者 25
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
26
開発者 26
評価
(49)
プロジェクト
74
18%
仲裁
30
17% / 53%
期限切れ
31
42%
27
開発者 27
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
28
開発者 28
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
29
開発者 29
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
30
開発者 30
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
31
開発者 31
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
32
開発者 32
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
33
開発者 33
評価
プロジェクト
1
0%
仲裁
0
期限切れ
0
パブリッシュした人: 2 codes
34
開発者 34
評価
(1)
プロジェクト
1
0%
仲裁
0
期限切れ
0
パブリッシュした人: 1 code
35
開発者 35
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
36
開発者 36
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
類似した注文
Tex 30+ USD
Today's Trading Strategy Options: Employ a disciplined execution approach based on the following two price-reaction scenarios: Scenario A. Buy Strategy (Capitalizing on Bullish RSI Momentum) – Trigger: Wait for the price candle to close decisively above the MA 50 (157.815). Take Profit: Set the initial target in the 158.200 range, with a maximum target of 158.500. Stop Loss: Place below the MA 20 or around the
Access and confidentiality restrictions: You will receive only a separately named copy of the Commander . Existing trading EAs, presets, account credentials, Telegram credentials and proprietary entry/exit code will not be shared. The Commander intelligence must be developed using: Defined signal/input interfaces Anonymized historical logs and replay data Mock EA signals and test harnesses Documented authority and
need an EA or indicator done , based on any strategy but with the following specific risk management parameters ; were i am able to do at least 2RR(standard reward-risk ratio for every trade) , fair win rate that is at leat 50% , EA should be able to generate at least 2 trades and above per week , favourable sharpe ratio . total drawdown of not more than 8% any given month and not over 3% any given day , would
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
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
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

プロジェクト情報

予算
30+ USD
締め切り
最高 10 日