Time & Range Based Pending Order EA – Specification

MQL5 Эксперты

Работа завершена

Время выполнения 5 минут
Отзыв от заказчика
The developer was highly professional and efficient throughout the project. His availability and dedication to delivering quality work were impressive. Overall, a great experience

Техническое задание

Time & Range Based Pending Order EA – Specification

The EA is purely time-based and range-based.

It should work on any timeframe chart (M1 recommended), but all logic is based on broker server time.

Trading Session

First pending order of the day is at 02:00 server time.

Then every 30 minutes a new set of pending orders is created: 02:00, 02:30, 03:00, 03:30, … up to 21:30.

After 21:30 no new orders are created; the next cycle starts the following day.

Range Definition

For each slot time T (e.g. 02:00, 02:30, 03:00, …):

Define a 1-hour lookback range:

range_start = T - 60 minutes

range_end = T

Use all candles between range_start and range_end (inclusive of the last bar before/at T).

Calculate:

RangeHigh = highest high in this interval

RangeLow = lowest low in this interval

Order Placement at Each Slot

Exactly at time T the EA places two pending orders:

Buy Stop at RangeHigh

Sell Stop at RangeLow

Both orders:

Same lot size (from input)

Same SL and TP distance (from input)

With a unique Magic Number (from input) so the EA only manages its own orders.

Must respect a MaxSpread filter (from input); if spread is above MaxSpread at time T, skip that slot.

Order Expiration

Each pair of pending orders must have an expiry time:

expire_time = T + 55 minutes

If neither pending order is triggered before expire_time, both are automatically deleted or expire.

Example:

Slot 02:00 → Range 01:00–02:00 → orders expire at 02:55.

Slot 02:30 → Range 01:30–02:30 → orders expire at 03:25.

Slot 03:00 → Range 02:00–03:00 → orders expire at 03:55, and so on.

Overlap

It is allowed for multiple sets of pending orders to be active at the same time (e.g. 02:00 and 02:30 slots overlapping).

Each order should have a Comment or Magic-based identifier so we know which slot it belongs to (optional but useful).



Optional: allowed trading days (e.g. Monday–Friday only).

Notes

Open trades are managed only by their SL and TP (no forced daily close unless we add another input later).

EA must avoid placing duplicate orders for the same slot time T (e.g. use a global/static variable or check existing orders by Comment / Magic).

Please make each of the 39 time-slots individually configurable using input bool UseTrade1..UseTrade39 and separate time parameters (RangeStartN, EntryHourN, EntryMinuteN, ExpireTimeN). If UseTradeN == false, the EA should completely skip that slot and never calculate its range or place its pending orders.

input

datetime LicenseTime      = D'31.12.2024 23:59'; 
  int Account_Number        = 0;
  string EAComment          = "Breakout Strategy";  
input int    MN                 = 1;      // Magic
input double Lot                = 0.01;   // Lot
input double MaxSpread          = 10;     // Max. Spread        
input int    Slippage           = 1;      // Slippage
input string TrailingStopLoss   = ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>";// Trailing Stop Settings ...............................................
input bool   UseTrailingStop    = 0;      // Use Trailing 
input double TrailingStart     = 15;     // Trailing Start 
input double TrailingStop       = 10;     // Trailing Distance

//--- Trade 1 settings
input bool   UseTrade1        = true;      // Enable/Disable Trade 1
input string RangeStart1      = "01:00";   // Range start time (HH:MM)
input int    EntryHour1       = 2;         // Entry hour
input int    EntryMinute1     = 0;         // Entry minute
input string ExpireTime1      = "02:55";   // Expiry time (HH:MM)

//--- Trade 2 settings
input bool   UseTrade2        = true;      // Enable/Disable Trade 2
input string RangeStart2      = "01:30";   // Range start time (HH:MM)
input int    EntryHour2       = 2;         // Entry hour
input int    EntryMinute2     = 30;        // Entry minute
input string ExpireTime2      = "03:25";   // Expiry time (HH:MM)

//--- Trade 3 settings
input bool   UseTrade3        = true;      // Enable/Disable Trade 3
input string RangeStart3      = "02:00";   // Range start time (HH:MM)
input int    EntryHour3       = 3;         // Entry hour
input int    EntryMinute3     = 0;         // Entry minute
input string ExpireTime3      = "03:55";   // Expiry time (HH:MM)

//--- Trade 4 settings
input bool   UseTrade4        = true;      // Enable/Disable Trade 4
input string RangeStart4      = "02:30";   // Range start time (HH:MM)
input int    EntryHour4       = 3;         // Entry hour
input int    EntryMinute4     = 30;        // Entry minute
input string ExpireTime4      = "04:25";   // Expiry time (HH:MM)

//--- Trade 5 settings
input bool   UseTrade5        = true;      // Enable/Disable Trade 5
input string RangeStart5      = "03:00";   // Range start time (HH:MM)
input int    EntryHour5       = 4;         // Entry hour
input int    EntryMinute5     = 0;         // Entry minute
input string ExpireTime5      = "04:55";   // Expiry time (HH:MM)

//--- Trade 6 settings
input bool   UseTrade6        = true;      // Enable/Disable Trade 6
input string RangeStart6      = "03:30";   // Range start time (HH:MM)
input int    EntryHour6       = 4;         // Entry hour
input int    EntryMinute6     = 30;        // Entry minute
input string ExpireTime6      = "05:25";   // Expiry time (HH:MM)

//--- Trade 7 settings
input bool   UseTrade7        = true;      // Enable/Disable Trade 7
input string RangeStart7      = "04:00";   // Range start time (HH:MM)
input int    EntryHour7       = 5;         // Entry hour
input int    EntryMinute7     = 0;         // Entry minute
input string ExpireTime7      = "05:55";   // Expiry time (HH:MM)

//--- Trade 8 settings
input bool   UseTrade8        = true;      // Enable/Disable Trade 8
input string RangeStart8      = "04:30";   // Range start time (HH:MM)
input int    EntryHour8       = 5;         // Entry hour
input int    EntryMinute8     = 30;        // Entry minute
input string ExpireTime8      = "06:25";   // Expiry time (HH:MM)

//--- Trade 9 settings
input bool   UseTrade9        = true;      // Enable/Disable Trade 9
input string RangeStart9      = "05:00";   // Range start time (HH:MM)
input int    EntryHour9       = 6;         // Entry hour
input int    EntryMinute9     = 0;         // Entry minute
input string ExpireTime9      = "06:55";   // Expiry time (HH:MM)

//--- Trade 10 settings
input bool   UseTrade10       = true;      // Enable/Disable Trade 10
input string RangeStart10     = "05:30";   // Range start time (HH:MM)
input int    EntryHour10      = 6;         // Entry hour
input int    EntryMinute10    = 30;        // Entry minute
input string ExpireTime10     = "07:25";   // Expiry time (HH:MM)

//--- Trade 11 settings
input bool   UseTrade11       = true;      // Enable/Disable Trade 11
input string RangeStart11     = "06:00";   // Range start time (HH:MM)
input int    EntryHour11      = 7;         // Entry hour
input int    EntryMinute11    = 0;         // Entry minute
input string ExpireTime11     = "07:55";   // Expiry time (HH:MM)

//--- Trade 12 settings
input bool   UseTrade12       = true;      // Enable/Disable Trade 12
input string RangeStart12     = "06:30";   // Range start time (HH:MM)
input int    EntryHour12      = 7;         // Entry hour
input int    EntryMinute12    = 30;        // Entry minute
input string ExpireTime12     = "08:25";   // Expiry time (HH:MM)

//--- Trade 13 settings
input bool   UseTrade13       = true;      // Enable/Disable Trade 13
input string RangeStart13     = "07:00";   // Range start time (HH:MM)
input int    EntryHour13      = 8;         // Entry hour
input int    EntryMinute13    = 0;         // Entry minute
input string ExpireTime13     = "08:55";   // Expiry time (HH:MM)

//--- Trade 14 settings
input bool   UseTrade14       = true;      // Enable/Disable Trade 14
input string RangeStart14     = "07:30";   // Range start time (HH:MM)
input int    EntryHour14      = 8;         // Entry hour
input int    EntryMinute14    = 30;        // Entry minute
input string ExpireTime14     = "09:25";   // Expiry time (HH:MM)

//--- Trade 15 settings
input bool   UseTrade15       = true;      // Enable/Disable Trade 15
input string RangeStart15     = "08:00";   // Range start time (HH:MM)
input int    EntryHour15      = 9;         // Entry hour
input int    EntryMinute15    = 0;         // Entry minute
input string ExpireTime15     = "09:55";   // Expiry time (HH:MM)

//--- Trade 16 settings
input bool   UseTrade16       = true;      // Enable/Disable Trade 16
input string RangeStart16     = "08:30";   // Range start time (HH:MM)
input int    EntryHour16      = 9;         // Entry hour
input int    EntryMinute16    = 30;        // Entry minute
input string ExpireTime16     = "10:25";   // Expiry time (HH:MM)

//--- Trade 17 settings
input bool   UseTrade17       = true;      // Enable/Disable Trade 17
input string RangeStart17     = "09:00";   // Range start time (HH:MM)
input int    EntryHour17      = 10;        // Entry hour
input int    EntryMinute17    = 0;         // Entry minute
input string ExpireTime17     = "10:55";   // Expiry time (HH:MM)

//--- Trade 18 settings
input bool   UseTrade18       = true;      // Enable/Disable Trade 18
input string RangeStart18     = "09:30";   // Range start time (HH:MM)
input int    EntryHour18      = 10;        // Entry hour
input int    EntryMinute18    = 30;        // Entry minute
input string ExpireTime18     = "11:25";   // Expiry time (HH:MM)

//--- Trade 19 settings
input bool   UseTrade19       = true;      // Enable/Disable Trade 19
input string RangeStart19     = "10:00";   // Range start time (HH:MM)
input int    EntryHour19      = 11;        // Entry hour
input int    EntryMinute19    = 0;         // Entry minute
input string ExpireTime19     = "11:55";   // Expiry time (HH:MM)

//--- Trade 20 settings
input bool   UseTrade20       = true;      // Enable/Disable Trade 20
input string RangeStart20     = "10:30";   // Range start time (HH:MM)
input int    EntryHour20      = 11;        // Entry hour
input int    EntryMinute20    = 30;        // Entry minute
input string ExpireTime20     = "12:25";   // Expiry time (HH:MM)

//--- Trade 21 settings
input bool   UseTrade21       = true;      // Enable/Disable Trade 21
input string RangeStart21     = "11:00";   // Range start time (HH:MM)
input int    EntryHour21      = 12;        // Entry hour
input int    EntryMinute21    = 0;         // Entry minute
input string ExpireTime21     = "12:55";   // Expiry time (HH:MM)

//--- Trade 22 settings
input bool   UseTrade22       = true;      // Enable/Disable Trade 22
input string RangeStart22     = "11:30";   // Range start time (HH:MM)
input int    EntryHour22      = 12;        // Entry hour
input int    EntryMinute22    = 30;        // Entry minute
input string ExpireTime22     = "13:25";   // Expiry time (HH:MM)

//--- Trade 23 settings
input bool   UseTrade23       = true;      // Enable/Disable Trade 23
input string RangeStart23     = "12:00";   // Range start time (HH:MM)
input int    EntryHour23      = 13;        // Entry hour
input int    EntryMinute23    = 0;         // Entry minute
input string ExpireTime23     = "13:55";   // Expiry time (HH:MM)

//--- Trade 24 settings
input bool   UseTrade24       = true;      // Enable/Disable Trade 24
input string RangeStart24     = "12:30";   // Range start time (HH:MM)
input int    EntryHour24      = 13;        // Entry hour
input int    EntryMinute24    = 30;        // Entry minute
input string ExpireTime24     = "14:25";   // Expiry time (HH:MM)

//--- Trade 25 settings
input bool   UseTrade25       = true;      // Enable/Disable Trade 25
input string RangeStart25     = "13:00";   // Range start time (HH:MM)
input int    EntryHour25      = 14;        // Entry hour
input int    EntryMinute25    = 0;         // Entry minute
input string ExpireTime25     = "14:55";   // Expiry time (HH:MM)

//--- Trade 26 settings
input bool   UseTrade26       = true;      // Enable/Disable Trade 26
input string RangeStart26     = "13:30";   // Range start time (HH:MM)
input int    EntryHour26      = 14;        // Entry hour
input int    EntryMinute26    = 30;        // Entry minute
input string ExpireTime26     = "15:25";   // Expiry time (HH:MM)

