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)
项目
3362
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
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
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
XAUUSD - TREND TRADER 30 - 500 USD
Find a good entry point and enter the trade .after the first profit of 25% is done then exit the trade .find the good market analysis of the trend and know when the market is on a good trend. After that now know the entry point and the take profit of the slot you have opened .have also a risk management strategy
Looking for someone to reverse/decompile my exe file, pls apply if this is something you can do and let me know how long this will take you to do will send the file to you once it’s something you seems to do

项目信息

预算
100 - 200 USD
截止日期
 5 天