Downloads

 
 

We are going to build your: Expert Advisors - Indicators - Libraries - Scripts - MetaTrader Extensions (c++ DLLs)

We can convert any code (MQLII - EL - VT ) to MQL4 and we can debug your exiting code.

 

Search

 

 
Web www.xpworx.com
 
 

Close All purposes script:

I'm getting a lot of messages asking me about a script that closes all the opened trades!

This script is for all prurposes closing options which you can use it to close your instant orders (the orders you open at the current market price which they are the normal orders and the opposite of pending orders), pending orders and more!
 

CloseAll script:


The script is all purposes closing script which means you can decide what type orders you want to close; you can choose one of 8 options by its index number by setting the option parameter in the input window you get when you run the script (Figure 1):



 

These are the options:


0  Close all the orders (instant and pending orders) - this is the default option which mean if you run the script and didn't set any parameters all the orders (instant and pending) will be closed.
1  Close all instant orders; instant orders mean the orders that opened at the market price.
2  Close all pending orders.
3 Close by the magic number. You have to set the magic_number variable.
4 Close by comment. You have to set the comment_text variable.
5 Close orders (instant orders) in profit and leave the orders in loss.
6  Close orders (instant orders) in loss and leave the orders in profit.
7  Close not today orders and leave the orders that opened today.

The other two variables which you can set are:

magic_number: Set it if you'll use closing option 3 - closing by magic number.
comment_text : Set it if you'll use closing option 4 - closing by comment.

Enjoy yourself! and tell me your comment!

CloseAll
 

Home   |   Strategies   |   MQL Training   |   Custom MQL   |   Downloads   |   Forums   |   Coders' Guru   |   Contact Us


Copyright © 2005-2006     XP WORX