Forex



Go Back   Forex Trading > Downloads > Tools and utilities
Forex Forum Register More recent Blogs Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #21 (permalink)  
Old 12-12-2006, 12:42 PM
Senior Member
 
Join Date: Sep 2006
Location: Europe
Posts: 115
SloForeX is on a distinguished road
Your code is very similar than mine. The results are the same. I attached a picture, to make some things more clearly.
EA does close all trades for pair GBPUSD (picture). As you can see, after this another trade is opened. (1 means allowtrade is true, 0 allowtrade is false).
Attached Images
File Type: jpg Image3.jpg (358.2 KB, 2135 views)

Last edited by SloForeX; 12-12-2006 at 02:53 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #22 (permalink)  
Old 01-04-2007, 05:11 PM
Administrator
 
Join Date: Sep 2005
Posts: 20,058
Blog Entries: 241
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
CloseOnTime EA by KimIV
To close the orders exactly at the time.
At 23:55 for example.
All the ordes, or some of them (optional by simbols).
Attached Files
File Type: mq4 CloseOnTime.mq4 (2.0 KB, 339 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #23 (permalink)  
Old 02-02-2007, 04:42 PM
Senior Member
 
Join Date: Mar 2006
Posts: 124
ZTrader is on a distinguished road
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...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #24 (permalink)  
Old 02-02-2007, 08:05 PM
codersguru's Avatar
Senior Member
 
Join Date: Oct 2005
Posts: 994
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #25 (permalink)  
Old 02-13-2007, 03:49 AM
Senior Member
 
Join Date: Oct 2006
Posts: 187
phorex_phreak is on a distinguished road
what happens if you want to close all open and pending orders when the profit on the account hits 1000 dollars?? how do we do that??

http://phorex-phreak.blogspot.com/

Last edited by phorex_phreak; 02-20-2007 at 06:46 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #26 (permalink)  
Old 03-14-2007, 11:43 AM
Member
 
Join Date: Dec 2005
Location: Shanghai
Posts: 41
doragio is on a distinguished road
Close All by Specific Currency

Thanks to everyone for posting their close all scripts. I've been trying to add a function whereby you can close all trades based upon a specific currency.

if (OrderSymbol() == "gbpusd")

Here's the additional string, which I am not sure if it's correct, a total beginner with mq4. but after successful compiling it, it says error 129?


any help or comments would be appreciated, thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #27 (permalink)  
Old 03-14-2007, 11:59 AM
Administrator
 
Join Date: Sep 2005
Posts: 20,058
Blog Entries: 241
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
You may take some example of coding fom this thread EA to close all open order of GBPJPY
(it is EA to close the orders on specify pairs only).
And it is the same (to close on specific pair) for pending orders this EA delete all pendind orders
(EA as well).
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #28 (permalink)  
Old 03-14-2007, 12:05 PM
Member
 
Join Date: Nov 2006
Posts: 92
k3iroll is on a distinguished road
Hi doragio,

Can you kindly post the "Close all specific pair" pip once you managed to get it compiled properly. I think it would help a lot of ppl here. Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #29 (permalink)  
Old 03-15-2007, 02:53 PM
amenlo9's Avatar
Senior Member
 
Join Date: Apr 2006
Location: Malaysia
Posts: 188
amenlo9 is on a distinguished road
i want to request script for modify open position,is there any?
__________________
~~Keep The Faith~~
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #30 (permalink)  
Old 03-15-2007, 03:52 PM
Administrator
 
Join Date: Sep 2005
Posts: 20,058
Blog Entries: 241
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
We have a lot of it on our forum.
A lot.

- StepStopExpert_v1.1: EA to trail the orders.

- EMATrailing Stop EA: trailing stop based on an EMA. Original thread is here.

- Trailing stop EA with instruction in pdf file about how to use it is here.

- Tight Trailing Stops EA from Nicholishen is here.

- Kalenzo posted trailing stop code here which may be used in EAs (for programmers). Original thread is here.

- some trailing stop codes (mostly usefull for programmers) are here.

- Trailing Stop EA posted long time ago is here.

- E-ASEClose Expert from KIMIV is here.

- many trailing files are here. I tried it some time ago.

- The other thread about tailing stop with some codes was started here.

- The other EA for trailing stop is here.

- Trailing stop EAs/scripts: elite section thread with two EAs.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks

Tags
close, close all, Close all open positions.mq4, close all position script, close all positions, close all positions in MT4, close all script, close all trades, closeall, ddetool, forex, mt4 close all script, mt4 close all trades, open close, pending order ea, profit, script, scripts, stomper, stop, tools, trades, trailing


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Open/close trade on same bar's close? WNW Expert Advisors - Metatrader 4 2 03-29-2007 06:37 AM
close all open trades ea G-Riper General Discussion 2 08-02-2006 10:41 PM
Close all open positions jonjonau Expert Advisors - Metatrader 4 6 07-12-2006 06:01 AM
Close All Open Positions? lonespruce Metatrader 4 9 06-22-2006 08:20 AM


All times are GMT. The time now is 08:00 PM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.