//--- Trade 27 settings
input bool   UseTrade27       = true;      // Enable/Disable Trade 27
input string RangeStart27     = "14:00";   // Range start time (HH:MM)
input int    EntryHour27      = 15;        // Entry hour
input int    EntryMinute27    = 0;         // Entry minute
input string ExpireTime27     = "15:55";   // Expiry time (HH:MM)

//--- Trade 28 settings
input bool   UseTrade28       = true;      // Enable/Disable Trade 28
input string RangeStart28     = "14:30";   // Range start time (HH:MM)
input int    EntryHour28      = 15;        // Entry hour
input int    EntryMinute28    = 30;        // Entry minute
input string ExpireTime28     = "16:25";   // Expiry time (HH:MM)

//--- Trade 29 settings
input bool   UseTrade29       = true;      // Enable/Disable Trade 29
input string RangeStart29     = "15:00";   // Range start time (HH:MM)
input int    EntryHour29      = 16;        // Entry hour
input int    EntryMinute29    = 0;         // Entry minute
input string ExpireTime29     = "16:55";   // Expiry time (HH:MM)

//--- Trade 30 settings
input bool   UseTrade30       = true;      // Enable/Disable Trade 30
input string RangeStart30     = "15:30";   // Range start time (HH:MM)
input int    EntryHour30      = 16;        // Entry hour
input int    EntryMinute30    = 30;        // Entry minute
input string ExpireTime30     = "17:25";   // Expiry time (HH:MM)

//--- Trade 31 settings
input bool   UseTrade31       = true;      // Enable/Disable Trade 31
input string RangeStart31     = "16:00";   // Range start time (HH:MM)
input int    EntryHour31      = 17;        // Entry hour
input int    EntryMinute31    = 0;         // Entry minute
input string ExpireTime31     = "17:55";   // Expiry time (HH:MM)

//--- Trade 32 settings
input bool   UseTrade32       = true;      // Enable/Disable Trade 32
input string RangeStart32     = "16:30";   // Range start time (HH:MM)
input int    EntryHour32      = 17;        // Entry hour
input int    EntryMinute32    = 30;        // Entry minute
input string ExpireTime32     = "18:25";   // Expiry time (HH:MM)

//--- Trade 33 settings
input bool   UseTrade33       = true;      // Enable/Disable Trade 33
input string RangeStart33     = "17:00";   // Range start time (HH:MM)
input int    EntryHour33      = 18;        // Entry hour
input int    EntryMinute33    = 0;         // Entry minute
input string ExpireTime33     = "18:55";   // Expiry time (HH:MM)

//--- Trade 34 settings
input bool   UseTrade34       = true;      // Enable/Disable Trade 34
input string RangeStart34     = "17:30";   // Range start time (HH:MM)
input int    EntryHour34      = 18;        // Entry hour
input int    EntryMinute34    = 30;        // Entry minute
input string ExpireTime34     = "19:25";   // Expiry time (HH:MM)

//--- Trade 35 settings
input bool   UseTrade35       = true;      // Enable/Disable Trade 35
input string RangeStart35     = "18:00";   // Range start time (HH:MM)
input int    EntryHour35      = 19;        // Entry hour
input int    EntryMinute35    = 0;         // Entry minute
input string ExpireTime35     = "19:55";   // Expiry time (HH:MM)

//--- Trade 36 settings
input bool   UseTrade36       = true;      // Enable/Disable Trade 36
input string RangeStart36     = "18:30";   // Range start time (HH:MM)
input int    EntryHour36      = 19;        // Entry hour
input int    EntryMinute36    = 30;        // Entry minute
input string ExpireTime36     = "20:25";   // Expiry time (HH:MM)

//--- Trade 37 settings
input bool   UseTrade37       = true;      // Enable/Disable Trade 37
input string RangeStart37     = "19:00";   // Range start time (HH:MM)
input int    EntryHour37      = 20;        // Entry hour
input int    EntryMinute37    = 0;         // Entry minute
input string ExpireTime37     = "20:55";   // Expiry time (HH:MM)

//--- Trade 38 settings
input bool   UseTrade38       = true;      // Enable/Disable Trade 38
input string RangeStart38     = "19:30";   // Range start time (HH:MM)
input int    EntryHour38      = 20;        // Entry hour
input int    EntryMinute38    = 30;        // Entry minute
input string ExpireTime38     = "21:25";   // Expiry time (HH:MM)

