"if done the do this" script that closes pending orders once profit is reached

 
Hello everyone, i came across a function offered on one of the trading platforms. it is something like this : once an open order has reached take profit the pending order will be closed for that chart. has anyone come across such a script for mt4? help this poor soul manage his trades :D
 
cryptex:
Hello everyone, i came across a function offered on one of the trading platforms. it is something like this : once an open order has reached take profit the pending order will be closed for that chart. has anyone come across such a script for mt4? help this poor soul manage his trades :D

Hello you,

so simply said you want someone else to create or search that script, well no way if there is no attempt yours learning how to code, that i will help

about the function for closing the pending trade well it is named OrderDelete()

 
@devries : that was not my intention. i was merely asking if there is such a script. i searched the mql database in hope of finding such a script but failed to find any. if there is something of that kind that is freely available with no restrictions it would save me some time and coding. which is why i thought of asking it in forums hoping that the more frequent users might have come across such a script. if is not, well then i will have to code one on my own :)
 
cryptex:
@devries : that was not my intention. i was merely asking if there is such a script. i searched the mql database in hope of finding such a script but failed to find any. if there is something of that kind that is freely available with no restrictions it would save me some time and coding. which is why i thought of asking it in forums hoping that the more frequent users might have come across such a script. if is not, well then i will have to code one on my own :)


come on try to code not so difficult to do

looks like you have to find a pending then check all open trades if there is a buy or sell with same magicnumber and same symbol

if not delete the pending

Reason: