Script close all orders

 

Hi,

Does anyone have a script (MT4) that closes all open orders at market price without pronpt?

Thanks

Paulo

 
paulosilva555:
Hi,

Does anyone have a script (MT4) that closes all open orders at market price without pronpt?

Thanks

Paulo

Should be here.

 

Thanks for redirecting to the correct post!

 

Here's one I've been using for years. See attachment.

Files:
closeall.mq4  2 kb
 

Script to close all open orders

Hi Ms Mel - thank you for posting that script. I couldn't get it to do anything though. I tried to open it from my scripts folder but nothing happens - won't even come up. Any ideas what's wrong?

Thank you.

 
PIPPILGRAM:
Hi Ms Mel - thank you for posting that script. I couldn't get it to do anything though. I tried to open it from my scripts folder but nothing happens - won't even come up. Any ideas what's wrong? Thank you.

That is because it does not go in your scripts folder. It is a file which goes in your "experts" folder.

 

Close all

Hi Domi - thanks for the reply! I will try it!!!

 

Script to close most recent order only

Ms_Mel:
Here's one I've been using for years. See attachment.

Hello, I a an mT newbie. I scale in and out of swings and would like very much a script that simply closes the most recent position put on.

If I had three positions; this script would take off the most recently added position, then use it again for the next piece, and then use this same script once more to take off the last position.

For me this would all be on the same currency pair, if that makes a difference.

Although I know how to load a script and assign a hot key; I possess no scripting skills whatsoever.

I searched around thinking such a script would already exist. Any help will be met with genuine gratitude! .

Thank you,

Andy

 

closing all position

Hi there, I have been trying for a while now and get the same error, I am trying on Alpari Uk demo build 222, I have done exactly the following:

paulosilva555,

1 - Download the file.

2- Copy it to \experts\scripts

3- Open it in MetaEditor (double click the file).

4- Compile it (F5).

5- You will find in the scripts list in the navigator window (image attached).

6- Double click the script or drag it to the active chart.

but still get the error mentioned below, can anyone help? I'm desperate to get this working!!

Many thanks for any help given, much appreciated