Robust MT5 Supertrend Trend‑Following EA With Full Risk Management (Including Breakeven)

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

1. Goal

I want a MetaTrader 5 Expert Advisor that trades a simple Supertrend trend‑following idea, but with professional‑grade risk management and filters. It should be robust enough for real money on instruments like XAUUSD and GBP pairs, using small, consistent risk per trade rather than martingale or grid.

2. Strategy Logic

Indicators (I will supply the .mq5 files if needed):

  • Supertrend (ATR‑based), with adjustable:

    • ATR period

    • ATR multiplier

  • Optional DEMA (trend filter), with adjustable period.

Signal and trend rules:

  • Use closed candles only (no intra‑bar decisions).

  • On each new bar:

    • Read Supertrend direction on bar 1 (just closed) and bar 2 (previous).

    • Direction = +1 (uptrend) or −1 (downtrend).

  • Entry:

    • If direction flips from −1 to +1 and trend filter allows longs → open buy.

    • If direction flips from +1 to −1 and trend filter allows shorts → open sell.

  • Trend filter:

    • Input  Use_DEMA_Filter  (true/false).

    • If true:

      • Only buy if price is above DEMA (and optionally DEMA is flat or rising).

      • Only sell if price is below DEMA (and optionally DEMA is flat or falling).

    • If false:

      • Ignore DEMA and trade purely on Supertrend.

Position logic:

  • Only one position per symbol per magic number.

  • Input  Reverse_On_Signal :

    • If true: on opposite signal, close existing trade and immediately open in the new direction.

    • If false: on opposite signal, close trade only (no immediate reverse).


3. Risk Management (non‑negotiable)

3.1 Lot sizing

  • Use_Risk_Percent  (true/false).

  • If false → use fixed lot  Lots .

  • If true → calculate lot size from  Risk_Percent_Per_Trade  (e.g. 0.5–2%) based on distance from entry to initial SL, using standard percentage‑risk money management.

3.2 Stop loss / take profit

  • The EA must always be able to run with a real stop‑loss. No martingale, no grid, no averaging down or “recovery” systems.

  • SL modes (selectable input  SL_Mode ):

    • 1 = fixed SL in points.

    • 2 = SL at or just beyond the Supertrend line at entry.

    • 3 = ATR‑based SL (multiple of ATR).

  • TP modes ( TP_Mode ):

    • 0 = no hard TP (exit via opposite signal or trailing).

    • 1 = fixed TP in points.

    • 2 = RR multiple (e.g. 2R, 3R) based on initial SL.

3.3 Breakeven rule (10‑pip to entry)

Implement a breakeven mechanism:

  • Inputs:

    • Use_Breakeven  (true/false)

    • Breakeven_Trigger_Points  (default value 100 points on 5‑digit quotes = 10 pips; I can adjust later)

Behaviour:

  • When  Use_Breakeven = true , once the trade is in profit by at least  Breakeven_Trigger_Points , move the stop loss to exact entry price (no extra buffer).

  • This should happen once per trade; after SL is moved to breakeven, do not move it back even if price retraces.

3.4 Trailing stop

  • Option  Use_ST_Trailing :

    • If enabled, trail SL on each new bar using the current Supertrend value in favour of the trade, never loosening it.

  • Optional standard trailing stop:

    • Inputs like  Use_Classic_Trailing ,  Classic_Trail_Start ,  Classic_Trail_Step .

  • Trailing should co‑exist logically with the breakeven rule (i.e. breakeven first, then trailing can continue to move SL further into profit).

3.5 Session & filter controls

  • Use_Session_Filter  (true/false).

  • Inputs for at least one session window:

    • Session_Start_Hour ,  Session_End_Hour  (server time).

    • Optional second window:  Session2_Start_Hour ,  Session2_End_Hour .

  • Rules:

    • No new trades outside permitted hours.

    • EA should still manage existing trades (breakeven, trailing, exits) outside session unless an input  Close_Outside_Session  is set true.

  • Day‑of‑week switches (Mon–Fri on/off).

3.6 Spread / slippage / safety

  • Max_Spread_Points  – block new trades if current spread exceeds this.

  • Slippage  – maximum allowed slippage for market orders.

  • Optional equity protection:

    • Daily_Max_Loss_Percent  and/or  Overall_Max_Loss_Percent .

    • When hit, EA must stop opening new trades for that day (or until reset), with a clear comment/log message.


4. Inputs Summary (minimum)

  • General:

    • Lots ,  Use_Risk_Percent ,  Risk_Percent_Per_Trade ,  Magic_Number ,  Trade_Comment .

  • Supertrend:

    • ST_ATR_Period ,  ST_ATR_Multiplier .

  • DEMA:

    • Use_DEMA_Filter ,  DEMA_Period .

  • Risk:

    • SL_Mode ,  SL_Fixed_Points ,  SL_ATR_Multiplier .

    • TP_Mode ,  TP_Fixed_Points ,  TP_R_Multiple .

    • Use_ST_Trailing ,  Use_Classic_Trailing ,  Classic_Trail_Start ,  Classic_Trail_Step .

    • Use_Breakeven ,  Breakeven_Trigger_Points  (default 100 points ≈ 10 pips).

    • Max_Spread_Points ,  Slippage .

    • Optional:  Daily_Max_Loss_Percent ,  Overall_Max_Loss_Percent .

  • Session:

    • Use_Session_Filter ,  Session_Start_Hour ,  Session_End_Hour , optional second session, weekday on/off.

  • Behaviour:

    • Reverse_On_Signal ,  Close_Outside_Session .


