Script to close all pending orders?

 

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

 
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.

 

EDIT: newdigital beat me to it.

 

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.

 

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....

 

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

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

Yes Mr. Markets..., thanks.

 

thanks for your help mr. marketz

 

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

Reason: