EA close all positions at profit target

 

Hi looking for help with an ea. I have an ea that closes all positions on a chart once a certian profit has been achieved but the problem is the profit setting is in $ and i want it in pips.

I basically am using it to delete any pending hedge orders i have setup a couple of worries i have is if i think you call it slippage occurs and instead of making +20 pips end up with +12 pips then it won't close the pending hedge order.

The other problem is i may enter that market again the same day would the EA think i have already made my profit so close all trades. 

hope this makes sense I am fairly new to this.

 I have everthing else in place but am just worried that if i go off to bed and my life order hits take profit and then the market reverses for some reason during the night it would then activate my pending hedge order which could be dangerouse espicially if the market reversed again.   

Reason: