İş tamamlandı

İş Gereklilikleri
Specification
Hello, I would like to have an EA, which takes control over trades opened by another EA in mt4.
the EA control analyzes open trades that are negative and performs the following actions:
1. If an open order on a pair loses more than 80 pips (external parameter), a trade is opened with double the lotage (external parameter matriangale) and in the same direction as this one.
2. The two orders are closed when the second order exceeds the first in profit, with a take profit of 0.15 (external parameter)
3. if the second open order does not exceed the first in profit, wait 80 pips in loss on the second order to open another new order with double the lot of the second.
4. close the orders when the third exceeds the profit of the first and second and the Take profit is reached
5. The EA control should only modify the order of the pair where it is added, for example if it is to control GBPUSD it only modifies this pair.
6. If the account margin exceeds 40% ( external parameter) , no new trades are opened.
7. to execute the first matriangale, the account margin must not exceed 30% (external parameter), in this case the order is closed when it reaches 80 pips (external parameter)
External parameters for EA control: slippage: 30 TakeProfit: 0.15 Matriangale: 2 (maximum attempts to open order with double the lotage) pips of lost orders: 80