Please help with this EA

 

I am not that good at programming, so i am asking for your guys' help.

This little ea takes net profit on all of your open positions. Once the profit lever is reached, it closes all open positions.

I was wondering if any one could add a function so it could close PENDING orders with the rest of "live" orders, once the net profit is reached.

Thanks.

Files:
closebypl.mq4  5 kb
 
ARBAT:
I am not that good at programming, so i am asking for your guys' help.

This little ea takes net profit on all of your open positions. Once the profit lever is reached, it closes all open positions.

I was wondering if any one could add a function so it could close PENDING orders with the rest of "live" orders, once the net profit is reached.

Thanks.

I've attached an edit with the 4 lines added to make it close all kinds of orders. Not tested, but I won't offer support; it doesn't hurt asking, but it depends on how I feel

Files:
 

Thanks it will be tested next week.

 

ARBAT,

The EA on post#2 has bugs in it.

I have edited the EA to do what was asked in the first post.

I have checked the version I modified in live account to make sure it works.

Files:
 
raj:
ARBAT,

The EA on post#2 has bugs in it.

I have edited the EA to do what was asked in the first post.

I have checked the version I modified in live account to make sure it works.

I appreciate that.

Reason: