Add smart trailing

MQL5 Esperti Forex

Lavoro terminato

Tempo di esecuzione 31 giorni

Specifiche

Hello,

I have the EA source code ready, and it is open-source/editable. I need you to add and improve the trailing stop logic with two clear inputs:

1. Trailing Start
2. Trailing Step

Please implement it carefully and accurately.

Trailing Start  
This is the profit distance where the EA starts activating the trailing stop.

Example:
If Trailing Start = 35 pips, the EA should not move the Stop Loss until the trade reaches +35 pips profit.

Trailing Step  
This is the step distance used to move the Stop Loss after trailing starts.

Example:
If:
Trailing Start = 35 pips  
Trailing Step = 12 pips  

Then the logic should be:

- At +35 pips profit → move SL to around +5 pips profit
- At +47 pips profit → move SL to around +17 pips profit
- At +59 pips profit → move SL to around +29 pips profit
- At +71 pips profit → move SL to around +41 pips profit
- At +83 pips profit → move SL to around +53 pips profit

The Stop Loss should always trail behind the current profit by the selected step distance.

Very important requirements:

- The EA must only move the Stop Loss forward in profit.
- The EA must never move the Stop Loss backward.
- The trailing must work correctly for both Buy and Sell trades.
- The EA must calculate pips/points correctly on XAUUSD and XAUUSDm, especially on Exness.
- The trailing must continue working correctly after partial close.
- If partial close is enabled, the EA should close 50% first, then manage the remaining position with break-even and trailing stop.
- Avoid repeated unnecessary SL modifications on every tick to prevent errors, freezing, or broker rejection.
- Please make sure the logic respects broker stop levels and minimum distance rules.
- If a manual Stop Loss already exists, the EA should respect it and only improve it when the trailing condition is reached.
- Please keep the existing EA features and only add/improve this trailing logic without breaking the current workflow.

Suggested default settings for XAUUSD:

Partial Close Trigger = 30 pips  
BreakEven Trigger = 30 pips  
BreakEven Offset = 5 pips  
Trailing Start = 35 pips  
Trailing Step = 12 pips  

Also, if you think there is a better professional improvement for gold trading, such as ATR-based trailing, spread filter, or news/time filter, please suggest it before implementation.

Please test the EA carefully on XAUUSD/XAUUSDm to make sure the trailing stop works exactly as described and without execution errors.

Con risposta

1
Sviluppatore 1
Valutazioni
(2)
Progetti
2
0%
Arbitraggio
0
In ritardo
0
Gratuito
2
Sviluppatore 2
Valutazioni
(282)
Progetti
353
29%
Arbitraggio
37
27% / 65%
In ritardo
10
3%
Caricato
3
Sviluppatore 3
Valutazioni
(213)
Progetti
286
47%
Arbitraggio
27
59% / 37%
In ritardo
36
13%
Gratuito
4
Sviluppatore 4
Valutazioni
(111)
Progetti
183
25%
Arbitraggio
24
17% / 75%
In ritardo
16
9%
Gratuito
5
Sviluppatore 5
Valutazioni
Progetti
0
0%
Arbitraggio
1
0% / 100%
In ritardo
0
Gratuito
6
Sviluppatore 6
Valutazioni
(23)
Progetti
34
53%
Arbitraggio
1
100% / 0%
In ritardo
1
3%
Gratuito
7
Sviluppatore 7
Valutazioni
(4)
Progetti
7
57%
Arbitraggio
1
100% / 0%
In ritardo
0
Gratuito
8
Sviluppatore 8
Valutazioni
(465)
Progetti
815
49%
Arbitraggio
75
21% / 51%
In ritardo
142
17%
Gratuito
9
Sviluppatore 9
Valutazioni
(2346)
Progetti
2952
63%
Arbitraggio
125
44% / 26%
In ritardo
429
15%
Gratuito
10
Sviluppatore 10
Valutazioni
(85)
Progetti
174
44%
Arbitraggio
3
100% / 0%
In ritardo
5
3%
Gratuito
Pubblicati: 1 codice
11
Sviluppatore 11
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
12
Sviluppatore 12
Valutazioni
(24)
Progetti
32
38%
Arbitraggio
4
50% / 25%
In ritardo
5
16%
In elaborazione
13
Sviluppatore 13
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
14
Sviluppatore 14
Valutazioni
(75)
Progetti
111
50%
Arbitraggio
26
31% / 50%
In ritardo
9
8%
Gratuito
Pubblicati: 1 articolo
15
Sviluppatore 15
Valutazioni
(225)
Progetti
285
41%
Arbitraggio
15
13% / 47%
In ritardo
67
24%
Gratuito
16
Sviluppatore 16
Valutazioni
(9)
Progetti
16
19%
Arbitraggio
2
0% / 50%
In ritardo
3
19%
Caricato
17
Sviluppatore 17
Valutazioni
(6)
Progetti
13
62%
Arbitraggio
1
0% / 100%
In ritardo
2
15%
In elaborazione
18
Sviluppatore 18
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
19
Sviluppatore 19
Valutazioni
(319)
Progetti
571
35%
Arbitraggio
83
31% / 45%
In ritardo
206
36%
Gratuito
20
Sviluppatore 20
Valutazioni
(7)
Progetti
6
0%
Arbitraggio
4
25% / 75%
In ritardo
2
33%
Gratuito
21
Sviluppatore 21
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
22
Sviluppatore 22
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
23
Sviluppatore 23
Valutazioni
(258)
Progetti
269
29%
Arbitraggio
2
50% / 0%
In ritardo
3
1%
In elaborazione
Pubblicati: 2 codici
24
Sviluppatore 24
Valutazioni
(279)
Progetti
378
72%
Arbitraggio
19
32% / 47%
In ritardo
16
4%
Gratuito
Pubblicati: 15 codici
25
Sviluppatore 25
Valutazioni
(28)
Progetti
34
35%
Arbitraggio
0
In ritardo
2
6%
In elaborazione
26
Sviluppatore 26
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
Ordini simili
1. Overview: I need an Expert Advisor (EA) for MT5 called "Gold Sniper" specifically optimized for XAUUSD (Gold). The EA should be a sniper scalper that takes high-probability trades on M5 and M15. It must work on any broker with low spread. 2. Strategy Logic: The EA should combine 3 confirmations: a) Trend Filter: EMA 50 & EMA 200. Only Buy if EMA 50 > EMA 200, only Sell if EMA 50 < EMA 200. Sniper Entry: Use RSI
I need an experienced trading-data specialist who can help me obtain 3–4 years of historical market data compatible with NinjaTrader 8 . The data will be used for trading strategy development, backtesting, and analysis
I am looking for an experienced MQL5 developer to develop a custom Expert Advisor (EA) for MetaTrader 5, primarily for XAUUSD (Gold) . The EA will be based on a proprietary price-action trading strategy that I have already defined. The objective is to translate this strategy into a fully automated, precise and reliable trading system without modifying its underlying logic. The strategy involves specific
Need aggressive M1 gold scalper rewrite of Dev3 + 8 strategies. INPUTS: RiskPercent=3, TP=400, SL=300, MaxTrades=6, Mode=BOTH, DailyProfit 15%, DailyLoss -10% LOT = Balance * RiskPercent / 1000 - works for Cent R350 and $1000. 8 STRATEGIES any true = open instantly, check 1 sec: 1 EMA8/21 cross 2 RSI14 30/70 + engulf 3 Engulfing candle 4 BB 20,2 breakout 5 FVG grab M1 6 M5 trend + M1 entry 7 Wick rejection >2 8
I need an experienced MQL5 developer to build a prototype MT5 Expert Advisor called RiskLock. The software should enforce user-defined trading risk rules before trades are executed. It should support risk percentage or fixed monetary risk, calculate position size using account equity, entry price, stop loss, tick value and contract specifications, block or reduce oversized trades, and include daily loss limits
Project Overview I have an existing MT5 Expert Advisor (EA) written in MQL5. The source code ( .mq5 ) will be provided. The underlying strategy is a trend-following system that performs well during trending market conditions, but requires professional quantitative research to improve its ability to identify and avoid highly sideways/range-bound market conditions. The objective of this project is not to build a new EA
Most of the expert is already coded . Create a panel to show the Ratio for the Range . Trigger is based on ratio . Show Distribution / project starts after we clear Distribution
Expert Advisors 300+ USD
double CRiskManager::CalculateLotSize(double slPoints) { double balance = AccountInfoDouble(ACCOUNT_BALANCE); double riskMoney = balance * (m_riskPercent / 100.0); double tickValue = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_VALUE); double tickSize = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_SIZE); double pointValue = tickValue / tickSize; double lot = riskMoney / (slPoints * pointValue);
i share my strategy i need a bot trending bot fo mt5 . i attached the photo with this it help to make bot. it basicly 1 hours time frame base. i try but failed to make it
Title: Simple background trading bot for my Oanda account (v20 REST API) Overview Hi, I need a simple, lightweight event based standalone trading bot that connects directly to my Oanda account using broker’s standard REST API (V20 account) via VPS The bot just needs to look at group of 5 currency pairs (manually selectable and adjustable) in different 4 baskets, do some basic percentage math every period, and place

Informazioni sul progetto

Budget
30 - 40 USD
Scadenze
da 1 a 2 giorno(i)