Range Breakout EA in MQL5 according to spec

Specifiche

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


Con risposta

1
Sviluppatore 1
Valutazioni
(241)
Progetti
305
28%
Arbitraggio
32
28% / 63%
In ritardo
10
3%
Caricato
2
Sviluppatore 2
Valutazioni
(103)
Progetti
160
22%
Arbitraggio
23
9% / 78%
In ritardo
16
10%
Caricato
3
Sviluppatore 3
Valutazioni
(22)
Progetti
21
10%
Arbitraggio
4
25% / 75%
In ritardo
0
Gratuito
4
Sviluppatore 4
Valutazioni
(152)
Progetti
190
57%
Arbitraggio
10
80% / 0%
In ritardo
0
Gratuito
Pubblicati: 1 codice
5
Sviluppatore 5
Valutazioni
(323)
Progetti
502
19%
Arbitraggio
33
42% / 30%
In ritardo
33
7%
Caricato
6
Sviluppatore 6
Valutazioni
(2)
Progetti
3
33%
Arbitraggio
3
33% / 33%
In ritardo
0
Gratuito
7
Sviluppatore 7
Valutazioni
(2294)
Progetti
2888
63%
Arbitraggio
122
44% / 25%
In ritardo
428
15%
In elaborazione
8
Sviluppatore 8
Valutazioni
(33)
Progetti
35
20%
Arbitraggio
5
40% / 40%
In ritardo
0
Gratuito
Pubblicati: 1 codice
9
Sviluppatore 9
Valutazioni
(302)
Progetti
308
69%
Arbitraggio
2
100% / 0%
In ritardo
0
Gratuito
Pubblicati: 1 codice
10
Sviluppatore 10
Valutazioni
(1)
Progetti
1
0%
Arbitraggio
1
0% / 100%
In ritardo
0
Gratuito
11
Sviluppatore 11
Valutazioni
(6)
Progetti
7
0%
Arbitraggio
2
0% / 100%
In ritardo
0
In elaborazione
12
Sviluppatore 12
Valutazioni
(540)
Progetti
622
33%
Arbitraggio
37
38% / 51%
In ritardo
11
2%
Occupato
13
Sviluppatore 13
Valutazioni
(45)
Progetti
46
24%
Arbitraggio
34
9% / 85%
In ritardo
10
22%
Gratuito
14
Sviluppatore 14
Valutazioni
Progetti
0
0%
Arbitraggio
1
0% / 0%
In ritardo
0
In elaborazione
Pubblicati: 2 codici
15
Sviluppatore 15
Valutazioni
(428)
Progetti
623
54%
Arbitraggio
30
53% / 23%
In ritardo
6
1%
Occupato
16
Sviluppatore 16
Valutazioni
(5)
Progetti
8
13%
Arbitraggio
3
0% / 33%
In ritardo
2
25%
Gratuito
Pubblicati: 1 codice
17
Sviluppatore 17
Valutazioni
(333)
Progetti
401
52%
Arbitraggio
20
55% / 15%
In ritardo
29
7%
Occupato
18
Sviluppatore 18
Valutazioni
(57)
Progetti
89
43%
Arbitraggio
4
0% / 100%
In ritardo
3
3%
In elaborazione
19
Sviluppatore 19
Valutazioni
(159)
Progetti
284
35%
Arbitraggio
18
22% / 61%
In ritardo
42
15%
Caricato
20
Sviluppatore 20
Valutazioni
(8)
Progetti
9
56%
Arbitraggio
0
In ritardo
0
Gratuito
21
Sviluppatore 21
Valutazioni
(617)
Progetti
1427
59%
Arbitraggio
31
81% / 0%
In ritardo
10
1%
Gratuito
22
Sviluppatore 22
Valutazioni
(493)
Progetti
1022
58%
Arbitraggio
30
27% / 23%
In ritardo
133
13%
In elaborazione
23
Sviluppatore 23
Valutazioni
(322)
Progetti
499
67%
Arbitraggio
5
40% / 0%
In ritardo
4
1%
Gratuito
Pubblicati: 8 codici
24
Sviluppatore 24
Valutazioni
(2629)
Progetti
3341
67%
Arbitraggio
77
48% / 14%
In ritardo
342
10%
Gratuito
Pubblicati: 1 codice
25
Sviluppatore 25
Valutazioni
(511)
Progetti
549
53%
Arbitraggio
13
69% / 15%
In ritardo
3
1%
Gratuito
26
Sviluppatore 26
Valutazioni
(574)
Progetti
945
47%
Arbitraggio
309
58% / 27%
In ritardo
125
13%
Gratuito
Ordini simili
step by step and structure this into a full IEEE 830 / ISO/IEC/IEEE 29148 style Requirements Specification. This format will include: Introduction System Overview Functional and Performance Requirements Traceability Matrix (linking requirements to test cases) Verification and Validation Compliance Standards 1. Introduction 1.1 Purpose The purpose of this document is to define the technical requirements for the
i need an expert to help join 3 model i have in ninjatrader into one, kindly message me and i will be expecting from you and i need this work done in maximum of 4 days, so i need expert that can get it done
I want an EA that work with my support and resistance indicator. Buy entry condition are: 1. hen candlestick closes in side the support bar. 2. When candlestick break above resistance bar. Likewise sell condition: 1. When candlestick closes inside the resistance bar, 2. When candlestick break below support bar
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

Informazioni sul progetto

Budget
100 - 200 USD
Scadenze
a 5 giorno(i)