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
評価
(295)
プロジェクト
367
30%
仲裁
37
27% / 65%
期限切れ
10
3%
仕事中
パブリッシュした人: 10 codes
2
開発者 2
評価
(111)
プロジェクト
184
25%
仲裁
25
16% / 76%
期限切れ
16
9%
暇
3
開発者 3
評価
(22)
プロジェクト
21
10%
仲裁
4
25% / 75%
期限切れ
0
暇
4
開発者 4
評価
(162)
プロジェクト
210
61%
仲裁
10
80% / 0%
期限切れ
0
仕事中
パブリッシュした人: 1 code
5
開発者 5
評価
(329)
プロジェクト
515
19%
仲裁
35
46% / 31%
期限切れ
34
7%
仕事中
6
開発者 6
評価
(2)
プロジェクト
3
33%
仲裁
3
33% / 33%
期限切れ
0
暇
7
開発者 7
評価
(2354)
プロジェクト
2960
63%
仲裁
125
44% / 26%
期限切れ
429
14%
仕事中
8
開発者 8
評価
(33)
プロジェクト
35
20%
仲裁
5
40% / 40%
期限切れ
0
暇
パブリッシュした人: 1 code
9
開発者 9
評価
(330)
プロジェクト
335
72%
仲裁
2
100% / 0%
期限切れ
0
暇
パブリッシュした人: 1 code
10
開発者 10
評価
(1)
プロジェクト
1
0%
仲裁
1
0% / 100%
期限切れ
0
暇
11
開発者 11
評価
(6)
プロジェクト
7
0%
仲裁
2
0% / 100%
期限切れ
0
仕事中
12
開発者 12
評価
(642)
プロジェクト
750
35%
仲裁
50
52% / 38%
期限切れ
14
2%
仕事中
13
開発者 13
評価
(45)
プロジェクト
46
24%
仲裁
34
9% / 85%
期限切れ
10
22%
暇
14
開発者 14
評価
プロジェクト
0
0%
仲裁
1
0% / 0%
期限切れ
0
仕事中
パブリッシュした人: 2 codes
15
開発者 15
評価
(438)
プロジェクト
651
53%
仲裁
35
63% / 20%
期限切れ
7
1%
仕事中
16
開発者 16
評価
(5)
プロジェクト
8
13%
仲裁
3
0% / 33%
期限切れ
2
25%
暇
パブリッシュした人: 1 code
17
開発者 17
評価
(372)
プロジェクト
463
56%
仲裁
24
58% / 17%
期限切れ
32
7%
仕事中
18
開発者 18
評価
(60)
プロジェクト
96
43%
仲裁
4
0% / 100%
期限切れ
4
4%
暇
19
開発者 19
評価
(162)
プロジェクト
289
35%
仲裁
18
22% / 61%
期限切れ
43
15%
暇
20
開発者 20
評価
(8)
プロジェクト
9
56%
仲裁
0
期限切れ
0
暇
21
開発者 21
評価
(619)
プロジェクト
1430
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 codes
24
開発者 24
評価
(2679)
プロジェクト
3430
68%
仲裁
78
49% / 14%
期限切れ
343
10%
仕事中
パブリッシュした人: 1 code
25
開発者 25
評価
(515)
プロジェクト
554
53%
仲裁
13
69% / 15%
期限切れ
3
1%
暇
26
開発者 26
評価
(574)
プロジェクト
945
47%
仲裁
309
58% / 27%
期限切れ
125
13%
暇
類似した注文
PROJECT: ADVANCED MT4/MT5 EA OPTIMIZATION – AUTOMATED TRADING, DYNAMIC PROFIT LOCKING, AUTO LOT & PROFESSIONAL RISK MANAGEMENT Hello Developer, I already have an existing Expert Advisor (EA) for MetaTrader 4/5. It is currently running, but I need an experienced MQL4/MQL5 developer to fix its problems and improve its trading performance, execution, risk management, and reliability. I want to preserve the original
I want an advanced automated Expert Advisor (EA) trading robot developed for MetaTrader 5 (MT5), compatible with Exness trading accounts. The robot should have the following features: 1. AUTOMATED TRADING - Automatically execute BUY and SELL trades. - Identify strong trading opportunities. - Analyse market trends before entering trades. - Operate without requiring manual trade execution. 2. ADVANCED MARKET ANALYSIS -
Can you do a 5 year back test on /6e (fx euro). using 30 minute chart. Buy to open if macd histogram is above 0 line, or sell to open if macd histogram is below 0 line at 7:30 pm eastern standard time. Close position at 7:30 am next morning. Trade stays open for the entire 12 hour time. thanks, regarding backtest, forgot to mention $300 stop loss, and $500 take profit. Thank you
Hi! I have a general strategy concept, but I would like you to help develop and define the exact trading rules. The planned strategy is: * Instrument: MNQ futures * Platform: NinjaTrader 8 * M30 timeframe for identifying the main trend * M5 timeframe for trade entries * RSI and MACD indicators * Support and resistance levels * Fully automated entries and exits * Automatic Stop Loss, Take Profit and Trailing Stop *
Gold liquidity expert 40 - 60 USD
#property strict #property version "1.00" #property description "XAUUSD Liquidity Sweep + Fibonacci Extension EA" #include <Trade/Trade.mqh> CTrade trade; //==================== INPUT SETTINGS ==================== input group "01. Strategy" input ENUM_TIMEFRAMES SignalTimeframe = PERIOD_CURRENT; input double SL_Buffer_Points = 20; input ulong MagicNumber = 20261122; input group "02. Fibonacci Extension" input double
Why is it difficult to get notifications from this website. Notifications seems stale, what’s happening? Also I noticed almost 90% of the jobs posted here are from people who aren’t ready for their work to be executed. Is it just me experiencing this or anyone else
Hello, I am an independent developer selling an Expert Advisor (EA) on the MQL5 Market. I am looking for an experienced Forex affiliate marketing company or professional marketer to promote my existing MT5 trading robot to customers worldwide. My proposed partnership offers a 30% commission per verified sale, with the possibility of a long-term collaboration. I would like to know: Do you promote third-party MT5
Robert for life money's cash maximum 16mb the jobs future linuox Trading robots are programs, which operate according to underlying algorithms. An algorithm is a set of actions that need to be performed in response to certain events. For example, the most common task in algo trading is the identification of the "New bar" event . When the event occurs, the robot checks the emergence of trading signals and acts
I would like to commission the development of a custom Expert Advisor (Trading Robot) for MetaTrader 5 (MT5) that replicates the exact logic of the "Custom Range Bar" study from Sierra Chart, renders the range bar levels as an independent background layer on the chart, displays a live/historical performance statistics dashboard, and executes/manages trades automatically based on the rules below. 1. Range Bar
Okay, this is a big one for MT5 traders. Let's do it properly. In Python, the "Merge Tool" usually means 2 things: 1. *Merge MT5 data from different symbols / timeframes into one DataFrame* 2. *Plot it as a clean graph* Here is a complete working setup: *Step 1: Install* pip install MetaTrader5 pandas matplotlib mplfinance *Step 2: Full Code - Get MT5 Data + Merge + Plot* import MetaTrader5 as mt5 import pandas as pd

プロジェクト情報

予算
100 - 200 USD
締め切り
最高 5 日