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

Trabalho concluído

Tempo de execução 48 dias

Termos de Referência

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


Respondido

1
Desenvolvedor 1
Classificação
(393)
Projetos
549
40%
Arbitragem
30
57% / 3%
Expirado
57
10%
Trabalhando
Publicou: 11 códigos
2
Desenvolvedor 2
Classificação
(15)
Projetos
19
16%
Arbitragem
5
40% / 40%
Expirado
0
Livre
3
Desenvolvedor 3
Classificação
(273)
Projetos
401
27%
Arbitragem
40
40% / 50%
Expirado
1
0%
Livre
4
Desenvolvedor 4
Classificação
(23)
Projetos
34
53%
Arbitragem
1
100% / 0%
Expirado
1
3%
Livre
5
Desenvolvedor 5
Classificação
(4)
Projetos
8
0%
Arbitragem
3
33% / 67%
Expirado
4
50%
Livre
6
Desenvolvedor 6
Classificação
(2)
Projetos
2
0%
Arbitragem
1
0% / 100%
Expirado
0
Livre
7
Desenvolvedor 7
Classificação
(16)
Projetos
18
28%
Arbitragem
0
Expirado
3
17%
Livre
8
Desenvolvedor 8
Classificação
(509)
Projetos
977
74%
Arbitragem
27
19% / 67%
Expirado
101
10%
Livre
Publicou: 1 artigo, 6 códigos
9
Desenvolvedor 9
Classificação
(255)
Projetos
262
30%
Arbitragem
0
Expirado
3
1%
Livre
Publicou: 2 códigos
10
Desenvolvedor 10
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
11
Desenvolvedor 11
Classificação
(7)
Projetos
13
15%
Arbitragem
13
23% / 46%
Expirado
3
23%
Livre
Publicou: 24 artigos
12
Desenvolvedor 12
Classificação
(6)
Projetos
5
0%
Arbitragem
2
50% / 50%
Expirado
2
40%
Livre
13
Desenvolvedor 13
Classificação
(2653)
Projetos
3370
68%
Arbitragem
77
48% / 14%
Expirado
342
10%
Livre
Publicou: 1 código
14
Desenvolvedor 14
Classificação
(6)
Projetos
7
14%
Arbitragem
1
0% / 100%
Expirado
1
14%
Livre
15
Desenvolvedor 15
Classificação
(2)
Projetos
3
0%
Arbitragem
0
Expirado
0
Livre
16
Desenvolvedor 16
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
17
Desenvolvedor 17
Classificação
(360)
Projetos
432
54%
Arbitragem
20
55% / 15%
Expirado
29
7%
Trabalhando
18
Desenvolvedor 18
Classificação
(7)
Projetos
5
0%
Arbitragem
6
0% / 83%
Expirado
1
20%
Trabalhando
19
Desenvolvedor 19
Classificação
(12)
Projetos
16
13%
Arbitragem
4
50% / 25%
Expirado
4
25%
Carregado
20
Desenvolvedor 20
Classificação
Projetos
0
0%
Arbitragem
1
0% / 100%
Expirado
0
Trabalhando
21
Desenvolvedor 21
Classificação
(60)
Projetos
87
29%
Arbitragem
24
13% / 58%
Expirado
7
8%
Trabalhando
22
Desenvolvedor 22
Classificação
(64)
Projetos
83
28%
Arbitragem
9
33% / 56%
Expirado
9
11%
Livre
Publicou: 1 código
23
Desenvolvedor 23
Classificação
(2317)
Projetos
2916
63%
Arbitragem
124
44% / 25%
Expirado
429
15%
Trabalhando
24
Desenvolvedor 24
Classificação
(2)
Projetos
3
33%
Arbitragem
1
0% / 100%
Expirado
0
Livre
25
Desenvolvedor 25
Classificação
(19)
Projetos
31
32%
Arbitragem
8
50% / 25%
Expirado
3
10%
Trabalhando
26
Desenvolvedor 26
Classificação
(73)
Projetos
257
53%
Arbitragem
16
50% / 38%
Expirado
83
32%
Livre
27
Desenvolvedor 27
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
28
Desenvolvedor 28
Classificação
Projetos
2
0%
Arbitragem
0
Expirado
1
50%
Livre
29
Desenvolvedor 29
Classificação
(1)
Projetos
2
0%
Arbitragem
1
0% / 100%
Expirado
0
Livre
Publicou: 2 códigos
30
Desenvolvedor 30
Classificação
(3)
Projetos
5
20%
Arbitragem
1
100% / 0%
Expirado
2
40%
Livre
31
Desenvolvedor 31
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
32
Desenvolvedor 32
Classificação
(17)
Projetos
23
39%
Arbitragem
6
33% / 50%
Expirado
0
Livre
33
Desenvolvedor 33
Classificação
(144)
Projetos
186
41%
Arbitragem
24
58% / 21%
Expirado
13
7%
Livre
34
Desenvolvedor 34
Classificação
(187)
Projetos
243
20%
Arbitragem
22
50% / 18%
Expirado
0
Trabalhando
35
Desenvolvedor 35
Classificação
(55)
Projetos
92
24%
Arbitragem
8
75% / 13%
Expirado
44
48%
Livre
36
Desenvolvedor 36
Classificação
(3)
Projetos
1
100%
Arbitragem
3
0% / 100%
Expirado
0
Livre
37
Desenvolvedor 37
Classificação
(32)
Projetos
33
61%
Arbitragem
1
100% / 0%
Expirado
1
3%
Trabalhando
Publicou: 5 códigos
38
Desenvolvedor 38
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
39
Desenvolvedor 39
Classificação
(10)
Projetos
14
43%
Arbitragem
0
Expirado
3
21%
Livre
40
Desenvolvedor 40
Classificação
(4)
Projetos
4
0%
Arbitragem
0
Expirado
0
Livre
41
Desenvolvedor 41
Classificação
(2)
Projetos
5
0%
Arbitragem
2
0% / 50%
Expirado
1
20%
Trabalhando
42
Desenvolvedor 42
Classificação
(1)
Projetos
1
0%
Arbitragem
0
Expirado
0
Livre
43
Desenvolvedor 43
Classificação
(271)
Projetos
553
50%
Arbitragem
57
40% / 37%
Expirado
227
41%
Trabalhando
44
Desenvolvedor 44
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
45
Desenvolvedor 45
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
Pedidos semelhantes
Seeking developer service to code an EA. Interested developer must have good experience and understanding on how ORB and FVG works, and agreed to the terms below : 1. Shall demonstrate a fully functional EA that operates as specified in the requirement and function automatically as requested in real-time environment (forward test - demo/live), regardless of good results obtained in strategy-tester. Backtesting
Need trading robot 50 - 70 USD
I need a robot for trading gold and currencies . I need to use it with metatrader 4 and 5 . My budget is not high . Max . 70 USD. I need to be able to start and stop it at any time without restrictions
am looking for an experienced MQL5 developer to build a high-frequency trading Expert Advisor (EA) for XAUUSD (Gold) on M1 and M5 timeframes . The EA must include advanced execution logic, dynamic pending orders, risk management, and news/session filters. Clean, efficient, and well-documented code is required. Strategy type: Scalping (fast trades, quick profit). Very fast execution logic (optimized for speed). Goal
Title: MT5 EA Needed – Prop‑Firm Compliance Tool (SL/TP at Entry, 60‑Second Hold, Daily Profit Cap, 0.5% XAUUSD Risk) Description: I need an MT5 Expert Advisor that enforces prop‑firm compliance rules for Instant Funding accounts. The EA must NOT trade automatically — it should only monitor and control my manual XAUUSD trading. I trade all sessions, so there should be no time restrictions. MY TRADING STYLE (Important
​1. Project Overview ​ Asset: XAUUSD (Gold) ​ Timeframe: M1 (1-Minute) for execution; M5/M15 for trend filtering. ​ Objective: Execute high-frequency scalps during peak liquidity (London/NY overlap) to capture 10–30 pip movements with high precision. ​ Core Logic: The "Poverty Bot" strategy relies on Mean Reversion combined with Momentum Burst (Price Action + RSI/EMA filters). ​2. Strategy Logic (The "Poverty"
Simple MA indicator with buy and sell arrow with a push notification. Conditions for buy or sell should be when price breaks above or below the MA and then retraced back to the MA creating a HH/HL or LH/LL then the buy/sell signal arrow should be at the reversal candle that forms the HL/HH. And on indicator window1 RSI cross over MA and the RSI line
Hi, I hope you doing Greate, Let me share details , so the original EA already working but you can check and verify everything fine.First you verify that all original EA features are working correctly then add a user dashboard showing the number of detected zones, buy sell both none status, and an on off button. also ensure mitigated zones disappear properly and that trades follow the zone rules, and integrate the
I need a high-speed Expert Advisor (EA) for MT5 designed specifically for XAUUSD (Gold) scalping. The bot should focus on fast entries and quick profits with high efficiency. Main requirements: 1. Symbol: XAUUSD (Gold only). 2. Platform: MetaTrader 5. 3. Strategy type: Scalping (fast trades, quick profit). 4. The bot should open trades frequently based on fast market movements. 5. Small Take Profit (quick profit
A perfect indicator 30 - 80 USD
Merge nearby zones yes/no Alert on/off Label on/off Show only current relevant zones near price yes/no Distance filter from current price Zone transparency Colors Preferred Output on Chart: I want the indicator to show only: the strongest nearby support zones under price the strongest nearby resistance zones above price major higher timeframe zones clean chart view I do not want excessive clutter. Entry Assistance
Project Title: Custom XAUUSD Support & Resistance Indicator Platform Required: MT5 preferred. If possible, also provide TradingView Pine Script version later. Main Goal: I want a custom indicator made specifically for XAUUSD (Gold) only. The indicator should automatically detect and draw strong support and resistance zones where price has a high probability of reacting, rejecting, or reversing. It must update

Informações sobre o projeto

Orçamento
100+ USD