Range Breakout EA in MQL5 according to spec

Spécifications

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


Répondu

1
Développeur 1
Évaluation
(250)
Projets
313
28%
Arbitrage
34
26% / 65%
En retard
10
3%
Travail
2
Développeur 2
Évaluation
(104)
Projets
167
25%
Arbitrage
23
9% / 78%
En retard
16
10%
Travail
3
Développeur 3
Évaluation
(22)
Projets
21
10%
Arbitrage
4
25% / 75%
En retard
0
Gratuit
4
Développeur 4
Évaluation
(154)
Projets
193
58%
Arbitrage
10
80% / 0%
En retard
0
Gratuit
Publié : 1 code
5
Développeur 5
Évaluation
(326)
Projets
508
19%
Arbitrage
33
45% / 30%
En retard
34
7%
Chargé
6
Développeur 6
Évaluation
(2)
Projets
3
33%
Arbitrage
3
33% / 33%
En retard
0
Gratuit
7
Développeur 7
Évaluation
(2313)
Projets
2912
63%
Arbitrage
122
44% / 25%
En retard
429
15%
Gratuit
8
Développeur 8
Évaluation
(33)
Projets
35
20%
Arbitrage
5
40% / 40%
En retard
0
Gratuit
Publié : 1 code
9
Développeur 9
Évaluation
(305)
Projets
311
69%
Arbitrage
2
100% / 0%
En retard
0
Gratuit
Publié : 1 code
10
Développeur 10
Évaluation
(1)
Projets
1
0%
Arbitrage
1
0% / 100%
En retard
0
Gratuit
11
Développeur 11
Évaluation
(6)
Projets
7
0%
Arbitrage
2
0% / 100%
En retard
0
Travail
12
Développeur 12
Évaluation
(553)
Projets
640
33%
Arbitrage
41
41% / 46%
En retard
11
2%
Occupé
13
Développeur 13
Évaluation
(45)
Projets
46
24%
Arbitrage
34
9% / 85%
En retard
10
22%
Gratuit
14
Développeur 14
Évaluation
Projets
0
0%
Arbitrage
1
0% / 0%
En retard
0
Travail
Publié : 2 codes
15
Développeur 15
Évaluation
(429)
Projets
628
54%
Arbitrage
31
52% / 23%
En retard
6
1%
Chargé
16
Développeur 16
Évaluation
(5)
Projets
8
13%
Arbitrage
3
0% / 33%
En retard
2
25%
Gratuit
Publié : 1 code
17
Développeur 17
Évaluation
(355)
Projets
427
54%
Arbitrage
20
55% / 15%
En retard
29
7%
Travail
18
Développeur 18
Évaluation
(57)
Projets
89
43%
Arbitrage
4
0% / 100%
En retard
3
3%
Travail
19
Développeur 19
Évaluation
(160)
Projets
285
35%
Arbitrage
18
22% / 61%
En retard
42
15%
Chargé
20
Développeur 20
Évaluation
(8)
Projets
9
56%
Arbitrage
0
En retard
0
Gratuit
21
Développeur 21
Évaluation
(618)
Projets
1428
59%
Arbitrage
31
81% / 0%
En retard
10
1%
Gratuit
22
Développeur 22
Évaluation
(493)
Projets
1022
58%
Arbitrage
30
27% / 23%
En retard
133
13%
Travail
23
Développeur 23
Évaluation
(322)
Projets
499
67%
Arbitrage
5
40% / 0%
En retard
4
1%
Gratuit
Publié : 8 codes
24
Développeur 24
Évaluation
(2645)
Projets
3362
68%
Arbitrage
77
48% / 14%
En retard
342
10%
Gratuit
Publié : 1 code
25
Développeur 25
Évaluation
(511)
Projets
549
53%
Arbitrage
13
69% / 15%
En retard
3
1%
Gratuit
26
Développeur 26
Évaluation
(574)
Projets
945
47%
Arbitrage
309
58% / 27%
En retard
125
13%
Gratuit
Commandes similaires
have the Beatrix Inventor Expert Advisor (EA) that was profitable in the past but has been losing money recently. I need an experienced EA developer/optimizer to study the trade history (especially Stop Loss hits, drawdown periods, SL/TP behavior, win/loss ratio, etc.) and recommend + implement specific tweaks so it becomes consistently profitable again. Your job: 1. Deep analysis of why the EA is no longer
Project: Ready MT5 Multi-Symbol Expert Advisor (No Grid/Martingale) Platform: MetaTrader 5 (MQL5) Type: Fully automated Expert Advisor (EA) Strict mandatory requirements: - Absolutely NO grid trading in any form - Absolutely NO martingale (no lot multiplication on losses, no averaging, no anti-martingale if risky) - No other high-risk money management (e.g., no unnecessary hedging or aggressive entries) - At least 1
want to develop a trading robot (EA) for MetaTrader 5 based on 10 specific rules. The robot should include a professional interface to control all settings, including: Fixed lot size (0.50), Stop Loss (10 USD), RSI indicators for entry/exit, News filter, Trailing stop, and daily profit targets. I have the full logic ready to discuss with the developer. Please ensure high-quality code and testing
I am writing to provide you with comprehensive feedback on the Expert Advisor I have been developing. Below is a complete overview of its features, followed by some important observations about functionalities that need attention. --- ✅ PART 1: CURRENT FEATURES OF THE EA (WHAT IT CONTAINS) 1. Multi-API AI Integration · Supports 10+ API providers: OpenAI (ChatGPT), Anthropic (Claude), Google (Gemini), X.AI (Grok)
Aaa 30+ USD
//+------------------------------------------------------------------+ //| BullishBearish Engulfing CCI.mq5 | //| Copyright 2000-2026, MetaQuotes Ltd. | //| www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2000-2026, MetaQuotes Ltd." #property link " https://www.mql5.com " #property version
Società di investimento con attività tra Sanremo e Monaco ricerca un giovane collaboratore con esperienza nell’utilizzo avanzato di MetaTrader 5. Attività: Il collaboratore si occuperà di: • eseguire backtest di strategie di trading su MT5 • effettuare ottimizzazioni parametri tramite Strategy Tester • analizzare risultati e robustezza delle strategie • eseguire forward test • preparare report di test e analisi. Gli
We are seeking an experienced MQL5 developer to design and develop a high-performance Expert Advisor (EA) for trading Gold (XAUUSD) on MetaTrader 5 . This project is intended for large-scale capital deployment , with an available trading capital exceeding $8,000,000 USD . As such, we are looking for a developer capable of building a robust, scalable, and risk-controlled algorithmic trading system suitable for
I am looking for an experienced MT4 developer/designer who can create a custom chart template using a background image provided NOTE: Apply if you have done this type of job in the past, also provide the prove of your past project
حلل لي اصل مالي ) اكتب هنا مثلا XAU EUR USD USD اريد تحليلا تعليما و ليس توصية مالية ۱- نوع التحليل المطلوب : ( فني / اساسي / سلوك سعري ) ٢ - المدي الزمني : ( قصير / متوسط / طويل ) M15 / H1 / H4 / ) اذكر الفريمات المطلوبه + (D1 ما اريد استخراجه من التحليل : الاتجاه العام اقوي مستويات دعم و مقاومة رقمية سيناريو صعود و سيناريو هبوط مع شروط كل سيناريو ( IF / THEN ) اين يصبح السيناريو لاغيا مناطق دخول و خروج تعليمية (
Project Title: Looking for an MQL5 developer for a custom MT5 Expert Advisor Hello, I am looking for an experienced MQL5 developer to create a custom Expert Advisor (EA) for MetaTrader 5. The strategy logic will be discussed privately after I find a developer interested in the project. At this stage, I only want to know: • If you are available to develop a custom EA • Your experience with MT5 / MQL5 • Your estimated

Informations sur le projet

Budget
100 - 200 USD
Délais
à 5 jour(s)