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

Spezifikation

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).


Bewerbungen

1
Entwickler 1
Bewertung
(392)
Projekte
544
40%
Schlichtung
30
57% / 3%
Frist nicht eingehalten
57
10%
Arbeitet
Veröffentlicht: 11 Beispiele
2
Entwickler 2
Bewertung
(15)
Projekte
19
16%
Schlichtung
5
40% / 40%
Frist nicht eingehalten
0
Frei
3
Entwickler 3
Bewertung
(269)
Projekte
397
27%
Schlichtung
39
38% / 49%
Frist nicht eingehalten
1
0%
Arbeitet
4
Entwickler 4
Bewertung
(22)
Projekte
31
55%
Schlichtung
0
Frist nicht eingehalten
1
3%
Arbeitet
5
Entwickler 5
Bewertung
(4)
Projekte
7
0%
Schlichtung
3
33% / 33%
Frist nicht eingehalten
3
43%
Beschäftigt
6
Entwickler 6
Bewertung
(2)
Projekte
2
0%
Schlichtung
1
0% / 100%
Frist nicht eingehalten
0
Frei
7
Entwickler 7
Bewertung
(9)
Projekte
9
11%
Schlichtung
0
Frist nicht eingehalten
2
22%
Frei
8
Entwickler 8
Bewertung
(496)
Projekte
963
74%
Schlichtung
27
19% / 67%
Frist nicht eingehalten
100
10%
Überlastet
Veröffentlicht: 1 Artikel, 6 Beispiele
9
Entwickler 9
Bewertung
(248)
Projekte
254
30%
Schlichtung
0
Frist nicht eingehalten
3
1%
Frei
Veröffentlicht: 2 Beispiele
10
Entwickler 10
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
11
Entwickler 11
Bewertung
(7)
Projekte
12
17%
Schlichtung
12
17% / 50%
Frist nicht eingehalten
3
25%
Frei
Veröffentlicht: 15 Artikel
12
Entwickler 12
Bewertung
(6)
Projekte
5
0%
Schlichtung
2
50% / 50%
Frist nicht eingehalten
2
40%
Frei
13
Entwickler 13
Bewertung
(2629)
Projekte
3341
67%
Schlichtung
77
48% / 14%
Frist nicht eingehalten
342
10%
Frei
Veröffentlicht: 1 Beispiel
14
Entwickler 14
Bewertung
(3)
Projekte
3
33%
Schlichtung
0
Frist nicht eingehalten
0
Frei
15
Entwickler 15
Bewertung
(2)
Projekte
3
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
16
Entwickler 16
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
17
Entwickler 17
Bewertung
(333)
Projekte
402
52%
Schlichtung
20
55% / 15%
Frist nicht eingehalten
29
7%
Beschäftigt
18
Entwickler 18
Bewertung
(4)
Projekte
3
0%
Schlichtung
2
0% / 100%
Frist nicht eingehalten
1
33%
Beschäftigt
19
Entwickler 19
Bewertung
(9)
Projekte
12
17%
Schlichtung
4
25% / 25%
Frist nicht eingehalten
4
33%
Beschäftigt
20
Entwickler 20
Bewertung
Projekte
0
0%
Schlichtung
1
0% / 100%
Frist nicht eingehalten
0
Arbeitet
21
Entwickler 21
Bewertung
(57)
Projekte
84
26%
Schlichtung
24
13% / 58%
Frist nicht eingehalten
7
8%
Arbeitet
22
Entwickler 22
Bewertung
(64)
Projekte
83
28%
Schlichtung
9
33% / 56%
Frist nicht eingehalten
9
11%
Frei
Veröffentlicht: 1 Beispiel
23
Entwickler 23
Bewertung
(2294)
Projekte
2888
63%
Schlichtung
122
44% / 25%
Frist nicht eingehalten
428
15%
Arbeitet
24
Entwickler 24
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
25
Entwickler 25
Bewertung
(19)
Projekte
31
32%
Schlichtung
8
50% / 25%
Frist nicht eingehalten
3
10%
Arbeitet
26
Entwickler 26
Bewertung
(71)
Projekte
254
53%
Schlichtung
16
50% / 38%
Frist nicht eingehalten
83
33%
Beschäftigt
27
Entwickler 27
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
28
Entwickler 28
Bewertung
Projekte
1
0%
Schlichtung
0
Frist nicht eingehalten
0
Arbeitet
29
Entwickler 29
Bewertung
(1)
Projekte
2
0%
Schlichtung
1
0% / 100%
Frist nicht eingehalten
0
Frei
Veröffentlicht: 2 Beispiele
30
Entwickler 30
Bewertung
(2)
Projekte
2
0%
Schlichtung
1
0% / 0%
Frist nicht eingehalten
1
50%
Arbeitet
31
Entwickler 31
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
32
Entwickler 32
Bewertung
(14)
Projekte
20
35%
Schlichtung
6
33% / 50%
Frist nicht eingehalten
0
Arbeitet
33
Entwickler 33
Bewertung
(144)
Projekte
186
41%
Schlichtung
24
58% / 21%
Frist nicht eingehalten
13
7%
Frei
34
Entwickler 34
Bewertung
(176)
Projekte
227
19%
Schlichtung
21
38% / 24%
Frist nicht eingehalten
0
Arbeitet
35
Entwickler 35
Bewertung
(52)
Projekte
89
25%
Schlichtung
8
75% / 13%
Frist nicht eingehalten
44
49%
Arbeitet
36
Entwickler 36
Bewertung
(3)
Projekte
1
100%
Schlichtung
3
0% / 100%
Frist nicht eingehalten
0
Frei
37
Entwickler 37
Bewertung
(24)
Projekte
25
68%
Schlichtung
0
Frist nicht eingehalten
1
4%
Beschäftigt
Veröffentlicht: 5 Beispiele
38
Entwickler 38
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
39
Entwickler 39
Bewertung
(10)
Projekte
14
43%
Schlichtung
0
Frist nicht eingehalten
3
21%
Frei
40
Entwickler 40
Bewertung
(2)
Projekte
2
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
41
Entwickler 41
Bewertung
(1)
Projekte
2
0%
Schlichtung
2
0% / 0%
Frist nicht eingehalten
0
Arbeitet
42
Entwickler 42
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
43
Entwickler 43
Bewertung
(270)
Projekte
552
49%
Schlichtung
57
40% / 37%
Frist nicht eingehalten
228
41%
Arbeitet
44
Entwickler 44
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
Ähnliche Aufträge
Advanced Forex Expert Advisor (EA) – Fully Automated Trading System A professional Forex Expert Advisor designed for fully automated trading, with a strong focus on stability, risk control, and consistency . Key Features: Fully automated trading system (no manual execution) Compatible with MT4 / MT5 Supports multiple currency pairs (Majors & selected Minors) Built-in Smart Risk Management Protection against
I am looking of an Expert Advisor (EA) that has undergone independent validation and demonstrates a capability to successfully navigate prop firm challenges, as well as efficiently manage funded accounts. It is imperative that you provide a comprehensive explanation of the strategy utilised by your EA, along with a demo version that has a 30-day expiration. This will facilitate extensive back testing and forward
I hope, dear developers, that you are doing well. Recently, I have been looking for an indicator dedicated to institutional trading (Smart Money Concept) , but I could not find a suitable one. And when such indicators do exist, they are usually provided only as executables, which makes them impossible to modify or customize. For this reason, I developed the entire concept myself, including: Real-time labeling of
step by step and structure this into a full IEEE 830 / ISO/IEC/IEEE 29148 style Requirements Specification. This format will include: Introduction System Overview Functional and Performance Requirements Traceability Matrix (linking requirements to test cases) Verification and Validation Compliance Standards 1. Introduction 1.1 Purpose The purpose of this document is to define the technical requirements for the
i need an expert to help join 3 model i have in ninjatrader into one, kindly message me and i will be expecting from you and i need this work done in maximum of 4 days, so i need expert that can get it done
I want an EA that work with my support and resistance indicator. Buy entry condition are: 1. hen candlestick closes in side the support bar. 2. When candlestick break above resistance bar. Likewise sell condition: 1. When candlestick closes inside the resistance bar, 2. When candlestick break below support bar
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

Projektdetails

Budget
100+ USD
MwSt (21%): 21 USD
Insgesamt: 121 USD
Für die Entwickler
90 USD

Kunde

Veröffentlichte Aufträge1
Anzahl der Schlichtungen0