Range Breakout EA with hedge order

MQL5 Experts

Job finished

Execution time 1 day
Feedback from employee
Thank you for your order, I will be glad to continue cooperation!
Feedback from customer
excellent work, delivered before the deadline, exactly according to specification, and made suggestions for further improvement. I can highly recommend this developer.

Specification

Trading Strategy Specification: Range Breakout

Platform: Metatrader 5 (MQL5), 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. Also, a hedge order is placed in case of stop loss. If one order has been hit, the other order is immediately terminated. Also, all orders and positions are terminated in the evening at a given time. The range and price levels of orders should be logged in the journal. 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

endofdaytime

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. Log the high, low, and range in the journal.

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 = maximum range

if Range is lower than minimum range, then set Range = minimum range

Step 2: Trade Entries

Calculate the entry prices by using the range, and a buffer. The buffer is added as extra price distance above the high of the range for the long order and below the low of the range of the short order. Set the orders immediately after the time interval of step 1 is over. First, calculate price levels:

bufferrangeentry = range * 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

  Log the order prices (stop, tp, sl) and bufferrangeentry, and bufferrangeexit. If one of the orders is hit, delete the other open order and immediately place a hedge order as described in the next step.

 

Step 3: Hedge Order

Should a stop loss be 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

 

Log price levels (entry, tp, sl) and direction in the journal.

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 endofdaytime parameter. Log this in the journal.

 

 


Responded

