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
Оценка
(250)
Проекты
313
28%
Арбитраж
34
26% / 65%
Просрочено
10
3%
Работает
2
Разработчик 2
Оценка
(104)
Проекты
167
25%
Арбитраж
23
9% / 78%
Просрочено
16
10%
Работает
3
Разработчик 3
Оценка
(22)
Проекты
21
10%
Арбитраж
4
25% / 75%
Просрочено
0
Свободен
4
Разработчик 4
Оценка
(154)
Проекты
193
58%
Арбитраж
10
80% / 0%
Просрочено
0
Свободен
Опубликовал: 1 пример
5
Разработчик 5
Оценка
(326)
Проекты
508
19%
Арбитраж
33
45% / 30%
Просрочено
34
7%
Загружен
6
Разработчик 6
Оценка
(2)
Проекты
3
33%
Арбитраж
3
33% / 33%
Просрочено
0
Свободен
7
Разработчик 7
Оценка
(2313)
Проекты
2912
63%
Арбитраж
122
44% / 25%
Просрочено
429
15%
Свободен
8
Разработчик 8
Оценка
(33)
Проекты
35
20%
Арбитраж
5
40% / 40%
Просрочено
0
Свободен
Опубликовал: 1 пример
9
Разработчик 9
Оценка
(304)
Проекты
310
69%
Арбитраж
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
Оценка
(553)
Проекты
640
33%
Арбитраж
41
41% / 46%
Просрочено
11
2%
Загружен
13
Разработчик 13
Оценка
(45)
Проекты
46
24%
Арбитраж
34
9% / 85%
Просрочено
10
22%
Свободен
14
Разработчик 14
Оценка
Проекты
0
0%
Арбитраж
1
0% / 0%
Просрочено
0
Работает
Опубликовал: 2 примера
15
Разработчик 15
Оценка
(429)
Проекты
628
54%
Арбитраж
31
52% / 23%
Просрочено
6
1%
Загружен
16
Разработчик 16
Оценка
(5)
Проекты
8
13%
Арбитраж
3
0% / 33%
Просрочено
2
25%
Свободен
Опубликовал: 1 пример
17
Разработчик 17
Оценка
(355)
Проекты
426
54%
Арбитраж
20
55% / 15%
Просрочено
29
7%
Загружен
18
Разработчик 18
Оценка
(57)
Проекты
89
43%
Арбитраж
4
0% / 100%
Просрочено
3
3%
Работает
19
Разработчик 19
Оценка
(160)
Проекты
285
35%
Арбитраж
18
22% / 61%
Просрочено
42
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
Оценка
(2645)
Проекты
3361
68%
Арбитраж
77
48% / 14%
Просрочено
342
10%
Работает
Опубликовал: 1 пример
25
Разработчик 25
Оценка
(511)
Проекты
549
53%
Арбитраж
13
69% / 15%
Просрочено
3
1%
Свободен
26
Разработчик 26
Оценка
(574)
Проекты
945
47%
Арбитраж
309
58% / 27%
Просрочено
125
13%
Свободен
Похожие заказы
Zone detection is coded , you will be working from that point . Trailing Stop Optimization for live chart . Apply Specific Currency Support . Clean Code . Zone Upper Limit and Lower Limit
حلل لي اصل مالي ) اكتب هنا مثلا XAU EUR USD USD اريد تحليلا تعليما و ليس توصية مالية ۱- نوع التحليل المطلوب : ( فني / اساسي / سلوك سعري ) ٢ - المدي الزمني : ( قصير / متوسط / طويل ) M15 / H1 / H4 / ) اذكر الفريمات المطلوبه + (D1 ما اريد استخراجه من التحليل : الاتجاه العام اقوي مستويات دعم و مقاومة رقمية سيناريو صعود و سيناريو هبوط مع شروط كل سيناريو ( IF / THEN ) اين يصبح السيناريو لاغيا مناطق دخول و خروج تعليمية (
I need modifications to an existing MT5 Expert Advisor. Modification 1 EA must be able to run on indices as well as forex , specifically: SP500 US100 US30 No other changes to the current logic Modification 2 Other alterations/notes: Opening breakout range option for 15min or 30 min from session start. 5 min fair value gap (FVG) break outside of the range (instead of 1 min). At least one of the candles must be within
AutoTrade_v4_Arbon-v4 35 - 250 USD
============================================================ GOLD AI INSTITUTIONAL TERMINAL v4.0 - AutoTrade + EA Indikator EDISI GABUNGAN Sinkronisasi MT4 Realtime + Dasbor PWA + AI Multi-TF Menggabungkan MT4 + Server AI Node.js ============================================================ CARA MENJALANKAN (MUDAH): -------------------------- 1. Ekstrak ZIP ke folder manapun (misal: C:\GoldAI\) 2. Buka folder hasil
I am looking for an experienced quantitative developer to analyze and optimize an MT5 Expert Advisor that I have already developed. The EA is relatively complex and includes: Multiple strategies (Trend Pullback, Breakout, Mean Reversion, EMA Reclaim) Scoring system combining technical score and probabilistic filter Regime detection (ADX based) Volatility filters (ATR regime) Correlation and cluster exposure control
Until zone detection is coded , you will be from that point . Trailing Stop Optimization for live chart . Apply with Specific Currency Support . Clean Code . Zone Upper Limit and Lower Limit . Apply with careful understanding of the project requirement
Subject: Professional MT5 Trading Bot Inquiry - Pre-Purchase Requirements Dear [Bot Name/Company Name] Developers, Greetings, I am a professional trader seeking a highly professional and extremely powerful MT5 trading bot , and after extensive research, your product has caught my attention. However, before I click the payment button, I have specific requirements as I am not looking for an ordinary bot, but rather a
hello, please take a moment to review my project. It is for Quanttower. it is very detailed in the instructions. Thank you, Just let me know if you can do it and the whats the cost and timeframe
GoldAI_v2_FINAL 30 - 70 USD
========================================================== Terminal Institusional GOLD AI v2.10 Sinkronisasi Realtime MT4 + Dasbor PWA + AI Multi-TF ========================================================== CARA MENJALANKAN (MUDAH): -------------------------- 1. Ekstrak ZIP ke folder manapun (misal: C:\GoldAI\) 2. Buka folder hasil ekstrak 3. Klik dua kali: INSTALL.bat → installotomatis 4. Klik dua kali
Exe source code 70+ USD
Need a developer to help with a exe file and provide the source code, if you can do this please kidnly apply and tell me what you need to get this started

Информация о проекте

Бюджет
100 - 200 USD
Сроки выполнения
до 5 дн.