5. Technical Requirements

  • Platform: MetaTrader 5, language MQL5.

  • Delivery: full source code ( .mq5 ).

  • No external DLLs or paid libraries.

  • No martingale / grid / hedging‑recovery logic. Straight single‑position trend‑following only.

  • Code must:

    • Compile with no errors and no serious warnings.

    • Be clearly structured with functions for:

      • Reading indicators

      • Generating signals

      • Position sizing

      • Opening/closing trades

      • Breakeven and trailing logic

  • Include light comments, especially around:

    • Supertrend / DEMA buffer mapping

    • Entry/exit logic

    • Breakeven and trailing implementation.


6. Testing & Deliverables

  • Please test the EA in Strategy Tester on at least:

    • One FX pair

    • One volatile instrument (e.g. XAUUSD)

I don’t need optimisation; I just need confirmation that:

  • Entries occur only after a confirmed Supertrend flip on candle close.

  • DEMA filter, session filter, spread filter work as described.

  • SL/TP modes, breakeven at 10 pips, and trailing all behave correctly.

Deliverables:

  • Final  .mq5  EA source file.

  • Short note describing:

    • Which indicator buffers are used.

    • How risk (SL/TP, breakeven, trailing) is implemented.

    • Any assumptions about account type (hedging vs netting).


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

