Tâche terminée
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Spécifications
Hello
I have an indicator that executes an alert for buy and sell order such as "2022.09.02 22:45:01 INDIV1 XAUUSD,M5: Alert: #INDIV1 "BUY" Signal on XAUUSD M5 @ 1711.77! or 2022.09.05 03:30:01.005 INDIV2 XAUUSD,M15: Alert: INDIV2 XAUUSD M15 2022.09.05 04:30 Buy Entry at: 1712.28
the indicator also draws TP profit lines on the chart labeled such as TP1, TP2, TP3 , TP 1, TP 2, TP 3
the indicator also draws SL stop loss lines on the chart labeled as SL, SL1, SL2, SL3 , SL 1 , SL 2, SL 3
I need an EA that will execute an order based on the alert BUY/SELL of the indicator,
The EA should also set the TP/SL level based on the indicator lines drawn on the chart, this will be determined in the EA parameters for example TP1 true/ TP2 False
The EA must function this way if there is a win it will keep opening the same lot size, if there is a loss the next trade will be based on the multiplier value , Example: lot size 0.01 multiplier 2, if the TRADE wins keep opening the same lot size (0.01) , if second trade loose next trade to open lot size 0.01x2 =0.02 if the value of multiplayer is 2 , if third trade loose next trade open lot size based will be based on multiplayer value in the Ea. Once the EA wins a trade after a loss the next opening trade will revert back to default lot size : 0.01 .
The EA will use the default lot size, and will only start using the multiplier value if there is a loss or a series of losses.
To clarify if trade 1 loose, use multiplier value for trade 1 for next trade , if trade 2 is a loss use multiplayer value for trade 2, if trade 3 is a loss use multiplayer value for trade and so on. Do remember if a trade wins we will not use a multiplier for the next trade.
Note in the EA parameter there should be a parameter that will enable/disable the usage of the multiplier
The EA parameters:
Lot size:
Use multiplier: True/False
Trade 1 Multiplier:
Trade 2 multiplier:
Trade 3 Multiplier:
Trade 4 Multiplier:
Trade 5 Multiplier:
Trade 6 multiplier:
Trade 7 multiplier:
Trade 8 multiplier:
Trade 9 multiplier:
Trade 10 multiplier:
Trade Monday: on/off
Trade Tuesday: on/off
Trade Wednesday : on/off
Trade Thursday: on/off
Trade Friday : on/off
Set TP Value TP1/ TP 1: on/off
Set TP Value TP2/ TP 2 : on/off
Set TP Value TP3/ TP 3: on/off
Set SL Value SL1/ SL 1: on/ off
Set SL Value SL2/ SL 2: on/off
Set SL Value SL : on/off
Magic number: