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
495
23%
Arbitragem
59
56%
/
25%
Expirado
58
12%
Trabalhando
2
Classificação
Projetos
638
53%
Arbitragem
32
59%
/
22%
Expirado
6
1%
Trabalhando
3
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
4
Classificação
Projetos
175
25%
Arbitragem
23
13%
/
78%
Expirado
16
9%
Trabalhando
5
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Trabalhando
Publicou: 1 código
6
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
7
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
8
Classificação
Projetos
45
60%
Arbitragem
2
100%
/
0%
Expirado
1
2%
Livre
Publicou: 5 códigos
9
Classificação
Projetos
5
20%
Arbitragem
1
100%
/
0%
Expirado
2
40%
Livre
10
Classificação
Projetos
2
0%
Arbitragem
0
Expirado
0
Livre
11
Classificação
Projetos
16
25%
Arbitragem
1
0%
/
0%
Expirado
4
25%
Trabalhando
12
Classificação
Projetos
1
0%
Arbitragem
0
Expirado
0
Livre
Pedidos semelhantes
AI Stategy: 1.Trend identify by MA(perid 21,50, 100 customiseable) If Market above MA treated up trend If Market down MA trated down trend Above pictue shown as example Entry for uptrend buy & down trend sell Conditions for Sell entry with down trend Condition 1:Previous candle H1time bearish candle must Condition 2: 2 or more bulish candle then 1 bearish candle with 5 minit time frame ABOVE PICTURE SHOWN
Hello, I have an automated trading EA for BTC and I am looking for an experienced strategy optimizer who can help find the most suitable settings. Current results show that the EA achieved approximately 700% profit over 1.5 years , but with drawdown that is too high for my requirements . My goal is to optimize the strategy parameters to achieve: Lower and more stable drawdown Consistent risk management Target return
🔍 Strategy Logic 📌 Indicators Used 21 EMA RSI (Upper Level: 61, Lower Level: 39 – Customizable) 📈 Buy Side Setup (Long Entry) Step 1 – Trend Confirmation A Green candle must close above 21 EMA. Step 2 – Pattern Formation After the green candle, observe next 4 candles. At least one Red candle must form (opposite candle). That Red candle must also close above EMA. Step 3 – Key Level Marking Mark the High of the Red
# Project Specification — MT5 Expert Advisor "Prince Strategy" ## Project Goal Develop an Expert Advisor (trading robot) for MetaTrader 5 that automates a price-action trading strategy based on candlestick patterns across multiple timeframes. The robot must work on the forex.com broker. --- ## 1. Traded Instruments The robot must trade the following 4 forex pairs: - GBPUSD - EURUSD - NZDUSD - AUDUSD **Important
Expert Advisor (EA) Requirements – MT5 (MQL5) Project Overview Develop an automated Expert Advisor (EA) for MetaTrader 5 based on EMA crossover signals combined with strict risk management and trade management principles. The EA must be optimized for Forex pairs and indices and should operate automatically without manual intervention. Entry Conditions Buy Setup Fast EMA crosses above Slow EMA. Current candle closes
Modify a (Pruning) Grid EA
30+ USD
MT5 Expert Advisor Development Project Overview I am looking for an experienced MQL5 developer to build a custom MetaTrader 5 Expert Advisor based on a grid-cycle trading framework. This is not a standard grid EA . The system combines: Session-based trade initiation Multi-filter signal generation Dynamic grid management Advanced basket management State-machine-driven trade lifecycle management Dynamic take-profit
Need an MT5 EA coded in MQL5. Strategy uses internally calculated MT5 Heikin Ashi candles, EMA 9 and EMA 21 on M1 USDJPY. Fixed lot size 12.20. One trade at a time. 40-point stop loss. Exit after 3 consecutive opposite Heikin Ashi candles. I have a detailed strategy document and video examples of valid and invalid entries. Videos linked show MT5 IOS but custom EA code will be used for windows MT5
Advanced Forex Expert Advisor-fully automated system
200 - 300 USD
I require a custom EA and an accompanying custom indicator built in MQL5 for Meta Trader 4/5. The EA must be fully automated (Algo Trading); Telegram-Signal-Linked and named 'AMK Fx'
MC Trader's
30+ USD
If Buy: it must Buy when a conformation is done Bye the candle that would be a bullish engolfing candle or after liqudity swip or when sellers has stepped down the market and the market regains energy and trand upwards, it's stop loss must be below the Buy position and it's take profit must be at the top of all candles
Sweetposion hedge
30+ USD
Read signal and enter trade and close trade at good profits and open trade again. Either bullish or bearish signals at 0.1 on XAUUSD. Maximum trade a day should be 4-5 times with good opens and close signals. Looking foward to a long cooperation and also a honest and genuine person
Informações sobre o projeto
Orçamento
30+ USD
Prazo
para 10 dias
Cliente
Pedidos postados1
Número de arbitragens0