|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
|
|
LinkBack (6) | Thread Tools |
|
|
|||
|
|||
|
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). Last edited by SloForeX : 12-12-2006 at 01:53 PM. |
|
|
||||
|
||||
|
Quote:
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! |
|
|
|||
|
|||
|
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 05:46 AM. |
|
|
|||
|
|||
|
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. |
|
|
|||
|
|||
|
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). |
|
|
|||
|
|||
|
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. |
| Thread Tools | |
|
|
|
|
LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/tools-utilities/174-close-all-open-tools.html
|
|||
| Posted By | For | Type | Date |
| Close all trades !!! | This thread | Refback | 06-24-2008 03:13 AM |
| Close all trades !!! | This thread | Refback | 06-19-2008 10:53 AM |
| Close all trades !!! | This thread | Refback | 06-19-2008 09:33 AM |
| Antara EA yang telah diLIVE test oleh MyMEFx Grup - Page 50 - Nogold.com | This thread | Refback | 12-05-2007 03:58 PM |
| skrypty close i modify | This thread | Refback | 08-07-2007 04:11 AM |
| Ind close sume post with one click? - Nogold.com | This thread | Refback | 06-30-2007 03:02 PM |
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 05:37 AM |
| close all open trades ea | G-Riper | General Discussion | 2 | 08-02-2006 09:41 PM |
| Close all open positions | jonjonau | Expert Advisors - Metatrader 4 | 6 | 07-12-2006 05:01 AM |
| Close All Open Positions? | lonespruce | Metatrader 4 | 9 | 06-22-2006 07:20 AM |