指定
# 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
等级
项目
495
23%
仲裁
59
56%
/
25%
逾期
58
12%
工作中
2
等级
项目
638
53%
仲裁
32
59%
/
22%
逾期
6
1%
工作中
3
等级
项目
0
0%
仲裁
0
逾期
0
空闲
4
等级
项目
175
25%
仲裁
23
13%
/
78%
逾期
16
9%
工作中
5
等级
项目
0
0%
仲裁
0
逾期
0
工作中
发布者: 1 代码
6
等级
项目
0
0%
仲裁
0
逾期
0
空闲
7
等级
项目
0
0%
仲裁
0
逾期
0
空闲
8
等级
项目
45
60%
仲裁
2
100%
/
0%
逾期
1
2%
空闲
发布者: 5 代码
9
等级
项目
5
20%
仲裁
1
100%
/
0%
逾期
2
40%
空闲
10
等级
项目
2
0%
仲裁
0
逾期
0
空闲
11
等级
项目
16
25%
仲裁
1
0%
/
0%
逾期
4
25%
工作中
12
等级
项目
1
0%
仲裁
0
逾期
0
空闲
相似订单
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
🔍 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
Dear Developer, I am looking to hire an experienced Meta Trader4 and 5 (MQL5) Expert Advisor developer to build a custom Expert Advisor for XAUUSD (Gold). This project is based on a structured swing trading system using market structure analysis and multi-timeframe confirmation. PROJECT OVERVIEW The Expert Advisor must be designed to trade XAUUSD using the following multi-timeframe approach: • Daily (D1): Optional
# 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 MQL5 Developer Needed for Prop Firm-Ready EA
30 - 200 USD
I am looking for an experienced MQL5 developer to build a robust, high performance Expert advisor (EA) designed specifically for passing and managing funded accounts.The primary focus is to make some good money and also focus on risk management, consistent equity growth
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
I am in need of a profitable scalping EA for gold. No grid or martingale strategy pls. If you have one fully developed and working, pls reach out. You should be able to provide trial version
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
Just a straight forward ea that reacts from candle close and open area using martingale option knowing what the broker charges per pair because will use it in a Z spread account so the ea will know what they charge or I can manually set charges so before ea close in profit it makes sure it covers the charges and added little profit before closing
项目信息
预算
30+ USD
截止日期
到 10 天
客户
所下订单1
仲裁计数0