Техническое задание

# 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
Оценка
(401)
Проекты
519
24%
Арбитраж
61
57% / 25%
Просрочено
60
12%
Работает
2
Разработчик 2
Оценка
(436)
Проекты
647
53%
Арбитраж
35
63% / 20%
Просрочено
7
1%
Работает
3
Разработчик 3
Оценка
Проекты
1
0%
Арбитраж
0
Просрочено
1
100%
Свободен
4
Разработчик 4
Оценка
(111)
Проекты
184
25%
Арбитраж
25
16% / 76%
Просрочено
16
9%
Свободен
5
Разработчик 5
Оценка
(10)
Проекты
12
33%
Арбитраж
0
Просрочено
2
17%
Работает
Опубликовал: 1 пример
6
Разработчик 6
Оценка
Проекты
0
0%
Арбитраж
0
Просрочено
0
Свободен
7
Разработчик 7
Оценка
(11)
Проекты
16
38%
Арбитраж
0
Просрочено
1
6%
Загружен
8
Разработчик 8
Оценка
(45)
Проекты
53
57%
Арбитраж
2
100% / 0%
Просрочено
1
2%
Свободен
Опубликовал: 5 примеров
9
Разработчик 9
Оценка
(6)
Проекты
8
38%
Арбитраж
2
50% / 50%
Просрочено
2
25%
Свободен
10
Разработчик 10
Оценка
(3)
Проекты
4
0%
Арбитраж
0
Просрочено
0
Свободен
11
Разработчик 11
Оценка
(16)
Проекты
21
29%
Арбитраж
2
50% / 0%
Просрочено
4
19%
Работает
12
Разработчик 12
Оценка
(4)
Проекты
4
25%
Арбитраж
0
Просрочено
0
Свободен
13
Разработчик 13
Оценка
(25)
Проекты
33
18%
Арбитраж
6
50% / 33%
Просрочено
4
12%
Свободен
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 примера
18
Разработчик 18
Оценка
(14)
Проекты
21
24%
Арбитраж
0
Просрочено
2
10%
Свободен
Опубликовал: 3 примера
19
Разработчик 19
Оценка
(10)
Проекты
14
43%
Арбитраж
0
Просрочено
3
21%
Свободен
20
Разработчик 20
Оценка
(263)
Проекты
309
76%
Арбитраж
14
71% / 0%
Просрочено
6
2%
Загружен
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
Свободен
Опубликовал: 11 примеров
34
Разработчик 34
Оценка
(1)
Проекты
1
0%
Арбитраж
0
Просрочено
0
Свободен
Опубликовал: 2 примера
35
Разработчик 35
Оценка
Проекты
0
0%
Арбитраж
0
Просрочено
0
Свободен
36
Разработчик 36
Оценка
Проекты
0
0%
Арбитраж
0
Просрочено
0
Свободен
Похожие заказы
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

Информация о проекте

Бюджет
30+ USD
Сроки выполнения
до 10 дн.