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

工作已完成

执行时间48 天

指定

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
等级
(393)
项目
549
40%
仲裁
30
57% / 3%
逾期
57
10%
工作中
发布者: 11 代码
2
开发者 2
等级
(15)
项目
19
16%
仲裁
5
40% / 40%
逾期
0
空闲
3
开发者 3
等级
(273)
项目
401
27%
仲裁
40
40% / 50%
逾期
1
0%
空闲
4
开发者 4
等级
(23)
项目
34
53%
仲裁
1
100% / 0%
逾期
1
3%
空闲
5
开发者 5
等级
(4)
项目
8
0%
仲裁
3
33% / 67%
逾期
4
50%
空闲
6
开发者 6
等级
(2)
项目
2
0%
仲裁
1
0% / 100%
逾期
0
空闲
7
开发者 7
等级
(16)
项目
18
28%
仲裁
0
逾期
3
17%
空闲
8
开发者 8
等级
(509)
项目
977
74%
仲裁
27
19% / 67%
逾期
101
10%
空闲
发布者: 1 文章, 6 代码
9
开发者 9
等级
(255)
项目
262
30%
仲裁
0
逾期
3
1%
空闲
发布者: 2 代码
10
开发者 10
等级
项目
0
0%
仲裁
0
逾期
0
空闲
11
开发者 11
等级
(7)
项目
13
15%
仲裁
13
23% / 46%
逾期
3
23%
空闲
发布者: 24 文章
12
开发者 12
等级
(6)
项目
5
0%
仲裁
2
50% / 50%
逾期
2
40%
空闲
13
开发者 13
等级
(2653)
项目
3370
68%
仲裁
77
48% / 14%
逾期
342
10%
空闲
发布者: 1 代码
14
开发者 14
等级
(6)
项目
7
14%
仲裁
1
0% / 100%
逾期
1
14%
空闲
15
开发者 15
等级
(2)
项目
3
0%
仲裁
0
逾期
0
空闲
16
开发者 16
等级
项目
0
0%
仲裁
0
逾期
0
空闲
17
开发者 17
等级
(360)
项目
432
54%
仲裁
20
55% / 15%
逾期
29
7%
工作中
18
开发者 18
等级
(7)
项目
5
0%
仲裁
6
0% / 83%
逾期
1
20%
工作中
19
开发者 19
等级
(12)
项目
16
13%
仲裁
4
50% / 25%
逾期
4
25%
已载入
20
开发者 20
等级
项目
0
0%
仲裁
1
0% / 100%
逾期
0
工作中
21
开发者 21
等级
(60)
项目
87
29%
仲裁
24
13% / 58%
逾期
7
8%
工作中
22
开发者 22
等级
(64)
项目
83
28%
仲裁
9
33% / 56%
逾期
9
11%
空闲
发布者: 1 代码
23
开发者 23
等级
(2317)
项目
2916
63%
仲裁
124
44% / 25%
逾期
429
15%
工作中
24
开发者 24
等级
(2)
项目
3
33%
仲裁
1
0% / 100%
逾期
0
空闲
25
开发者 25
等级
(19)
项目
31
32%
仲裁
8
50% / 25%
逾期
3
10%
工作中
26
开发者 26
等级
(73)
项目
257
53%
仲裁
16
50% / 38%
逾期
83
32%
空闲
27
开发者 27
等级
项目
0
0%
仲裁
0
逾期
0
空闲
28
开发者 28
等级
项目
2
0%
仲裁
0
逾期
1
50%
空闲
29
开发者 29
等级
(1)
项目
2
0%
仲裁
1
0% / 100%
逾期
0
空闲
发布者: 2 代码
30
开发者 30
等级
(3)
项目
5
20%
仲裁
1
100% / 0%
逾期
2
40%
空闲
31
开发者 31
等级
项目
0
0%
仲裁
0
逾期
0
空闲
32
开发者 32
等级
(17)
项目
23
39%
仲裁
6
33% / 50%
逾期
0
空闲
33
开发者 33
等级
(144)
项目
186
41%
仲裁
24
58% / 21%
逾期
13
7%
空闲
34
开发者 34
等级
(187)
项目
243
20%
仲裁
22
50% / 18%
逾期
0
工作中
35
开发者 35
等级
(55)
项目
92
24%
仲裁
8
75% / 13%
逾期
44
48%
空闲
36
开发者 36
等级
(3)
项目
1
100%
仲裁
3
0% / 100%
逾期
0
空闲
37
开发者 37
等级
(32)
项目
33
61%
仲裁
1
100% / 0%
逾期
1
3%
工作中
发布者: 5 代码
38
开发者 38
等级
项目
0
0%
仲裁
0
逾期
0
空闲
39
开发者 39
等级
(10)
项目
14
43%
仲裁
0
逾期
3
21%
空闲
40
开发者 40
等级
(4)
项目
4
0%
仲裁
0
逾期
0
空闲
41
开发者 41
等级
(2)
项目
5
0%
仲裁
2
0% / 50%
逾期
1
20%
工作中
42
开发者 42
等级
(1)
项目
1
0%
仲裁
0
逾期
0
空闲
43
开发者 43
等级
(271)
项目
553
50%
仲裁
57
40% / 37%
逾期
227
41%
工作中
44
开发者 44
等级
项目
0
0%
仲裁
0
逾期
0
空闲
45
开发者 45
等级
项目
0
0%
仲裁
0
逾期
0
空闲
相似订单
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
1. IF price forms: - Higher highs + higher lows → TREND = BUY - Lower highs + lower lows → TREND = SELL ELSE → NO TRADE 2. IF: - Trend = BUY - Price retraces to support zone - Bullish engulfing candle forms - TDI green crosses above red (optional) THEN: - Execute BUY 3. IF: - Trend = SELL - Price retraces to resistance - Bearish engulfing forms - TDI confirms THEN: - Execute SELL 4. Risk per trade = 1% of account Lot

项目信息

预算
100+ USD