Range Breakout EA in MQL5 according to spec

İş Gereklilikleri

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


Yanıtlandı

1
Geliştirici 1
Derecelendirme
(241)
Projeler
303
28%
Arabuluculuk
33
24% / 61%
Süresi dolmuş
9
3%
Meşgul
2
Geliştirici 2
Derecelendirme
(103)
Projeler
160
22%
Arabuluculuk
23
9% / 78%
Süresi dolmuş
16
10%
Yüklendi
3
Geliştirici 3
Derecelendirme
(22)
Projeler
21
10%
Arabuluculuk
4
25% / 75%
Süresi dolmuş
0
Serbest
4
Geliştirici 4
Derecelendirme
(152)
Projeler
190
57%
Arabuluculuk
10
80% / 0%
Süresi dolmuş
0
Serbest
Yayınlandı: 1 kod
5
Geliştirici 5
Derecelendirme
(323)
Projeler
502
19%
Arabuluculuk
33
42% / 30%
Süresi dolmuş
33
7%
Yüklendi
6
Geliştirici 6
Derecelendirme
(2)
Projeler
3
33%
Arabuluculuk
3
33% / 33%
Süresi dolmuş
0
Serbest
7
Geliştirici 7
Derecelendirme
(2293)
Projeler
2887
63%
Arabuluculuk
122
44% / 25%
Süresi dolmuş
428
15%
Çalışıyor
8
Geliştirici 8
Derecelendirme
(33)
Projeler
35
20%
Arabuluculuk
5
40% / 40%
Süresi dolmuş
0
Serbest
Yayınlandı: 1 kod
9
Geliştirici 9
Derecelendirme
(302)
Projeler
308
69%
Arabuluculuk
2
100% / 0%
Süresi dolmuş
0
Serbest
Yayınlandı: 1 kod
10
Geliştirici 10
Derecelendirme
(1)
Projeler
1
0%
Arabuluculuk
1
0% / 100%
Süresi dolmuş
0
Serbest
11
Geliştirici 11
Derecelendirme
(6)
Projeler
7
0%
Arabuluculuk
2
0% / 100%
Süresi dolmuş
0
Çalışıyor
12
Geliştirici 12
Derecelendirme
(540)
Projeler
622
33%
Arabuluculuk
37
38% / 51%
Süresi dolmuş
11
2%
Meşgul
13
Geliştirici 13
Derecelendirme
(45)
Projeler
46
24%
Arabuluculuk
34
9% / 85%
Süresi dolmuş
10
22%
Serbest
14
Geliştirici 14
Derecelendirme
Projeler
0
0%
Arabuluculuk
1
0% / 0%
Süresi dolmuş
0
Çalışıyor
Yayınlandı: 2 kod
15
Geliştirici 15
Derecelendirme
(428)
Projeler
623
54%
Arabuluculuk
30
53% / 23%
Süresi dolmuş
6
1%
Meşgul
16
Geliştirici 16
Derecelendirme
(5)
Projeler
8
13%
Arabuluculuk
3
0% / 33%
Süresi dolmuş
2
25%
Serbest
Yayınlandı: 1 kod
17
Geliştirici 17
Derecelendirme
(333)
Projeler
401
52%
Arabuluculuk
20
55% / 15%
Süresi dolmuş
29
7%
Yüklendi
18
Geliştirici 18
Derecelendirme
(57)
Projeler
89
43%
Arabuluculuk
4
0% / 100%
Süresi dolmuş
3
3%
Çalışıyor
19
Geliştirici 19
Derecelendirme
(159)
Projeler
284
35%
Arabuluculuk
18
22% / 61%
Süresi dolmuş
42
15%
Yüklendi
20
Geliştirici 20
Derecelendirme
(8)
Projeler
9
56%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
21
Geliştirici 21
Derecelendirme
(617)
Projeler
1427
59%
Arabuluculuk
31
81% / 0%
Süresi dolmuş
10
1%
Serbest
22
Geliştirici 22
Derecelendirme
(493)
Projeler
1022
58%
Arabuluculuk
30
27% / 23%
Süresi dolmuş
133
13%
Çalışıyor
23
Geliştirici 23
Derecelendirme
(322)
Projeler
499
67%
Arabuluculuk
5
40% / 0%
Süresi dolmuş
4
1%
Serbest
Yayınlandı: 8 kod
24
Geliştirici 24
Derecelendirme
(2629)
Projeler
3341
67%
Arabuluculuk
77
48% / 14%
Süresi dolmuş
342
10%
Serbest
Yayınlandı: 1 kod
25
Geliştirici 25
Derecelendirme
(511)
Projeler
549
53%
Arabuluculuk
13
69% / 15%
Süresi dolmuş
3
1%
Serbest
26
Geliştirici 26
Derecelendirme
(574)
Projeler
945
47%
Arabuluculuk
309
58% / 27%
Süresi dolmuş
125
13%
Serbest
Benzer siparişler
1. Goal I want a MetaTrader 5 Expert Advisor that trades a simple Supertrend trend‑following idea, but with professional‑grade risk management and filters. It should be robust enough for real money on instruments like XAUUSD and GBP pairs, using small, consistent risk per trade rather than martingale or grid. 2. Strategy Logic Indicators (I will supply the .mq5 files if needed): Supertrend (ATR‑based), with
Hi developers, I need someone to help me create a simple EA with my indicators and trading plan... I will give you all parameters and you help me create... 2 moving averages, one candle pattern
Please a need a very good expert for this jou I want to create 2 robot one a trade manager Perfect — here’s a clean, professional order description you can post directly to an EA freelancer (MQL5). I’ve written it so it’s clear, serious, and attractive to skilled developers 👌 MQL5 Trade Manager EA – Development Request I am looking for an experienced MQL5 developer to build a robust Trade Manager Expert Advisor for
Henryy999 30 - 3000 USD
The Ai robot must help me with forex and I don't have money soon can the Ai robot give me some money and I will pay it back if the Ai robot does a good job making me rich
Project Title: MT5 Algo Trading EA (Single Strategy + License Panel + Ownership + Manual Trade) --- Project Description I am looking for an experienced MT5 (MQL5) developer to create a clean, stable and professional Algo Trading EA for my company and future clients. This is a long-term business project, not a one-time personal EA. --- 1. Strategy Requirements - Only 1 single trading strategy - No martingale - No grid
I am looking for an experienced StrategyQuant X (SQX) developer to build a reusable trading template , not a single strategy. ⚠️ Please do NOT apply unless you actively use StrategyQuant X and have access to it. This project cannot be completed without SQX. 1. Session and Time Filters Trading restricted to fixed GMT sessions per index Sessions must convert correctly to broker server time and remain correct through
Is there someone who coded the PipJuice indicator? Here is the link: https://www.pipjuice.io/ Unfortunately, I don‘t have access to the indicator or the code. If someone have it please send me some screenshots
Strategy Development: Suggest a high-probability trading strategy based on Technical Analysis (using indicators like RSI, MACD, or Price Action). Risk Management: Explain how to calculate position sizing so I don't lose more than 1-2% of my capital per trade. Market Analysis: Teach me how to identify Support and Resistance levels and how to spot a trend reversal. Psychology: Give me 5 golden rules to maintain
A Grid EA with a hedge that open trades on a percentage based on whats is opened on the other side, closes losing trades with current profits made and utilizes a grid trading strategy combined with hedging technique to mitigate risk and potentially lock in profits. It involves placing buy and sell orders at predetermined price intervals, forming a grid. When a trade within the grid moves against the initial
MQL5 Expert Advisor Development (MT5) I need a professional MQL5 developer to create a custom Expert Advisor (EA) for MetaTrader 5 with high accuracy, low drawdown, and fast execution . 🔹 Strategy Requirements: Timeframe: Scalping-friendly (M1 / M5) Indicators Used: EMA 9 EMA 12 EMA 21 VWAP (as a trend filter) RSI (for trade confirmation) 🔹 Trade Logic: Buy and Sell entries based on EMA crossover + VWAP direction

Proje bilgisi

Bütçe
100 - 200 USD
Son teslim tarihi
to 5 gün