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

İş tamamlandı

Tamamlanma süresi: 48 gün

Şartname

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


Yanıtlandı

1
Geliştirici 1
Derecelendirme
(394)
Projeler
553
41%
Arabuluculuk
30
57% / 3%
Süresi dolmuş
57
10%
Çalışıyor
Yayınlandı: 11 kod
2
Geliştirici 2
Derecelendirme
(15)
Projeler
19
16%
Arabuluculuk
5
40% / 40%
Süresi dolmuş
0
Serbest
3
Geliştirici 3
Derecelendirme
(274)
Projeler
403
28%
Arabuluculuk
40
40% / 50%
Süresi dolmuş
1
0%
Serbest
4
Geliştirici 4
Derecelendirme
(23)
Projeler
34
53%
Arabuluculuk
1
100% / 0%
Süresi dolmuş
1
3%
Serbest
5
Geliştirici 5
Derecelendirme
(4)
Projeler
8
0%
Arabuluculuk
3
33% / 67%
Süresi dolmuş
4
50%
Serbest
6
Geliştirici 6
Derecelendirme
(2)
Projeler
2
0%
Arabuluculuk
1
0% / 100%
Süresi dolmuş
0
Serbest
7
Geliştirici 7
Derecelendirme
(27)
Projeler
29
38%
Arabuluculuk
0
Süresi dolmuş
3
10%
Serbest
8
Geliştirici 8
Derecelendirme
(509)
Projeler
977
74%
Arabuluculuk
27
19% / 67%
Süresi dolmuş
101
10%
Serbest
Yayınlandı: 1 makale, 6 kod
9
Geliştirici 9
Derecelendirme
(258)
Projeler
265
29%
Arabuluculuk
0
Süresi dolmuş
3
1%
Serbest
Yayınlandı: 2 kod
10
Geliştirici 10
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
11
Geliştirici 11
Derecelendirme
(7)
Projeler
13
15%
Arabuluculuk
13
23% / 46%
Süresi dolmuş
3
23%
Serbest
Yayınlandı: 29 makale
12
Geliştirici 12
Derecelendirme
(6)
Projeler
5
0%
Arabuluculuk
4
25% / 75%
Süresi dolmuş
2
40%
Serbest
13
Geliştirici 13
Derecelendirme
(2666)
Projeler
3397
68%
Arabuluculuk
77
48% / 14%
Süresi dolmuş
342
10%
Serbest
Yayınlandı: 1 kod
14
Geliştirici 14
Derecelendirme
(6)
Projeler
7
14%
Arabuluculuk
1
0% / 100%
Süresi dolmuş
1
14%
Serbest
15
Geliştirici 15
Derecelendirme
(2)
Projeler
3
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
16
Geliştirici 16
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
17
Geliştirici 17
Derecelendirme
(363)
Projeler
436
54%
Arabuluculuk
22
50% / 14%
Süresi dolmuş
30
7%
Yüklendi
18
Geliştirici 18
Derecelendirme
(7)
Projeler
5
0%
Arabuluculuk
6
0% / 83%
Süresi dolmuş
1
20%
Çalışıyor
19
Geliştirici 19
Derecelendirme
(17)
Projeler
24
21%
Arabuluculuk
4
50% / 25%
Süresi dolmuş
4
17%
Yüklendi
20
Geliştirici 20
Derecelendirme
Projeler
0
0%
Arabuluculuk
2
0% / 100%
Süresi dolmuş
0
Serbest
21
Geliştirici 21
Derecelendirme
(62)
Projeler
90
29%
Arabuluculuk
24
13% / 58%
Süresi dolmuş
7
8%
Çalışıyor
22
Geliştirici 22
Derecelendirme
(64)
Projeler
83
28%
Arabuluculuk
9
33% / 56%
Süresi dolmuş
9
11%
Serbest
Yayınlandı: 1 kod
23
Geliştirici 23
Derecelendirme
(2322)
Projeler
2925
63%
Arabuluculuk
123
45% / 25%
Süresi dolmuş
429
15%
Çalışıyor
24
Geliştirici 24
Derecelendirme
(2)
Projeler
3
33%
Arabuluculuk
1
0% / 100%
Süresi dolmuş
0
Serbest
25
Geliştirici 25
Derecelendirme
(19)
Projeler
31
32%
Arabuluculuk
8
50% / 25%
Süresi dolmuş
3
10%
Çalışıyor
26
Geliştirici 26
Derecelendirme
(73)
Projeler
257
53%
Arabuluculuk
16
50% / 38%
Süresi dolmuş
83
32%
Serbest
27
Geliştirici 27
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
28
Geliştirici 28
Derecelendirme
Projeler
2
0%
Arabuluculuk
0
Süresi dolmuş
1
50%
Serbest
29
Geliştirici 29
Derecelendirme
(1)
Projeler
2
0%
Arabuluculuk
1
0% / 100%
Süresi dolmuş
0
Serbest
Yayınlandı: 2 kod
30
Geliştirici 30
Derecelendirme
(3)
Projeler
5
20%
Arabuluculuk
1
100% / 0%
Süresi dolmuş
2
40%
Serbest
31
Geliştirici 31
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
32
Geliştirici 32
Derecelendirme
(20)
Projeler
26
38%
Arabuluculuk
6
33% / 50%
Süresi dolmuş
0
Serbest
33
Geliştirici 33
Derecelendirme
(144)
Projeler
186
41%
Arabuluculuk
24
58% / 21%
Süresi dolmuş
13
7%
Serbest
34
Geliştirici 34
Derecelendirme
(199)
Projeler
255
21%
Arabuluculuk
23
48% / 17%
Süresi dolmuş
0
Yüklendi
35
Geliştirici 35
Derecelendirme
(55)
Projeler
92
24%
Arabuluculuk
8
75% / 13%
Süresi dolmuş
44
48%
Serbest
36
Geliştirici 36
Derecelendirme
(3)
Projeler
1
100%
Arabuluculuk
3
0% / 100%
Süresi dolmuş
0
Serbest
37
Geliştirici 37
Derecelendirme
(40)
Projeler
43
58%
Arabuluculuk
2
50% / 0%
Süresi dolmuş
1
2%
Çalışıyor
Yayınlandı: 5 kod
38
Geliştirici 38
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
39
Geliştirici 39
Derecelendirme
(10)
Projeler
14
43%
Arabuluculuk
0
Süresi dolmuş
3
21%
Serbest
40
Geliştirici 40
Derecelendirme
(4)
Projeler
4
0%
Arabuluculuk
0
Süresi dolmuş
0
Çalışıyor
41
Geliştirici 41
Derecelendirme
(2)
Projeler
7
0%
Arabuluculuk
3
0% / 33%
Süresi dolmuş
1
14%
Çalışıyor
42
Geliştirici 42
Derecelendirme
(1)
Projeler
1
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
43
Geliştirici 43
Derecelendirme
(271)
Projeler
553
50%
Arabuluculuk
57
40% / 37%
Süresi dolmuş
227
41%
Çalışıyor
44
Geliştirici 44
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
45
Geliştirici 45
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
Benzer siparişler
Gold robot 3000+ USD
I really liked this training platform. I want to start a good business with this funding amount."I like crypto trading. Does it provide a demo account that is good for learning?"
Gold robot 3000+ USD
Hello, I am looking for someone who can help me to build a MT4/MT5 forex EA, by analyzing the trading history. You are responsible to find out trading logic behind the EA and Build a new EA that accurately replicates the existing strategy. I need someone who has proven previous experience to build a new EA by reverse engineering. Thanks
I am looking for an experienced MT4/MT5 developer to analyze my trading history and replicate the strategy in a new Expert Advisor (EA). The developer must have proven experience in reverse engineering strategies, analyzing trading data, and developing EAs across various trading methodologies. A deep understanding of XAUUDS and BTCUSD behavior, as well as chart analysis, is essential. Please note that we do not have
Title: MT5 Forex Trading Robot Development I need a MetaTrader 5 (MT5) Expert Advisor (EA) for automated Forex trading. Requirements: 1. The robot must be fully automated and capable of opening and closing trades without manual intervention. 2. Compatible with MetaTrader 5 (MT5). 3. Adjustable lot size, Stop Loss, and Take Profit settings. 4. Built-in risk management based on account balance. 5. Ability to trade
Risk management EA 30 - 200 USD
Looking to develop risk management EA for personal use probably commercially in the future. I want the EA to have a display panel with 0.1, 0.2, 0.5,1,2,3 percent risk management button. I also want BE, partial closure of 0.25,0.5,0.75 and full closure panel on both profit and loss. I’ll also like to include trailing stop, 2 trades max per day and BE+spread option. I’ll be attaching the image for a guidance on what
Sierra Chart Alerts to MT5 via Webhook (Alert Manager File Version) Objective: Create a Custom Study (ACSIL / C++) that monitors alerts from the Alert Manager file and forwards any valid alert directly to MT5 via an HTTP POST (Webhook) in JSON format. Additional Note: The study should allow adding any modifications in the future and provide clear insights into the alert points in Sierra Chart. 1. Data Flow Diagram
Ea.Mix 30+ USD
I am in need of a good scalping bot for gold or any currency pair. If you have one that is working, reach out. You must be able to provide a trial version so I can test the bot myself
A bot takes trades every few seconds until hit the profit with the same lots , i am attaching a picture as well. If anyone can do that please contact me i will give the account details
MT5 Expert Advisor Development Project Overview I am looking for an experienced MQL5 developer to build a custom MetaTrader 5 Expert Advisor based on a grid-cycle trading framework. This is not a standard grid EA . The system combines: Session-based trade initiation Multi-filter signal generation Dynamic grid management Advanced basket management State-machine-driven trade lifecycle management Dynamic take-profit

Proje bilgisi

Bütçe
100+ USD