Hello programming experts. This simple EA enables multiple (usually hedged) trades to be closed when an inputed profit goal is attained. It is potentially helpful.

But as with other simple EA's of its kind I've examined, when the profit goal is attained, it is going to start to close positions, but then it will stop closing positions if that floating profit drops below the goal level (simple to happen if the price is shifting or the adverse trades would be the last to be shut ). . So it tends to leave 1 or two trades still open. . And then will shut them only if the profit goal returns again... maybe not a good situation for hedged trades as you stay exposed to the market one way or the other. .

Can anybody fix this: Once the profit goal is hit it should shut 100% of open trades and dismiss any change to that floating profit level during the implementation process.

If anyone can resolve this from the goodness of their heart then well and good, but if someone with a good background on FF (multiple vouchers) wants me to pay them a small sum for their services then please send me a PM. Thanks!
https://www.cliqforex.com/attachment...8957123437.mq4