//--- Trade 39 settings
input bool   UseTrade39       = true;      // Enable/Disable Trade 39
input string RangeStart39     = "20:00";   // Range start time (HH:MM)
input int    EntryHour39      = 21;        // Entry hour
input int    EntryMinute39    = 0;         // Entry minute
input string ExpireTime39     = "21:55";   // Expiry time (HH:MM)


Откликнулись

1
Разработчик 1
Оценка
(16)
Проекты
20
15%
Арбитраж
5
40% / 40%
Просрочено
0
Свободен
2
Разработчик 2
Оценка
(62)
Проекты
90
29%
Арбитраж
24
13% / 58%
Просрочено
7
8%
Работает
3
Разработчик 3
Оценка
(635)
Проекты
1005
47%
Арбитраж
33
36% / 36%
Просрочено
99
10%
Работает
Опубликовал: 6 примеров
4
Разработчик 4
Оценка
(328)
Проекты
514
19%
Арбитраж
35
46% / 31%
Просрочено
34
7%
Работает
5
Разработчик 5
Оценка
(434)
Проекты
640
53%
Арбитраж
34
62% / 21%
Просрочено
6
1%
Работает
6
Разработчик 6
Оценка
(217)
Проекты
369
33%
Арбитраж
34
41% / 29%
Просрочено
108
29%
Свободен
Опубликовал: 1 пример
7
Разработчик 7
Оценка
Проекты
0
0%
Арбитраж
0
Просрочено
0
Свободен
8
Разработчик 8
Оценка
(169)
Проекты
180
46%
Арбитраж
3
33% / 33%
Просрочено
1
1%
Работает
9
Разработчик 9
Оценка
(108)
Проекты
179
25%
Арбитраж
24
17% / 75%
Просрочено
16
9%
Свободен
10
Разработчик 10
Оценка
(4)
Проекты
5
40%
Арбитраж
1
0% / 0%
Просрочено
0
Свободен
11
Разработчик 11
Оценка
Проекты
2
0%
Арбитраж
4
25% / 50%
Просрочено
1
50%
Свободен
12
Разработчик 12
Оценка
(12)
Проекты
9
33%
Арбитраж
11
0% / 100%
Просрочено
2
22%
Свободен
13
Разработчик 13
Оценка
(81)
Проекты
142
53%
Арбитраж
5
80% / 0%
Просрочено
6
4%
Свободен
14
Разработчик 14
Оценка
(17)
Проекты
21
14%
Арбитраж
8
38% / 38%
Просрочено
3
14%
Загружен
15
Разработчик 15
Оценка
(59)
Проекты
91
43%
Арбитраж
4
0% / 100%
Просрочено
3
3%
Работает
16
Разработчик 16
Оценка
(163)
Проекты
236
32%
Арбитраж
30
27% / 30%
Просрочено
26
11%
Свободен
17
Разработчик 17
Оценка
(645)
Проекты
872
48%
Арбитраж
29
38% / 17%
Просрочено
63
7%
Свободен
18
Разработчик 18
Оценка
(510)
Проекты
977
74%
Арбитраж
27
19% / 67%
Просрочено
100
10%
Свободен
Опубликовал: 1 статью, 6 примеров
19
Разработчик 19
Оценка
(162)
Проекты
289
35%
Арбитраж
18
22% / 61%
Просрочено
43
15%
Свободен
20
Разработчик 20
Оценка
(298)
Проекты
478
40%
Арбитраж
105
40% / 24%
Просрочено
82
17%
Загружен
Опубликовал: 2 примера
21
Разработчик 21
Оценка
(78)
Проекты
246
74%
Арбитраж
7
100% / 0%
Просрочено
1
0%
Свободен
Опубликовал: 1 статью
22
Разработчик 22
Оценка
(13)
Проекты
22
41%
Арбитраж
8
0% / 50%
Просрочено
3
14%
Свободен
23
Разработчик 23
Оценка
(202)
Проекты
263
22%
Арбитраж
23
52% / 17%
Просрочено
0
Загружен
24
Разработчик 24
Оценка
(7)
Проекты
6
0%
Арбитраж
4
25% / 75%
Просрочено
2
33%
Свободен
25
Разработчик 25
Оценка
(4)
Проекты
5
20%
Арбитраж
1
100% / 0%
Просрочено
0
Свободен
26
Разработчик 26
Оценка
(64)
Проекты
144
46%
Арбитраж
20
40% / 20%
Просрочено
32
22%
Свободен
27
Разработчик 27
Оценка
(271)
Проекты
553
50%
Арбитраж
57
40% / 37%
Просрочено
227
41%
Работает
28
Разработчик 28
Оценка
(574)
Проекты
945
47%
Арбитраж
309
58% / 27%
Просрочено
125
13%
Свободен
29
Разработчик 29
Оценка
Проекты
1
100%
Арбитраж
0
Просрочено
0
Свободен
Похожие заказы
Online Ordering System para sa Milk Tea Shop* *1. Layunin ng Project* Gumawa ng website at mobile app kung saan makaka-order ang mga customer ng milk tea online. Para hindi na pumila at para mas madali i-track yung mga orders. *2. Mga Kailangan / Features* - *Para sa Customer:* - Mag-register at mag-login gamit ang email at number - Makita ang menu na may picture, presyo, at description - Makapag-customize ng
Hi there developer, I need someone who can create an trading ea that place order in points using an. Vps with an stop loss in 2 point behind the order price automatically it close order in 1 point if the market reverse
I am looking for a highly experienced developer to build a professional, commercial-grade trading indicator for MT4/MT5. I am not looking for a basic indicator or a modified public script. I need a custom solution based on real market logic with high-quality coding standards. Requirements 100% Non-Repainting indicator. Accurate Entry signals. Automatic Stop Loss placement based on real market structure. Automatic
I need a custom MT5 Expert Advisor (MQL5) for XAUUSD. Strategy: 1. Trend Filter (H1) - EMA 20, EMA 50 and EMA 200. - Buy only when EMA20 > EMA50 > EMA200 and price is above EMA200. - Sell only when EMA20 < EMA50 < EMA200 and price is below EMA200. 2. Confirmation (M15) - M15 trend must confirm the H1 trend before taking any trade. 3. Entry (M5) - Wait for price to pull back to EMA20 only. - After touching EMA20, wait
Mac200 50+ USD
I need a Trend following Bot. Here we took entries by looking at two indicator which are 200 period ema and 12 26 9 MacD. Rules for entry exit are: Buy trade: When market is above 200 ema and MacD Line cross over the signal line and this cross over happened below the zero line of MacD indicator. We simply put Buy trade. Sell trade: When market is below 200 ema and MacD line crosses below the signal line and this
I I would like to create a trading robot based on 2 ema crossing. The robot is pretty simple, it should open buy position when fast ema cross slow ema and vise versa. Also it should use martingale after the loss position. It should has expiration period inside the code and alerts l
Iconic Boy 300 - 400 USD
Am looking for a bot to trade .so that I can be able to trade and become very successful and make some profit so that I cannot sleep on a empty stomach
MT5 Global Stop Loss & Take Profit Manager for Manual Trades I need an Expert Advisor (EA) for MetaTrader 5 that manages ONLY existing manual trades. GENERAL REQUIREMENTS - Works only on the current chart symbol (example: XAUUSD). - Supports Hedging accounts. - Detects all manually opened market positions. - Never opens trades automatically. - Never closes trades automatically. - Never places pending orders. - Never
Supply and Demand EA 50 - 250 USD
I need a SnD EA. Prefer coder who has previous experience coding SnD EA. PO are based on (CHoCH or BoS) and 3EMA, order block (from my TradingView indicator), area based on Fibonacci. SL options are based on fix pips or zone size; CL is based on candle closing. TP1 and TP2 options are based on fix pips or fix ratio. Canceling PO is based on market structure or Fibonacci. Money management are based on fix volume or
Hi MQL5 Community, With over 10 years of live market experience as a Quantitative & Trading System Developer, I specialize in building robust, highly scalable Expert Advisors (EAs), custom indicators, and automated architectures. I’ve recently put together a comprehensive showcase demonstrating my flagship Modular Multi-Engine Architecture , designed to bring institutional-grade logic and real-time telemetry into

Информация о проекте

Бюджет
30+ USD