Session Breakout for MT5

MQL5 专家 脚本 外汇 策略优化

工作已完成

执行时间1 一天

指定

Build a Session Breakout EA for MT5 (EURUSD) — EXACTLY as below. No changes to logic.

but make it work on all pairs

double slPips, tpPips;

if (AssetType == "Forex")      { slPips = 20; tpPips = 60; }

if (AssetType == "GBPUSD")     { slPips = 25; tpPips = 75; }

if (AssetType == "NAS100")     { slPips = 30; tpPips = 90; }

if (AssetType == "US30")       { slPips = 40; tpPips = 120; }

if (AssetType == "Gold")       { slPips = 150; tpPips = 450; }

but optimize it for eurusd


================================================================
CORE STRATEGY
================================================================
- Trade ONLY at London Open: 08:00–08:05 UTC
- Breakout of Asian Session Range (00:00–07:59 UTC)
- Entry: 5M candle CLOSES outside Asian High/Low
- Volume Filter: Breakout candle volume > 2× 20-period average
- Risk: 0.5% of account per trade
- Option: Manual lot size override (input)
- SL: 20 pips beyond breakout level
- TP: 1:3 RR (60 pips target)
- Max 1 trade per day
- Skip: NFP, ECB Rate, FOMC, CPI, bank holidays

================================================================
TIME FILTER (BROKER TIME AUTO-DETECT)
================================================================
- Use TimeGMT() to detect broker offset
- Auto-calculate 08:00 UTC based on broker time
- Example: If broker is GMT+3 → trade 11:00–11:05 broker time

================================================================
INPUTS (User Can Change Only These)
================================================================
input double   RiskPercent       = 0.5;     // % risk
input double   FixedLotSize      = 0.0;     // 0 = use % risk, >0 = fixed lots
input int      VolumeMultiplier  = 2;       // Fixed
input int      SlippagePips      = 3;       // Max slippage
input bool     UseNewsFilter     = true;    // Auto-skip news
input string   MagicComment      = "SBOv1";

================================================================
SESSION LOGIC
================================================================
// Reset at 00:00 UTC
if (TimeHour(TimeGMT()) == 0 && TimeMinute(TimeGMT()) == 0)
{
   AsianHigh = -999; AsianLow = 999;
}

// Track Asian range (00:00–07:59 UTC)
if (TimeHour(TimeGMT()) >= 0 && TimeHour(TimeGMT()) < 8)
{
   double h = iHigh(_Symbol, PERIOD_H1, 0);
   double l = iLow(_Symbol, PERIOD_H1, 0);
   if (h > AsianHigh) AsianHigh = h;
   if (l < AsianLow)  AsianLow  = l;
}

// At 08:00 UTC → lock range
if (TimeHour(TimeGMT()) == 8 && TimeMinute(TimeGMT()) == 0)
   FinalAsianHigh = AsianHigh; FinalAsianLow = AsianLow;

// Trade window: 08:00–08:05 UTC (broker time adjusted)
datetime brokerTime = TimeCurrent();
int brokerHour = TimeHour(brokerTime);
int brokerMin  = TimeMinute(brokerTime);
int utcHour    = TimeHour(TimeGMT());
if (utcHour == 8 && brokerMin >= 0 && brokerMin <= 5)
   CheckBreakout();

================================================================
VOLUME FILTER
================================================================
double vol    = iVolume(_Symbol, PERIOD_M5, 1);
double volAvg = iMA(_Symbol, PERIOD_M5, 20, 0, MODE_SMA, PRICE_VOLUME, 1);
if (vol <= volAvg * VolumeMultiplier) return;

================================================================
ENTRY LOGIC
================================================================
if (iClose(PERIOD_M5, 1) > FinalAsianHigh && iLow(PERIOD_M5, 1) <= FinalAsianHigh)
   → LONG
if (iClose(PERIOD_M5, 1) < FinalAsianLow  && iHigh(PERIOD_M5, 1) >= FinalAsianLow)
   → SHORT

================================================================
RISK & POSITION SIZING
================================================================
double slPips = 20;
double lots;

if (FixedLotSize > 0)
   lots = FixedLotSize;
else
{
   double risk = AccountBalance() * RiskPercent / 100;
   double pipValue = MarketInfo(_Symbol, MODE_TICKVALUE);
   lots = NormalizeDouble(risk / (slPips * pipValue * 10), 2);
}
lots = MathMax(lots, 0.01);

================================================================
NEWS FILTER (BUILT-IN CALENDAR)
================================================================
- Use Forex Factory RSS or built-in MT5 calendar
- Skip if ANY high-impact event in next 2 hours:
  → NFP, ECB Interest Rate, FOMC, CPI (US/EU)
- Hardcode event names + auto-check

================================================================
TRADE MANAGEMENT
================================================================
- No trailing stop
- No partial close
- Max hold: 8 hours (auto-close at 16:00 UTC)
- If no fill by 08:05 UTC → cancel
- Close at TP or SL only

================================================================
SAFETY FEATURES
================================================================
- No trading on weekends
- No trading if spread > 2.0 pips (iSpread)
- No trading if equity < 50% of start balance
================================================================
DELIVERABLES
================================================================
1. .ex5 file
2. .mq5 source (fully commented)
3. PDF: 1-page user guide
4. CSV: Backtest 2015–2025 (1,026 trades)


