Specifiche

# 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.




File:

Con risposta

1
Sviluppatore 1
Valutazioni
(401)
Progetti
519
24%
Arbitraggio
61
57% / 25%
In ritardo
60
12%
In elaborazione
2
Sviluppatore 2
Valutazioni
(436)
Progetti
647
53%
Arbitraggio
35
63% / 20%
In ritardo
7
1%
In elaborazione
3
Sviluppatore 3
Valutazioni
Progetti
1
0%
Arbitraggio
0
In ritardo
1
100%
Gratuito
4
Sviluppatore 4
Valutazioni
(111)
Progetti
184
25%
Arbitraggio
25
16% / 76%
In ritardo
16
9%
Gratuito
5
Sviluppatore 5
Valutazioni
(10)
Progetti
12
33%
Arbitraggio
0
In ritardo
2
17%
In elaborazione
Pubblicati: 1 codice
6
Sviluppatore 6
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
7
Sviluppatore 7
Valutazioni
(11)
Progetti
17
35%
Arbitraggio
0
In ritardo
1
6%
In elaborazione
8
Sviluppatore 8
Valutazioni
(45)
Progetti
53
57%
Arbitraggio
2
100% / 0%
In ritardo
1
2%
Gratuito
Pubblicati: 5 codici
9
Sviluppatore 9
Valutazioni
(6)
Progetti
8
38%
Arbitraggio
2
50% / 50%
In ritardo
2
25%
Gratuito
10
Sviluppatore 10
Valutazioni
(3)
Progetti
4
0%
Arbitraggio
0
In ritardo
0
Gratuito
11
Sviluppatore 11
Valutazioni
(16)
Progetti
21
29%
Arbitraggio
2
50% / 0%
In ritardo
4
19%
In elaborazione
12
Sviluppatore 12
Valutazioni
(4)
Progetti
4
25%
Arbitraggio
0
In ritardo
0
Gratuito
13
Sviluppatore 13
Valutazioni
(25)
Progetti
33
18%
Arbitraggio
6
50% / 33%
In ritardo
4
12%
Gratuito
14
Sviluppatore 14
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
15
Sviluppatore 15
Valutazioni
(9)
Progetti
10
10%
Arbitraggio
0
In ritardo
0
Gratuito
16
Sviluppatore 16
Valutazioni
(8)
Progetti
8
0%
Arbitraggio
2
50% / 0%
In ritardo
1
13%
In elaborazione
17
Sviluppatore 17
Valutazioni
(298)
Progetti
478
40%
Arbitraggio
105
40% / 24%
In ritardo
82
17%
Caricato
Pubblicati: 2 codici
18
Sviluppatore 18
Valutazioni
(14)
Progetti
21
24%
Arbitraggio
0
In ritardo
2
10%
Gratuito
Pubblicati: 3 codici
19
Sviluppatore 19
Valutazioni
(10)
Progetti
14
43%
Arbitraggio
0
In ritardo
3
21%
Gratuito
20
Sviluppatore 20
Valutazioni
(263)
Progetti
309
76%
Arbitraggio
14
71% / 0%
In ritardo
6
2%
Caricato
21
Sviluppatore 21
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
22
Sviluppatore 22
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
23
Sviluppatore 23
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
24
Sviluppatore 24
Valutazioni
(1)
Progetti
0
0%
Arbitraggio
1
0% / 100%
In ritardo
0
Gratuito
25
Sviluppatore 25
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
26
Sviluppatore 26
Valutazioni
(49)
Progetti
74
18%
Arbitraggio
30
17% / 53%
In ritardo
31
42%
Gratuito
27
Sviluppatore 27
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
28
Sviluppatore 28
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
29
Sviluppatore 29
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
30
Sviluppatore 30
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
31
Sviluppatore 31
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
32
Sviluppatore 32
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
33
Sviluppatore 33
Valutazioni
Progetti
1
0%
Arbitraggio
0
In ritardo
0
Gratuito
Pubblicati: 11 codici
34
Sviluppatore 34
Valutazioni
(1)
Progetti
1
0%
Arbitraggio
0
In ritardo
0
Gratuito
Pubblicati: 2 codici
35
Sviluppatore 35
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
36
Sviluppatore 36
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
Ordini simili
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
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
THE PIP CRUSHER 61+ USD
**PROJECT TITLE:** MQL5 Expert Advisor — Debug, Fix & Finalize (THE PIP CRUSHER) --- **PROJECT TYPE:** Fix and finalize existing MQL5 Expert Advisor code. This is NOT a strategy development job. The strategy is fully designed and the code is already written. I need a skilled MQL5 developer to compile the code, fix all errors and warnings, verify the logic works correctly, and deliver a clean working EA. --- **ABOUT
1. Trading Instruments: - The robot should trade exclusively on the following currency pairs: - NZD/CHF - NZD/USD - GBP/USD 2. Trading Style: - The robot should implement a day trading strategy, focusing on short-term trades. 3. Risk Management: - Maximum drawdown percentage: 10%. - Stop loss settings: Adjustable based on volatility (suggested default: 30 pips). - Take profit settings: Adjustable
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
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
I need an Expert Advisor that trades by signal of ADX and Moving Average indicators. It must check and correctly process possible errors in trading operations. The main criteria of opening and closing positions , direction of Moving Average, Price of last bar . Set the number of lots to trade as an input parameter
I need an Expert Advisor based on Vantage signals.It must have check and handling of trade operation errors. The main criteria for opening and closing a position: moving average direction the price is higher the previous bar Trade lots is an input parameter
I need a professional XAUUSD signal indicator for MetaTrader 5, written entirely in MQL5 (.mq5). IMPORTANT: This is NOT an auto-trading EA. It must never open, close or modify trades. It only analyzes XAUUSD and generates signals + MT5 push notifications. 1. Multi-timeframe analysis: H4 → H1 → M30 → M15 → M10 → M5 → M1. 2. Detect market structure: - Swing High / Swing Low - BOS - MSS - CHOCH - Bullish/Bearish HTF

Informazioni sul progetto

Budget
30+ USD
Scadenze
a 10 giorno(i)