Range Breakout EA in MQL5 according to spec

指定

I am looking for an EA in MQL5 that trades both sides of a range breakout and places a hedge order. Fairly straightforward!

Here is a specification:

Trading Strategy Specification: Range Breakout

Platform: Metatrader 5, Forex brokers

Default Chart: EURUSD, 5m chart

Quick overview

The strategy looks for an established range in the morning session and then trades breakouts above or below that range, by opening either a long trade above the range or a short trade below the range. Take-profit and stop-loss targets are immediately set. If one order has been hit, the other order is immediately terminated. If a trade ends in stop-loss, a hedge trade is opened immediately afterwards

 

Description of Algorithm

Input Parameters

Name

data type

default value

starttime

time

7:00am UTC+1

endtime

time

9:00am UTC+1

minimumrange

number

10 pips

maximumrange

number

150 pips

entrybuffer

number

5%

exitbuffer

number

2%

riskrewardratio

number

2

tradevolume

number

0.05 lots

hedgerangedivider

number

3

hedgevolumemultiplier

number

4

endtime

time

8:00pm UTC+1

Step 1: Establish range in the morning session

Record the highest and the lowest encountered price in the time interval between start time and end time in two variables and calculate the resulting range. Also apply a minimum and maximum range.

High = highest price encountered in interal between starttime and endtime

Low = lowest price encountered in interval between starttime and endtime

Range = High - Low

if Range is higher than maximum range, then set Range = maximumrange

if Range is lower than minimum range, then set Range = minimumrange

Step 2: Trade Entries

Calculate the entry prices by using the range, and a buffer. Set the orders immediately after the time interval of step 1 is over. First, calculate price levels:

bufferrangeentry = range * (1+entrybuffer)

bufferrangeexit = range * (1+exitbuffer)

rangedivider = range / riskrewardratio

Place two pending stop orders with the following parameters:

1) Short Order

Direction: short

Entry Price: Low - bufferrangeentry

stop loss: High + bufferrangeexit

take profit: Entry - rangedivider

2) Long Order:

Direction: long

Entry: High + bufferrangeentry

Set stop loss: Low - bufferrangeexit

Set take profit: Entry + rangedivider


If one of the orders is hit, delete the other open order.

 

Step 3: Hedge Orders

If a stop loss has been hit, on the first opened position, we try to re-coup our losses with a hedge. Therefore a hedge order is placed at the stop-loss of the first opened order. Calculate the range of the hedge:

hedgerange = Range / hedgerangedivider

Place Long Hedge Order if 1st opened position was a short:

Direction: Long

Entry: 1st order stop loss price, immediately after

Stop loss: 1st order entry price

Take Profit: entry + hedgerange

OR

Place Short Hedge Order if 1st opened position was a long:

Direction: Short

Entry: 1st order stop loss price

Set Stop loss: 1st order entry price

set Take Profit: entry - hedgerange

 

Step 4: Close at market price at a time at the end of the day

Close all orders and positions at the given time in the endtime parameter


反馈

