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
(250)
Progetti
313
28%
Arbitraggio
34
26% / 65%
In ritardo
10
3%
In elaborazione
2
Sviluppatore 2
Valutazioni
(104)
Progetti
167
25%
Arbitraggio
23
9% / 78%
In ritardo
16
10%
In elaborazione
3
Sviluppatore 3
Valutazioni
(22)
Progetti
21
10%
Arbitraggio
4
25% / 75%
In ritardo
0
Gratuito
4
Sviluppatore 4
Valutazioni
(154)
Progetti
193
58%
Arbitraggio
10
80% / 0%
In ritardo
0
Gratuito
Pubblicati: 1 codice
5
Sviluppatore 5
Valutazioni
(326)
Progetti
508
19%
Arbitraggio
33
45% / 30%
In ritardo
34
7%
Caricato
6
Sviluppatore 6
Valutazioni
(2)
Progetti
3
33%
Arbitraggio
3
33% / 33%
In ritardo
0
Gratuito
7
Sviluppatore 7
Valutazioni
(2313)
Progetti
2912
63%
Arbitraggio
122
44% / 25%
In ritardo
429
15%
Gratuito
8
Sviluppatore 8
Valutazioni
(33)
Progetti
35
20%
Arbitraggio
5
40% / 40%
In ritardo
0
Gratuito
Pubblicati: 1 codice
9
Sviluppatore 9
Valutazioni
(304)
Progetti
310
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
(553)
Progetti
640
33%
Arbitraggio
41
41% / 46%
In ritardo
11
2%
Caricato
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
(429)
Progetti
628
54%
Arbitraggio
31
52% / 23%
In ritardo
6
1%
Caricato
16
Sviluppatore 16
Valutazioni
(5)
Progetti
8
13%
Arbitraggio
3
0% / 33%
In ritardo
2
25%
Gratuito
Pubblicati: 1 codice
17
Sviluppatore 17
Valutazioni
(355)
Progetti
426
54%
Arbitraggio
20
55% / 15%
In ritardo
29
7%
Caricato
18
Sviluppatore 18
Valutazioni
(57)
Progetti
89
43%
Arbitraggio
4
0% / 100%
In ritardo
3
3%
In elaborazione
19
Sviluppatore 19
Valutazioni
(160)
Progetti
285
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
(618)
Progetti
1428
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
(2645)
Progetti
3361
68%
Arbitraggio
77
48% / 14%
In ritardo
342
10%
In elaborazione
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
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
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
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
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
Translarion 30+ USD
I need expert. Who translate expert and have trust wallet app. If anyone have inbox me. This is very important. Ok anyone interested so dm me.In the situation translater need very important. First dm me
Helo i need on mt4 candle patten strategy developer, only one entry rule and take profit and stoploss and trailing stoploss and Max profit and Max loss and some inputs, I need complete this job is 1 day, only available developer come to my job
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

Informazioni sul progetto

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