View Single Post
  #24 (permalink)  
Old 02-02-2007, 07:05 PM
codersguru's Avatar
codersguru codersguru is offline
Senior Member
 
Join Date: Oct 2005
Posts: 987
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Wink CloseAll script

Quote:
Originally Posted by ZTrader
Has anyone ever figured out how to make the "close all open orders" and "close all pending orders" scripts work? I keep trying and just keep getting Error: 0 for every order in every pair...
Did you try this one:

http://xpworx.com/Close%20All.htm

.................................................. .............

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!
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
Reply With Quote