1
Developer 1
Rating
(111)
Projects
184
25%
Arbitration
25
16% / 76%
Overdue
16
9%
Free
2
Developer 2
Rating
(295)
Projects
367
30%
Arbitration
37
27% / 65%
Overdue
10
3%
Working
Published: 10 codes
3
Developer 3
Rating
(22)
Projects
21
10%
Arbitration
4
25% / 75%
Overdue
0
Free
4
Developer 4
Rating
(13)
Projects
20
40%
Arbitration
1
0% / 100%
Overdue
1
5%
Free
5
Developer 5
Rating
(274)
Projects
403
28%
Arbitration
40
40% / 50%
Overdue
1
0%
Free
6
Developer 6
Rating
(2353)
Projects
2959
63%
Arbitration
125
44% / 26%
Overdue
429
14%
Working
7
Developer 7
Rating
(62)
Projects
90
29%
Arbitration
24
13% / 58%
Overdue
7
8%
Working
8
Developer 8
Rating
(5)
Projects
8
13%
Arbitration
3
0% / 33%
Overdue
2
25%
Free
Published: 1 code
9
Developer 9
Rating
(467)
Projects
820
49%
Arbitration
76
21% / 51%
Overdue
143
17%
Working
10
Developer 10
Rating
(52)
Projects
67
43%
Arbitration
8
0% / 100%
Overdue
3
4%
Free
11
Developer 11
Rating
(162)
Projects
289
35%
Arbitration
18
22% / 61%
Overdue
43
15%
Free
12
Developer 12
Rating
(10)
Projects
15
20%
Arbitration
5
40% / 40%
Overdue
1
7%
Free
13
Developer 13
Rating
(106)
Projects
129
25%
Arbitration
25
28% / 56%
Overdue
8
6%
Free
14
Developer 14
Rating
(12)
Projects
12
17%
Arbitration
2
0% / 50%
Overdue
1
8%
Free
15
Developer 15
Rating
(162)
Projects
210
61%
Arbitration
10
80% / 0%
Overdue
0
Free
Published: 1 code
16
Developer 16
Rating
(2678)
Projects
3428
68%
Arbitration
78
49% / 14%
Overdue
343
10%
Free
Published: 1 code
17
Developer 17
Rating
(13)
Projects
20
40%
Arbitration
3
0% / 67%
Overdue
3
15%
Free
18
Developer 18
Rating
(33)
Projects
35
20%
Arbitration
5
40% / 40%
Overdue
0
Free
Published: 1 code
19
Developer 19
Rating
(271)
Projects
553
50%
Arbitration
57
40% / 37%
Overdue
227
41%
Working
20
Developer 20
Rating
(78)
Projects
248
74%
Arbitration
7
100% / 0%
Overdue
1
0%
Free
Published: 2 articles, 1 code
21
Developer 21
Rating
(1931)
Projects
3552
88%
Arbitration
73
40% / 15%
Overdue
268
8%
Free
22
Developer 22
Rating
(298)
Projects
478
40%
Arbitration
105
40% / 24%
Overdue
82
17%
Loaded
Published: 2 codes
Similar orders
Andrew 50 - 200 USD
Hello, I am from Tanzania. I am looking for a professional MQL5 programmer from Tanzania who can help me develop and improve my automated MT5 trading robot. The project is called SMC XAVAGE AI, and it trades XAUUSD (Gold). I would like to discuss the project with you. Are you based in Tanzania? Would it be possible to arrange a meeting or a call? Thank you
Metafix 50 - 200 USD
Here is a professional specification you can send directly to your developer. # Project Requirements Specification: MetaTrader 5 Trading Robot Development ### 1. Project Overview I want to develop an automated Forex trading robot (Expert Advisor) for MetaTrader 5 (MT5). The robot should analyse the financial markets, identify trading opportunities, and execute trades automatically based on predefined strategies. ###
1. Platform: MT4 The EA required is not linked, neither depending on trading strategy nor trading signals nor indicators. 2. Initial order is a pending order (buy stop/ sell stop) and it is created manually. It is open for a specified symbol (pair) at a specified price with a specified S/L 3. Example: buy stop 0.1 lot GBPUSD @ 1.3085 WITH S/L @1.3075 Once target price is reached, pending order will
Overview: Build an MT5 Expert Advisor that receives webhook alerts from TradingView (RayAlgo indicator) across three timeframes ( H1, M5, M1 ) for XAUUSD and executes a dual-position strategy when all three conditions align, including strict FTMO server-request limits and automated pre-market-close trade closures. 1. Webhook Receiver & Multi-Timeframe State Logic: H1 Bias State: Updates to BULLISH or BEARISH upon
I am looking for an experienced trading software developer interested in building a long-term working relationship. Im a professional Trader, Coach and Mentor, I work with traders and Student who require customized trading solutions, including automated trading bots, Expert Advisors, custom indicators, trading strategies and other algorithmic trading tools. I am looking for a technically skilled developer who can
Salman serhal 30 - 100 USD
MT5 ICT XAUUSD Sell-Only Trading Robot with Fibonacci Confirmation I am looking for an experienced MQL5 developer to create a custom Expert Advisor (EA) for MetaTrader 5, specifically for trading Gold (XAUUSD). 1. Trading Strategy The robot must use the ICT trading methodology and focus on SELL trades only. The strategy should include: * Identify important resistance and premium zones. * Use Fibonacci retracement
Objective: I am looking for an experienced MQL5 quantitative developer to code an Expert Advisor (EA) from scratch based on a fully defined, rule-based strategy, and then rigorously validate, optimize, and stress-test it before I deploy it on a live VPS environment. Note: The exact mathematical rules, indicator names, and chart screenshots will be shared privately with shortlisted candidates. Strategy Overview
Hi Team We are looking to commission an Expert Advisor (EA) for MetaTrader 5 (MT5) to trade XAUUSD (Gold) . The EA requires tight risk management with a strict $2.00 Stop Loss and a $3.00 to $5.00 Take Profit target. The goal is to achieve a 60%+ Win Rate . Please propose or implement a strategy algorithm capable of meeting the following performance requirements on XAUUSD tick data: Target Performance: $\ge 60\%$ Win
O Trading Ventures 30 - 2000 USD
a trading bot that can open and close trade by its self a stop loss of 1.2 lot size and good tp it should be able to learn trends and learn from its mistakes
JOB SPECIFICATION: Fully Automated ES/MES 5-Minute NY Opening Range Breakout EA 1. Project objective I am looking for an experienced trading algo developer to build a fully automated trading bot (EA) based on my specific 5-minute New York Opening Range Breakout strategy. The EA must identify setups, confirm breakouts, identify retests, confirm continuation, execute trades, calculate position size, place stop-loss and

Project information

Budget
100 - 200 USD
Deadline
to 3 day(s)