1
Разработчик 1
Оценка
(392)
Проекты
544
40%
Арбитраж
30
57% / 3%
Просрочено
57
10%
Работает
Опубликовал: 11 примеров
2
Разработчик 2
Оценка
(15)
Проекты
19
16%
Арбитраж
5
40% / 40%
Просрочено
0
Свободен
3
Разработчик 3
Оценка
(269)
Проекты
397
27%
Арбитраж
39
38% / 49%
Просрочено
1
0%
Работает
4
Разработчик 4
Оценка
(22)
Проекты
31
55%
Арбитраж
0
Просрочено
1
3%
Работает
5
Разработчик 5
Оценка
(4)
Проекты
7
0%
Арбитраж
3
33% / 33%
Просрочено
3
43%
Загружен
6
Разработчик 6
Оценка
(2)
Проекты
2
0%
Арбитраж
1
0% / 100%
Просрочено
0
Свободен
7
Разработчик 7
Оценка
(9)
Проекты
9
11%
Арбитраж
0
Просрочено
2
22%
Свободен
8
Разработчик 8
Оценка
(496)
Проекты
963
74%
Арбитраж
27
19% / 67%
Просрочено
100
10%
Загружен
Опубликовал: 1 статью, 6 примеров
9
Разработчик 9
Оценка
(248)
Проекты
254
30%
Арбитраж
0
Просрочено
3
1%
Свободен
Опубликовал: 2 примера
10
Разработчик 10
Оценка
Проекты
0
0%
Арбитраж
0
Просрочено
0
Свободен
11
Разработчик 11
Оценка
(7)
Проекты
12
17%
Арбитраж
12
17% / 50%
Просрочено
3
25%
Свободен
Опубликовал: 15 статей
12
Разработчик 12
Оценка
(6)
Проекты
5
0%
Арбитраж
2
50% / 50%
Просрочено
2
40%
Свободен
13
Разработчик 13
Оценка
(2629)
Проекты
3341
67%
Арбитраж
77
48% / 14%
Просрочено
342
10%
Свободен
Опубликовал: 1 пример
14
Разработчик 14
Оценка
(2)
Проекты
3
33%
Арбитраж
0
Просрочено
0
Свободен
15
Разработчик 15
Оценка
(2)
Проекты
3
0%
Арбитраж
0
Просрочено
0
Свободен
16
Разработчик 16
Оценка
Проекты
0
0%
Арбитраж
0
Просрочено
0
Свободен
17
Разработчик 17
Оценка
(333)
Проекты
401
52%
Арбитраж
20
55% / 15%
Просрочено
29
7%
Загружен
18
Разработчик 18
Оценка
(3)
Проекты
3
0%
Арбитраж
2
0% / 50%
Просрочено
1
33%
Загружен
19
Разработчик 19
Оценка
(8)
Проекты
11
9%
Арбитраж
4
25% / 25%
Просрочено
4
36%
Загружен
20
Разработчик 20
Оценка
Проекты
0
0%
Арбитраж
1
0% / 100%
Просрочено
0
Работает
21
Разработчик 21
Оценка
(57)
Проекты
84
26%
Арбитраж
24
13% / 58%
Просрочено
7
8%
Работает
22
Разработчик 22
Оценка
(64)
Проекты
83
28%
Арбитраж
9
33% / 56%
Просрочено
9
11%
Свободен
Опубликовал: 1 пример
23
Разработчик 23
Оценка
(2293)
Проекты
2887
63%
Арбитраж
122
44% / 25%
Просрочено
428
15%
Работает
24
Разработчик 24
Оценка
Проекты
0
0%
Арбитраж
0
Просрочено
0
Свободен
25
Разработчик 25
Оценка
(19)
Проекты
31
32%
Арбитраж
8
50% / 25%
Просрочено
3
10%
Работает
26
Разработчик 26
Оценка
(71)
Проекты
254
53%
Арбитраж
16
50% / 38%
Просрочено
83
33%
Загружен
27
Разработчик 27
Оценка
Проекты
0
0%
Арбитраж
0
Просрочено
0
Свободен
28
Разработчик 28
Оценка
Проекты
1
0%
Арбитраж
0
Просрочено
0
Работает
29
Разработчик 29
Оценка
(1)
Проекты
2
0%
Арбитраж
1
0% / 100%
Просрочено
0
Свободен
Опубликовал: 2 примера
30
Разработчик 30
Оценка
(2)
Проекты
2
0%
Арбитраж
1
0% / 0%
Просрочено
1
50%
Работает
31
Разработчик 31
Оценка
Проекты
0
0%
Арбитраж
0
Просрочено
0
Свободен
32
Разработчик 32
Оценка
(14)
Проекты
20
35%
Арбитраж
6
33% / 50%
Просрочено
0
Работает
Похожие заказы
Hi developers, I need someone to help me create a simple EA with my indicators and trading plan... I will give you all parameters and you help me create... 2 moving averages, one candle pattern
Please a need a very good expert for this jou I want to create 2 robot one a trade manager Perfect — here’s a clean, professional order description you can post directly to an EA freelancer (MQL5). I’ve written it so it’s clear, serious, and attractive to skilled developers 👌 MQL5 Trade Manager EA – Development Request I am looking for an experienced MQL5 developer to build a robust Trade Manager Expert Advisor for
Henryy999 30 - 3000 USD
The Ai robot must help me with forex and I don't have money soon can the Ai robot give me some money and I will pay it back if the Ai robot does a good job making me rich
Project Title: MT5 Algo Trading EA (Single Strategy + License Panel + Ownership + Manual Trade) --- Project Description I am looking for an experienced MT5 (MQL5) developer to create a clean, stable and professional Algo Trading EA for my company and future clients. This is a long-term business project, not a one-time personal EA. --- 1. Strategy Requirements - Only 1 single trading strategy - No martingale - No grid
I am looking for an experienced StrategyQuant X (SQX) developer to build a reusable trading template , not a single strategy. ⚠️ Please do NOT apply unless you actively use StrategyQuant X and have access to it. This project cannot be completed without SQX. 1. Session and Time Filters Trading restricted to fixed GMT sessions per index Sessions must convert correctly to broker server time and remain correct through
Is there someone who coded the PipJuice indicator? Here is the link: https://www.pipjuice.io/ Unfortunately, I don‘t have access to the indicator or the code. If someone have it please send me some screenshots
Strategy Development: Suggest a high-probability trading strategy based on Technical Analysis (using indicators like RSI, MACD, or Price Action). Risk Management: Explain how to calculate position sizing so I don't lose more than 1-2% of my capital per trade. Market Analysis: Teach me how to identify Support and Resistance levels and how to spot a trend reversal. Psychology: Give me 5 golden rules to maintain
A Grid EA with a hedge that open trades on a percentage based on whats is opened on the other side, closes losing trades with current profits made and utilizes a grid trading strategy combined with hedging technique to mitigate risk and potentially lock in profits. It involves placing buy and sell orders at predetermined price intervals, forming a grid. When a trade within the grid moves against the initial
MQL5 Expert Advisor Development (MT5) I need a professional MQL5 developer to create a custom Expert Advisor (EA) for MetaTrader 5 with high accuracy, low drawdown, and fast execution . 🔹 Strategy Requirements: Timeframe: Scalping-friendly (M1 / M5) Indicators Used: EMA 9 EMA 12 EMA 21 VWAP (as a trend filter) RSI (for trade confirmation) 🔹 Trade Logic: Buy and Sell entries based on EMA crossover + VWAP direction
Project Summary We are looking for a highly experienced MetaTrader 5 (MT5) developer to build a pattern-based Expert Advisor (EA) focused on low-time-interval automation (15-second & 30-second logic). This is a pure MT5 project — no external platforms, no shortcuts. It should be very clean ,Efficient ,Precised ,Accurate ,No copy paste ,Low latency. If you have real experience with MT5 tick-based logic and

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

Бюджет
100+ USD
VAT (21%): 21 USD
Итого: 121 USD
Исполнителю
90 USD

Заказчик

Размещено заказов1
Количество арбитражей0