反馈

1
开发者 1
等级
(209)
项目
281
46%
仲裁
27
59% / 37%
逾期
36
13%
工作中
2
开发者 2
等级
(18)
项目
22
9%
仲裁
6
33% / 50%
逾期
1
5%
工作中
3
开发者 3
等级
(1)
项目
2
0%
仲裁
1
0% / 100%
逾期
0
空闲
发布者: 2 代码
4
开发者 4
等级
(60)
项目
87
29%
仲裁
24
13% / 58%
逾期
7
8%
工作中
5
开发者 5
等级
项目
0
0%
仲裁
1
0% / 100%
逾期
0
空闲
6
开发者 6
等级
(429)
项目
628
54%
仲裁
32
50% / 22%
逾期
6
1%
已载入
7
开发者 7
等级
(508)
项目
976
74%
仲裁
27
19% / 67%
逾期
101
10%
工作中
发布者: 1 文章, 6 代码
8
开发者 8
等级
(4)
项目
5
40%
仲裁
1
0% / 0%
逾期
0
空闲
9
开发者 9
等级
(33)
项目
38
21%
仲裁
5
0% / 60%
逾期
0
空闲
10
开发者 10
等级
(39)
项目
57
18%
仲裁
6
33% / 17%
逾期
1
2%
空闲
发布者: 2 代码
11
开发者 11
等级
(1)
项目
1
100%
仲裁
0
逾期
0
空闲
12
开发者 12
等级
(311)
项目
557
35%
仲裁
79
32% / 43%
逾期
202
36%
空闲
13
开发者 13
等级
(5)
项目
4
25%
仲裁
1
0% / 100%
逾期
0
空闲
14
开发者 14
等级
项目
0
0%
仲裁
0
逾期
0
空闲
15
开发者 15
等级
(213)
项目
364
32%
仲裁
34
41% / 29%
逾期
108
30%
空闲
发布者: 1 代码
16
开发者 16
等级
(21)
项目
25
52%
仲裁
3
0% / 100%
逾期
2
8%
空闲
相似订单
Hi Im working with a Crypto trading company and we want to branch out with our indicator, i'm researching the bot automation and need some hands on board. i i want to hear your opinion about the indicator that i would like you to build. in the PDF i explain the whole indicator and how it need to look like. happy to hear form you
The ea must repeat all orders until closed manually by a 'close all button' needed on panel EA must start at specific time / day and enter 'at market' - should be easy to code :) INPUTS REQUIRED: Pair ___ - Lot Size____ - Type ____ ( buy / sell) - Distance between trades in points______ - TP for each trade in points_____ - Maximum spread in Pips _____ - Time and day to
I want someone to hold a session for me and explain in details on how to implement them in. I would really appreciate your guidance on how to properly set up GoCharting and get access to CME futures data
Mani 30 - 50 USD
Title: MT5 Martingale EA (Based on Stop Loss of Previous Trade) Description: Hello, I need a simple and efficient MT5 Expert Advisor based on a martingale logic. Main Logic: The EA should work with trades placed manually or by another EA (including limit orders). When a trade hits Stop Loss, the EA must automatically open a new trade in the same direction. The lot size of the new trade should be multiplied
Existing EA 30 USD
I’m looking to acquire an existing, profitable Expert Advisor (EA) with full source code to add to our client investment portfolio. To be clear, this is not a request to develop or design a new strategy. If you already have an EA that is proven, consistent, and production-ready, I’m open to reviewing it immediately. Please apply only if you meet all the requirements below. Submissions without a proper introduction or
Wealthy bot 50 - 200 USD
‎Build a mobile-based trading bot system integrated with MetaTrader 5 that specializes in high-frequency “machine gun” style trading on synthetic indices (crash 50 and Crash 300). ‎ ‎The bot must continuously scan the market in real-time using M1 and M5 timeframes and execute frequent trades based on probability, not prediction. Its core function is to detect early signs of potential reversals by analyzing combined
Preciso de um especialista completo, totalmente profissional, que trabalhe com o indicador Hull Moving Average. Que faça entradas exatamente na mudança de cores com base no Exp_ColorHma, de Nikolay e também com a opção de entrada exatamente no cruzamento de duas Hull Average Moving(não na próxima vela), uma lenta e outra rápida. O programador deverá fazer um trabalhado de profissional. Dispenso curiosos ou
Tebza ngwenya 30 - 100 USD
Just know your deal,if you don't know what you are up to I gotchu. This is my first time trying also so yeah, but otherwise if you looking for something grand I'm here, if you got offered me well you in for some great time
EA Script editor 30 - 35 USD
I need someone who will help me with a script that supports / cancels out negative positions. So that with a deposit of 600 euros, it doesn't close 300 euros. More info on pv
Pips Muncher 30 - 35 USD
I need a good programmer to creat an ea that will open a trade once the parametres i set are met on the chat that i place it on. The Ea will not need to do any analyses as i would do that manually. It only needs to execute a trade when all the conditions that i will be sending meets. The ea will add stop loss an Tp

项目信息

预算
30+ USD
截止日期
 1  20 天