1
开发者 1
等级
(258)
项目
321
30%
仲裁
34
26% / 65%
逾期
10
3%
空闲
2
开发者 2
等级
(106)
项目
173
25%
仲裁
23
9% / 78%
逾期
16
9%
工作中
3
开发者 3
等级
(22)
项目
21
10%
仲裁
4
25% / 75%
逾期
0
空闲
4
开发者 4
等级
(156)
项目
197
59%
仲裁
10
80% / 0%
逾期
0
工作中
发布者: 1 代码
5
开发者 5
等级
(328)
项目
512
19%
仲裁
33
45% / 30%
逾期
34
7%
繁忙
6
开发者 6
等级
(2)
项目
3
33%
仲裁
3
33% / 33%
逾期
0
空闲
7
开发者 7
等级
(2322)
项目
2925
63%
仲裁
123
45% / 25%
逾期
429
15%
空闲
8
开发者 8
等级
(33)
项目
35
20%
仲裁
5
40% / 40%
逾期
0
空闲
发布者: 1 代码
9
开发者 9
等级
(310)
项目
315
70%
仲裁
2
100% / 0%
逾期
0
空闲
发布者: 1 代码
10
开发者 10
等级
(1)
项目
1
0%
仲裁
1
0% / 100%
逾期
0
空闲
11
开发者 11
等级
(6)
项目
7
0%
仲裁
2
0% / 100%
逾期
0
工作中
12
开发者 12
等级
(572)
项目
664
32%
仲裁
42
45% / 45%
逾期
12
2%
工作中
13
开发者 13
等级
(45)
项目
46
24%
仲裁
34
9% / 85%
逾期
10
22%
空闲
14
开发者 14
等级
项目
0
0%
仲裁
1
0% / 0%
逾期
0
工作中
发布者: 2 代码
15
开发者 15
等级
(434)
项目
635
54%
仲裁
32
56% / 22%
逾期
6
1%
工作中
16
开发者 16
等级
(5)
项目
8
13%
仲裁
3
0% / 33%
逾期
2
25%
空闲
发布者: 1 代码
17
开发者 17
等级
(362)
项目
435
54%
仲裁
21
52% / 14%
逾期
30
7%
工作中
18
开发者 18
等级
(58)
项目
90
43%
仲裁
4
0% / 100%
逾期
3
3%
工作中
19
开发者 19
等级
(162)
项目
289
35%
仲裁
18
22% / 61%
逾期
43
15%
空闲
20
开发者 20
等级
(8)
项目
9
56%
仲裁
0
逾期
0
空闲
21
开发者 21
等级
(618)
项目
1428
59%
仲裁
31
81% / 0%
逾期
10
1%
空闲
22
开发者 22
等级
(493)
项目
1022
58%
仲裁
30
27% / 23%
逾期
133
13%
工作中
23
开发者 23
等级
(322)
项目
499
67%
仲裁
5
40% / 0%
逾期
4
1%
空闲
发布者: 8 代码
24
开发者 24
等级
(2662)
项目
3384
68%
仲裁
77
48% / 14%
逾期
342
10%
工作中
发布者: 1 代码
25
开发者 25
等级
(511)
项目
550
53%
仲裁
13
69% / 15%
逾期
3
1%
空闲
26
开发者 26
等级
(574)
项目
945
47%
仲裁
309
58% / 27%
逾期
125
13%
空闲
相似订单
Junior EA 30+ USD
1. EA for MT5, hedging allowed. 2. Entry: 50 EMA crosses 200 EMA on H1. Buy on bullish cross, sell on bearish. 3. SL: 100 pips, TP: 200 pips. No trailing stop. 4. Lot size: 0.01 fixed. Max 3 trades at once. 5. Trade only 08:00-18:00 GMT. No trades if spread > 20 points. 6. Inputs: EMA periods, SL, TP, lot size, start/end time
EliBoT 39+ USD
//+------------------------------------------------------------------+ //| TrendPullbackEA.mq5 | //| Simple Trend + Pullback Strategy EA (Beginner Friendly) | //+------------------------------------------------------------------+ #property strict #include <Trade/Trade.mqh> CTrade trade; //------------------------------------------------------------------- // INPUT PARAMETERS
//+------------------------------------------------------------------+ //| BORGMAN SMC EA v8.7 - INSTITUTIONAL MERGE | //| Combines v8.5 risk architecture + v8.6 SMC engine | //+------------------------------------------------------------------+ #property strict #property version "8.70" #include <Trade/Trade.mqh> CTrade Trade; //---------------------- ENUMS ----------------------// enum ENUM_RR_MODE { RR_2R, // 1:2
I need an experienced MQL5 developer to build a semi automated trading signal system for Gold (XAUUSD) on MT5. The system is NOT a martingale or grid EA. The goal is to build a clean rule based signal engine that detects high probability setups based on predefined strategy rules and sends trading alerts with optional pending order logic. Main Requirements: 1. Signal Generation - Buy and Sell signals - Buy Limit - Buy
Mambo 30+ USD
I need a bot that can trade weltrade synthetic indices that can be consistently making profits if you have one for deriv its also fine a bot that executes and closes trades automat Will be ideal
MT5 Expert Advisor Specification: Asian Liquidity Sweep & M5 FVG Entry ​Project Overview ​Automated Expert Advisor for EUR/USD on MT5. The strategy maps structural liquidity (Fractal Swings) for entry triggers but targets absolute session extremes for Take Profit. It enters on the first opposite M5 Fair Value Gap (FVG) and features a dynamic, user-controlled risk engine. ​1. Timezone & News Filter Requirements ​The
I am looking for an experienced MQL4/MQL5 developer to build a custom MT4 indicator from scratch or cracking my ex4 file that i provide to you. I already have an existing indicator (EX4) which produces highly accurate buy/sell signals. I want a similar indicator developed based on its observable behavior and signal structure. my existing indicator is pc id protected so you have to do PC ID security bypass and source
I am looking for an experienced MQL5 developer to build a professional Expert Advisor with the following specs: TECHNICAL REQUIREMENTS: - Platform: MetaTrader 5 (MT5) - Pairs: GBPUSD and EURUSD - Broker suffix support (e.g. GBPUSD@, EURUSD@) - Primary timeframe: M5 -Higher timeframe bias: H1 and H4 (for trend direction only) - One chart setup — manages both pairs from one chart STRATEGY: - Price action based: BOS
OBJETIVO Criar um Expert Advisor MT5 profissional para XAUUSD focado em: Consistência Baixo drawdown Scalping profissional Proteção da conta Crescimento sustentável Compatibilidade com conta micro e prop firms NÃO utilizar: Martingale Grid Hedge agressivo Recovery system Multiplicação de lotes após perda --- ATIVO XAUUSD apenas --- TIMEFRAMES Timeframe principal M5 Confirmação tendência M15 Confirmação macro opcional
I need a very advanced and intelligent MT5 Expert Advisor coded in MQL5 for XAUUSD, based on ICT + CRT + Smart Money Concepts. The goal is not a simple robot, but a professional decision-making system with strong filters, risk control, and high-quality trade selection. The EA must include: 1. Multi-Timeframe Analysis - D1 / H4 / H1 bias - M15 / M5 entry confirmation - Bullish or bearish market structure - BOS, CHoCH

项目信息

预算
100 - 200 USD
截止日期
 5 天