Specification
My EA is a multipair EA. That mean, he trade 10 pairs at same time and control DD for whole Account.
If DD is reached, he close a trade with the highest loss and the second strategy open immediately a trade in opposite way from this highest loss trade. In low volatile days it could be, that DD will not reached and the trade ends in SL.
The job will be to add a third strategy if trade ends in SL. The modification is very simple. If trade ends in SL EA open immediately a new trade in same direction or in opposite direction. this strategy should set to "true/false" as well the way of direction! same direction = true, opposite direction = false. This trade should have to set Lotsize, TP, SL and Magicnumber.
The second strategy is my "reopen" tool. this works very simple. if predefined DD is reached, EA check whole account and detect which trades have the highest loss. and this trade will be close immediately. the EA "reopen" a new trade immediately in opposite direction. the change for this strategy is, that EA have the option to set a new trade in form a buy/sell stop. eg. EA open a "reopen" buy trade. this trade run 20pips in wrong way, EA open at predefine distance a sell trade. the TP for the Sell trade is exactly same like SL from Buy trade. if this ends not in TP from Sell trade, EA set a new stop trade at same level like initial "reopen" trade and so on. for this strategy I should have a multiplier and to set the distance.
The Multiplier works on the basis of the lotsize from the reopen trade. if multiplier is set to 2 and the lotsize from reopen trade is 0.2 lot, EA set a stop order with 0.4 lot at predefine distance. the distance is calculated from the value of the reopen trade. if I set Distance eg. 20 pips and reopen trade is open at 1.6020 and is a buy trade, EA set a short stop order with 0.4 lot at 1.6000. I should can set as well how often EA do this "Ping-Pong". eg set to 3, that mean, EA set 3 times new stop order (only in case that no TP is reached).