The EA opens a limit order at the place of the newly closed profitable order.

All parameters, lot SL, TP and direction are identical to the closed one.

In the parameters:

TimeStart = D’2019.07.14 00:00′;//time from which we control closed trades. (trades closed earlier will not be taken into account by the EA)

delta = 5;//allowable trade offset (if the pending order is shifted by several points, the repeated order will not be placed)

An example of the work.

Open position 1.1234 after its closing by profit, a limit order with the same parameters will be placed on the price 1.1234.

If the position is closed at a loss, the EA will not open orders.

In the tester, the EA opens two buy and sell orders so that you can clearly see its operation.

Cm-ReopeningAfterProfit
Cm-ReopeningAfterProfit
cm-ReopeningAfterProfit_2.mq4
Version: 1
6.1 KiB
1218 Downloads
Details
Cm ReopeningAfterProfit 2.2
Cm ReopeningAfterProfit 2.2
cm-ReopeningAfterProfit-2.2.mq4
6.5 KiB
1459 Downloads
Details