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
評価
(395)
プロジェクト
556
41%
仲裁
30
57% / 3%
期限切れ
57
10%
暇
パブリッシュした人: 11 codes
2
開発者 2
評価
(17)
プロジェクト
21
19%
仲裁
5
40% / 40%
期限切れ
0
暇
3
開発者 3
評価
(274)
プロジェクト
403
28%
仲裁
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
評価
(34)
プロジェクト
35
40%
仲裁
0
期限切れ
3
9%
暇
8
開発者 8
評価
(511)
プロジェクト
978
74%
仲裁
27
19% / 67%
期限切れ
100
10%
暇
パブリッシュした人: 1 article, 6 codes
9
開発者 9
評価
(258)
プロジェクト
269
29%
仲裁
2
50% / 0%
期限切れ
3
1%
仕事中
パブリッシュした人: 2 codes
10
開発者 10
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
暇
11
開発者 11
評価
(7)
プロジェクト
13
15%
仲裁
13
23% / 46%
期限切れ
3
23%
暇
パブリッシュした人: 42 articles
12
開発者 12
評価
(7)
プロジェクト
6
0%
仲裁
4
25% / 75%
期限切れ
2
33%
暇
13
開発者 13
評価
(2678)
プロジェクト
3422
68%
仲裁
78
47% / 14%
期限切れ
343
10%
仕事中
パブリッシュした人: 1 code
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
評価
(369)
プロジェクト
459
55%
仲裁
24
58% / 17%
期限切れ
31
7%
仕事中
18
開発者 18
評価
(7)
プロジェクト
5
0%
仲裁
5
0% / 80%
期限切れ
1
20%
仕事中
19
開発者 19
評価
(24)
プロジェクト
32
38%
仲裁
4
50% / 25%
期限切れ
5
16%
仕事中
20
開発者 20
評価
プロジェクト
0
0%
仲裁
2
0% / 100%
期限切れ
0
暇
21
開発者 21
評価
(62)
プロジェクト
90
29%
仲裁
24
13% / 58%
期限切れ
7
8%
仕事中
22
開発者 22
評価
(64)
プロジェクト
83
28%
仲裁
9
33% / 56%
期限切れ
9
11%
暇
パブリッシュした人: 1 code
23
開発者 23
評価
(2351)
プロジェクト
2958
63%
仲裁
125
44% / 26%
期限切れ
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 codes
30
開発者 30
評価
(6)
プロジェクト
8
38%
仲裁
2
50% / 50%
期限切れ
2
25%
暇
31
開発者 31
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
暇
32
開発者 32
評価
(20)
プロジェクト
26
38%
仲裁
6
33% / 50%
期限切れ
0
暇
33
開発者 33
評価
(144)
プロジェクト
186
41%
仲裁
24
58% / 21%
期限切れ
13
7%
暇
34
開発者 34
評価
(215)
プロジェクト
280
21%
仲裁
27
56% / 15%
期限切れ
0
取り込み中
35
開発者 35
評価
(55)
プロジェクト
92
24%
仲裁
8
75% / 13%
期限切れ
44
48%
暇
36
開発者 36
評価
(3)
プロジェクト
1
100%
仲裁
3
0% / 100%
期限切れ
0
暇
37
開発者 37
評価
(45)
プロジェクト
53
57%
仲裁
2
100% / 0%
期限切れ
1
2%
暇
パブリッシュした人: 5 codes
38
開発者 38
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
暇
39
開発者 39
評価
(10)
プロジェクト
14
43%
仲裁
0
期限切れ
3
21%
暇
40
開発者 40
評価
(4)
プロジェクト
5
0%
仲裁
0
期限切れ
0
暇
41
開発者 41
評価
(2)
プロジェクト
7
0%
仲裁
3
0% / 33%
期限切れ
1
14%
仕事中
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
暇
類似した注文
Project Description: I need an MQL5 Expert Advisor built based on a precise Smart Money Concepts (SMC) multi-timeframe strategy. The bot must analyze the 1-Hour chart for institutional bias and execute trades on the 3-Minute chart following strict structural rules. 1. Inputs & Parameters (Customizable) - Risk Model: Fixed dollar risk of $20.00 for every $100.00 of account balance (20% per trade for personal capital
I am looking for an experienced MQL5 developer and trader to create a non-repainting BUY/SELL indicator for MT5, designed for scalping on the M5 and M15 timeframes, with a focus on high-quality trading signals. Requirements: Clear and reliable BUY/SELL signals. Non-repainting signals confirmed on closed candles. High-quality entries with minimal false signals. Suitable for scalping, especially Gold (XAUUSD). Popup
PROJECT: Automatic Gold and Forex Trading Robot for MetaTrader 5 (MQL5) I want a fully automated Expert Advisor (EA) for MetaTrader 5 that can analyze the market and automatically open, manage and close trades on Gold and selected Forex currency pairs. 1. TRADING INSTRUMENTS - Gold: XAUUSD - Forex: EURUSD, GBPUSD and USDJPY, subject to broker availability. - Allow the user to enable or disable each trading symbol. -
Looking for a Complete Forex & Gold Signal System — Telegram Automation + Performance Tracking I’m looking for a complete automated trading signal solution for Forex pairs, including EUR/USD, GBP/USD and others, as well as gold (XAU/USD). Requirements: • An average of 2–3 quality signals per day across the selected instruments. Quality matters more than generating signals just to meet a quota. • A high win rate
I need a robot that will grow small accounts to bigger amounts like this one in this link, https://youtu.be/d38pMbJihew?si=3NeIOVyrlwDr4X_o. Please click the link and watch how this EA grow small accounts. Then create a robot like that. I will test it on demo first then if it does what i want, i will take it. Please it must be simply to use. It must set targets, for example, once it reaches $500 profit, it must
Here is a professional, detailed requirements specification draft for your MQL5 freelance order based on your prompt: ​ Strategy Objective: Develop an automated Expert Advisor (EA) featuring a 1:3 Risk-to-Reward ratio optimized for a small starting budget. ​ Core Trading Logic: ​Execute automatic Buy and Sell trades using high-probability entry signals. ​Target a strict 90% theoretical win-rate structure through
i want to fix my gold martingale bot MT5. RSI 14 ENTRY 30 BUY 70 SELL Lot 0.02 0.04 0.07 TP 150 for all SL 90 30 30 once total daily profit is 200$ stop trading stop trading once 2 consecutives total losses stop trading if spread exceeded 30 and between hour 15 & 17 PM Move SL to breakeven point once the profit exceeded 50 from from breakeven thanks
MarketMind Breakout Pro XAUUSD H1 — Donchian Breakout EA Project type: Personal EA development and backtesting Platform: MetaTrader 5 Instrument: XAUUSD Timeframe: H1 Strategy: Donchian Channel breakout with EMA 200 Project overview This project evaluates a Donchian breakout trading strategy for XAUUSD on the H1 timeframe. The system uses channel-based breakout conditions and an EMA 200 trend filter. Historical
The purpose of this order is ONLY to test and implement my H1 POI (Point of Interest) identification logic correctly. I am not requesting the complete EA at this stage. I will provide the exact rules for identifying the H1 POI after selecting the developer. The developer must convert those rules into clear, deterministic MQL5 logic. Requirements: Analyze H1 candles according to the rules I provide. Identify and mark
Title: Fully Automatic MT5 Trading Bot (Expert Advisor) with Risk Management I want a fully automated trading robot (Expert Advisor) for MetaTrader 5, written in MQL5. The bot must automatically analyse market data, identify trading opportunities, execute BUY and SELL orders, manage open positions, and close trades according to predefined rules without requiring manual confirmation for each trade. Requirements

プロジェクト情報

予算
100+ USD