Script to close all pending orders?

To add comments, please log in or register
gcgipson
488
gcgipson  

Is there a script to close all PENDING (not open) orders? Thanks!

Sergey Golubev
Moderator
115564
Sergey Golubev  
Yoda_Glenn:
Is there a script to close all PENDING (not open) orders? Thanks!

- EA to delete pendind orders on specify pairs only: original thread.

- EA to close the orders on specify pairs only: thread.

- EA to close open trades based on equity or account floating loss reaches: thread.

Ralph Van Cleve
184
Ralph Van Cleve  

EDIT: newdigital beat me to it.

William Austin
134
William Austin  

Delete ALL Pending orders

Yoda_Glenn:
Is there a script to close all PENDING (not open) orders? Thanks!

Try this. I modified the "Delete Pending Order" script so that it would delete all pending orders for all pairs.

101dodol
8
101dodol  

Please Help...

I want to know how to closing the trade by not using the target profit or trailling stop but stoping by the indicator... for example for sell secenario stop sell when Indicator of RSI touch the oversold level and vice versa...

thanks b4....

MrMarketz
545
MrMarketz  

Those are called "EA's". You're new right? Welcome to the Meat Grinder.

101dodol
8
101dodol  
Mr.Marketz:
Those are called "EA's". You're new right? Welcome to the Meat Grinder.

Yes Mr. Markets..., thanks.

forexaim
47
forexaim  

thanks for your help mr. marketz

Neferius
6
Neferius  

Four years later, someone had the decency to Post this...

waaustin:
Try this. I modified the "Delete Pending Order" script so that it would delete all pending orders for all pairs.

I don't know if waaustin meant it as a joke or not, but the script kept returning an alert in loop and I had to close the platform to shut it up.

I took a look at the code, blinked in confusion Error={insufficient programing skill} ...then I took a look at the standard "delete_pending.mq4" he said he had based this upon, and noticed what was going-on.

So I replaced

if(result == false)

{

Alert("Order " , OrderTicket() , " failed to close. Error:" , GetLastError() );

Sleep(3000);

} [/CODE]

with

[CODE] if(result == false)

{

Alert("Order " , OrderTicket() , " All Pending Orders Removed " );

break;

}

Problem Solved

Not bad for a Newbie IMO

To add comments, please log in or register