Requested Modifications for MT5 EA

MQL5 Asesores Expertos

Trabajo finalizado

Plazo de ejecución 26 días
Comentario del Cliente
Trabajo perfecto. el desarrollador fue muy paciente y realizó todos los cambios necesarios para que el proyecto saliese correctamente
Comentario del Ejecutor
Excelente cliente, respetuoso y que sabe lo que quiere, espero seguir trabajando con el en el futuro

Tarea técnica

I have an Expert Advisor (EA) already operating on MetaTrader 5, and I would like you to implement some specific modifications. Below, I describe how the EA currently works, followed by the exact instructions that need to be implemented to achieve the desired behavior.


1. Current Functionality of the EA (HARD10 Base)

  • The EA opens a buy or sell trade on initialization, depending on the parameter OperarEnVenta ( true = sell, false = buy).

  • The trade opens with a LoteInicial (initial lot size), and SL/TP values in pips, all defined via inputs.

  • If the trade closes by Stop Loss (SL):

    • The lot size is multiplied by MultiplicadorLotes for the next trade.

    • A counter of consecutive SLs is incremented.

    • If the maximum number of consecutive SLs ( MaximosSLseguidos ) is reached, the EA stops trading.

  • If the trade closes by Take Profit (TP):

    • The lot size resets to the initial value.

    • The SL counter resets.

    • If DetenerTrasTP = true , the EA stops trading.

  • If the trade is closed manually:

    • The lot size and counters reset as well.

  • The EA uses a MagicNumber to filter only its own trades.

  • All this logic runs independently on each chart/symbol where the EA is attached.


2. Requested Modifications

a) Activation by Hour and Minute

I want the EA to remain inactive for opening new trades until a user-defined hour and minute is reached. However, it must still detect closed trades before that time in order to maintain synchronized logic across symbols.

Inputs to add:

input bool ActivarHoraDeInicio = true; input int HoraActivacion = 9; input int MinutoActivacion = 30;

  • If ActivarHoraDeInicio = true , the EA must wait until the specified time to begin opening trades.

  • Before activation, it must still:

    • Monitor closed trades,

    • Update the SL counter,

    • And adjust lot size or SL/TP values accordingly.

  • If the EA is loaded after that time, it should activate immediately.

b) SL/TP Expansion After Consecutive Losses 

I would like a feature that increases the SL and TP size after a specified number of consecutive losing trades.

Inputs to add:

input bool ActivarSLTPExpandido = true; input int SLsAntesDeExpandir = 5; input double FactorSLTPExpandido = 1.5; // Example: multiplies SL and TP by 1.5

  • If ActivarSLTPExpandido = true and the EA accumulates SLsAntesDeExpandir or more consecutive losses:

    • The next trade must use an SL and TP multiplied by FactorSLTPExpandido .

  • If a TP is reached or the trade is closed manually:

    • The lot size, SL, and TP return to normal values.

c) Shared State Across Multiple Charts

Currently, if the EA is attached to two different charts (e.g., EURUSD and XAUUSD), each instance operates independently. I want to change that.

Objective: All instances of the EA (even on different symbols) must share the same progression logic and multiplier.

Example:

  • On the EURUSD chart, the EA has executed 3 consecutive SLs, increasing the lot size.

  • On the XAUUSD chart, the EA is waiting for its scheduled activation time.

  • Once the EA activates on XAUUSD, it should:

    • Detect that previous SLs occurred in another symbol,

    • And resume the logic using the correct lot size and SL/TP multiplier.

Technical notes:

  • You can use global variables, files, or any clean and robust method to share this state.

  • It’s essential that each EA instance knows the current global progression state before executing any trade.


3. General Requirements

  • Deliver clean, efficient code that compiles without errors.

  • Final delivery must include the .mq5 source file.

  • If any request is not feasible exactly as described, I’m open to your technical suggestions.






Archivos adjuntos:

MQ5
HARD10.mq5
5.8 Kb

Han respondido

1
Desarrollador 1
Evaluación
(2)
Proyectos
0
0%
Arbitraje
2
0% / 50%
Caducado
0
Libre
2
Desarrollador 2
Evaluación
(429)
Proyectos
628
54%
Arbitraje
30
53% / 23%
Caducado
6
1%
Trabajando
3
Desarrollador 3
Evaluación
(1)
Proyectos
2
0%
Arbitraje
1
0% / 100%
Caducado
0
Libre
Ha publicado: 2 ejemplos
4
Desarrollador 4
Evaluación
(44)
Proyectos
53
38%
Arbitraje
8
13% / 38%
Caducado
8
15%
Trabaja

Información sobre el proyecto

Presupuesto
30 - 100 USD