Termos de Referência
# 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.
Respondido
1
Classificação
Projetos
506
23%
Arbitragem
60
57%
/
25%
Expirado
59
12%
Livre
2
Classificação
Projetos
640
53%
Arbitragem
34
62%
/
21%
Expirado
6
1%
Trabalhando
3
Classificação
Projetos
1
0%
Arbitragem
0
Expirado
1
100%
Livre
4
Classificação
Projetos
180
25%
Arbitragem
24
17%
/
75%
Expirado
16
9%
Livre
5
Classificação
Projetos
4
25%
Arbitragem
0
Expirado
0
Carregado
Publicou: 1 código
6
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
7
Classificação
Projetos
1
100%
Arbitragem
0
Expirado
0
Livre
8
Classificação
Projetos
52
58%
Arbitragem
2
100%
/
0%
Expirado
1
2%
Livre
Publicou: 5 códigos
9
Classificação
Projetos
8
38%
Arbitragem
1
100%
/
0%
Expirado
2
25%
Livre
10
Classificação
Projetos
4
0%
Arbitragem
0
Expirado
0
Livre
11
Classificação
Projetos
18
22%
Arbitragem
1
100%
/
0%
Expirado
4
22%
Carregado
12
Classificação
Projetos
4
25%
Arbitragem
0
Expirado
0
Livre
13
Classificação
Projetos
32
19%
Arbitragem
5
40%
/
40%
Expirado
4
13%
Trabalhando
14
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
15
Classificação
Projetos
10
10%
Arbitragem
0
Expirado
0
Livre
16
Classificação
Projetos
8
0%
Arbitragem
2
50%
/
0%
Expirado
1
13%
Trabalhando
17
Classificação
Projetos
478
40%
Arbitragem
105
40%
/
24%
Expirado
82
17%
Carregado
Publicou: 2 códigos
18
Classificação
Projetos
20
25%
Arbitragem
0
Expirado
2
10%
Livre
Publicou: 3 códigos
19
Classificação
Projetos
14
43%
Arbitragem
0
Expirado
3
21%
Livre
20
Classificação
Projetos
302
76%
Arbitragem
13
77%
/
0%
Expirado
4
1%
Carregado
21
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
22
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
23
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
24
Classificação
Projetos
0
0%
Arbitragem
1
0%
/
100%
Expirado
0
Livre
25
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
26
Classificação
Projetos
74
18%
Arbitragem
30
17%
/
53%
Expirado
31
42%
Livre
27
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
28
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
29
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
30
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
31
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
32
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
33
Classificação
Projetos
1
0%
Arbitragem
0
Expirado
0
Livre
Publicou: 2 códigos
34
Classificação
Projetos
1
0%
Arbitragem
0
Expirado
0
Livre
Publicou: 1 código
35
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
36
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
Pedidos semelhantes
Flummox 0.1
30+ USD
//@version=5 strategy("Vol10 Triple Confluence M15", overlay=true, margin_long=100, margin_short=100) // === INPUTS === emaLen = input.int(200, "EMA Trend") rsiLen = input.int(14, "RSI Length") bbLen = input.int(14, "Bands Length") rsiOversold = input.float(25, "RSI Buy Zone") rsiOverbought = input.float(77.38, "RSI Sell Zone") // === INDICATORS === emaTrend = ta.ema(close, emaLen) ema1 = ta.ema(close, bbLen) ema2 =
Foxer trading
30 - 500 USD
Automated Forex trading software is generally evaluated by users on independent forums like Forex Peace Army, Myfxbook, and Trustpilot. The highest-rated systems typically fall into three categories, depending on your risk tolerance and trading style: GPS Forex Robot : Famous for its long-term track record on verified Myfxbook accounts. Users praise its steady trend-following logic and its conservative approach
Raydon read
30+ USD
Instead of an answer key, bots use user-defined settings like lot size, stop-loss, take-profit, and unique identifier numbers (magic numbers).Logic Rules: They scan markets for triggers like moving averages, RSI, or MACD.Execution: Trades happen programmatically to remove human emotion
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
Sharbat Khan
100+ USD
Looking for MQL5 Developer to debug my Gold Trading EA. Issues: - Error on compile - SL/TP not working correctly - Need to add Trail Stop feature Send me past work + Price + Delivery Time
Mopati
30+ USD
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
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
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
Informações sobre o projeto
Orçamento
30+ USD
Prazo
para 10 dias