Adding trailing stop loss to four expert advisors MetaTrader 5

MQL5 Asesores Expertos

Tarea técnica

Hello, My budget is $30, for all job

I have four expert advisors on MetaTrader 5. I want to add a trailing stop loss to all four experts in the same way, based on the stop loss percentage.

For example,

If I set the trailing stop loss percentage in the input menuto 100%, and the stop loss to 500 points, this means that if the price moves 10 points in profit, then the stop loss will also move 10 points, and so on.

If I set the trailing stop loss percentage in the input menuto 200%, and the stop loss to 500 points, this means that if the price moves 10 points in profit, then the stop loss will also move 5 points, and so on.

If I set the trailing stop loss percentage in the input menuto 50%, and the stop loss to 500 points, this means that if the price moves 10 points in profit, then the stop loss will also move 20 points, and so on.

I want the trailing stop loss to move with every price tick.

I want to be able to enable or disable trailing stop loss.

=================================================

Add to input menu:

TSL = True/False

TSL percentage = 100% (Or any percentage I want)


I want the code to be free of errors and warnings.



Han respondido

1
Desarrollador 1
Evaluación
(7)
Proyectos
9
0%
Arbitraje
2
0% / 100%
Caducado
0
Libre
2
Desarrollador 2
Evaluación
(240)
Proyectos
301
28%
Arbitraje
32
25% / 63%
Caducado
9
3%
Trabajando
3
Desarrollador 3
Evaluación
(15)
Proyectos
34
24%
Arbitraje
4
0% / 50%
Caducado
2
6%
Trabaja
4
Desarrollador 4
Evaluación
(321)
Proyectos
499
19%
Arbitraje
33
42% / 30%
Caducado
32
6%
Trabajando
5
Desarrollador 5
Evaluación
(1269)
Proyectos
1689
49%
Arbitraje
52
71% / 12%
Caducado
37
2%
Libre
6
Desarrollador 6
Evaluación
(623)
Proyectos
977
46%
Arbitraje
32
38% / 34%
Caducado
96
10%
Trabaja
Ha publicado: 6 ejemplos
7
Desarrollador 7
Evaluación
(32)
Proyectos
49
73%
Arbitraje
4
50% / 0%
Caducado
0
Libre
8
Desarrollador 8
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
9
Desarrollador 9
Evaluación
(269)
Proyectos
397
27%
Arbitraje
38
39% / 50%
Caducado
1
0%
Trabaja
10
Desarrollador 10
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
11
Desarrollador 11
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
12
Desarrollador 12
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
13
Desarrollador 13
Evaluación
Proyectos
1
0%
Arbitraje
0
Caducado
1
100%
Libre
14
Desarrollador 14
Evaluación
(23)
Proyectos
24
67%
Arbitraje
0
Caducado
1
4%
Trabaja
Ha publicado: 2 ejemplos
15
Desarrollador 15
Evaluación
(3)
Proyectos
1
100%
Arbitraje
3
0% / 100%
Caducado
0
Libre
16
Desarrollador 16
Evaluación
(499)
Proyectos
743
56%
Arbitraje
47
32% / 30%
Caducado
119
16%
Trabaja
Ha publicado: 1 ejemplo
17
Desarrollador 17
Evaluación
(265)
Proyectos
595
35%
Arbitraje
64
20% / 58%
Caducado
147
25%
Libre
Ha publicado: 1 artículo, 22 ejemplos
18
Desarrollador 18
Evaluación
(1)
Proyectos
2
0%
Arbitraje
2
0% / 100%
Caducado
0
Trabaja
19
Desarrollador 19
Evaluación
(51)
Proyectos
69
35%
Arbitraje
4
25% / 75%
Caducado
0
Libre
20
Desarrollador 20
Evaluación
(329)
Proyectos
394
53%
Arbitraje
20
55% / 15%
Caducado
28
7%
Trabajando
21
Desarrollador 21
Evaluación
(151)
Proyectos
189
57%
Arbitraje
10
80% / 0%
Caducado
0
Libre
Ha publicado: 1 ejemplo
22
Desarrollador 22
Evaluación
(516)
Proyectos
784
63%
Arbitraje
33
27% / 45%
Caducado
23
3%
Libre
Ha publicado: 1 ejemplo
23
Desarrollador 23
Evaluación
(1)
Proyectos
1
100%
Arbitraje
0
Caducado
0
Libre
24
Desarrollador 24
Evaluación
(1)
Proyectos
1
0%
Arbitraje
0
Caducado
0
Trabaja
25
Desarrollador 25
Evaluación
(59)
Proyectos
81
43%
Arbitraje
27
11% / 70%
Caducado
8
10%
Libre
26
Desarrollador 26
Evaluación
(1)
Proyectos
1
0%
Arbitraje
0
Caducado
0
Libre
Ha publicado: 2 artículos
27
Desarrollador 27
Evaluación
(4)
Proyectos
3
33%
Arbitraje
2
0% / 100%
Caducado
0
Libre
28
Desarrollador 28
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
29
Desarrollador 29
Evaluación
(2)
Proyectos
2
0%
Arbitraje
2
0% / 50%
Caducado
1
50%
Trabajando
30
Desarrollador 30
Evaluación
(18)
Proyectos
22
18%
Arbitraje
0
Caducado
1
5%
Libre
31
Desarrollador 31
Evaluación
(5)
Proyectos
4
0%
Arbitraje
2
50% / 50%
Caducado
2
50%
Libre
32
Desarrollador 32
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Trabaja
33
Desarrollador 33
Evaluación
(52)
Proyectos
57
60%
Arbitraje
4
0% / 25%
Caducado
1
2%
Libre
34
Desarrollador 34
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
Solicitudes similares
I am looking for an experienced MQL5 developer to convert a complex TradingView Pine Script (will provide the script from tradingview) into a fully automated MT5 Expert Advisor -bot. The TradingView script includes: Market Structure (BOS, CHoCH, Swing BOS) Strong / Weak High & Low Equilibrium (Premium / Discount zones) Volumetric Order Blocks Fair Value Gaps (FVG / VI / OG) Accumulation & Distribution zones Equal
Ai 1. Trend identify up or down through lMA 50 at daily time frame ( if market stay above LMA 50 is called up trend & stay down lMA is called Down trend. 2. Entry :for uptrend buy & down trend sell though cross over lMA 50by21 & 21 by 14or7 ( customisable )1m or 5m flexible time 3. Daily target Floating loss (DD) if over no entry as % - close all 4. TP, break even after 2 pips (customisable)& SL option
Scalper in life 100+ USD
//+------------------------------------------------------------------+ //| XAUUSD FULL AUTO SAFE BOT MT5 | //| Converted from Pine Script v5 | //+------------------------------------------------------------------+ #property copyright "Converted by ChatGPT" #property version "1.00" #property strict #include <Trade/Trade.mqh> CTrade trade; // === INPUT === input double LotPercent =
Zoroe 30+ USD
//+------------------------------------------------------------------+ //| XAUUSD H1 Auto Trading Bot | //| Works on MT5 Desktop / VPS | //+------------------------------------------------------------------+ #property strict input double LotSize = 0.1; input int StopLossPoints = 200; input int TakeProfitPoints = 400; input int MagicNumber = 777; int emaHandle;
Trading robots are programs, which operate according to underlying algorithms. An algorithm is a set of actions that need to be performed in response to certain events. For example, the most common task in algo trading is the identification of the "New bar" event. When the event occurs, the robot checks the emergence of trading signals and acts accordingly. Before you decide to program or order a trading robot, you
// Add this to your EA after ExportState() function void SendToBase44(const string state, const string dir, double entry, double sl, double tp) { string url = " https://preview-sandbox--ee0a32a725b788974de435e8cef40b7a.base44.app/api/functions/receiveEAState "; string headers = "Content-Type: application/json\r\n"; string json = "{" "\"symbol\":\""+_Symbol+"\","
I need a prop firm ready EA that can make around 3% monthly. I am not expecting miracles, If you want to apply please send me backtesting stats from at least few years. 1 year is not enough, I am ready to sign in an agreement today
Develop a Gold scalper based on the arrow indicator in MT5. Buy at up arrow and close with the profit / Trailing Stop profit. If not profit, then close at the opposite sell arrow with profit/loss. Sell at down arrow and close with the TP / Trailing Stop profit. If not profit, then close at the opposite buy arrow with profit/loss. EA Properties: Lot Size: 0.1 Stop Loss: 0 / 50 Take Profit: 100 Trailing Start: Trailing
Hi, looking for an EA for passing prop accounts, profit target is 2,5% weekly with low drawdown, strict risk management, session filters, spread control, automatic stop, daily loss limits, VPS compatibility, reporting, and consistent performance across EURUSD in market conditions
We already have the strategy. Need an MT4 Expert Advisor to set up on MT4 platform from MQL5. Tasks 1.Check why AutoTrading/EA is not executing trades 2. Verify MT4 settings 3. Install/compile an EA file if needed and confirm it runs

Información sobre el proyecto

Presupuesto
30+ USD

Cliente

(14)
Encargos realizados15
Número de arbitrajes0