Forex
Google
New signals service!

Go Back   Forex Trading > Downloads > Expert Advisors - Metatrader 4


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 Thread Tools
 
Old 01-24-2007, 08:39 PM
Junior Member
 
Join Date: Sep 2006
Posts: 17
hedge4x is on a distinguished road
EA to close all open order of GBPJPY

Does anybody have the EA to close all open orders of GBPJPY?
I don't want to close all order, just the pair GBPJPY only.


thanks in advance.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
 
Old 01-25-2007, 07:20 AM
nezinu's Avatar
Junior Member
 
Join Date: Nov 2006
Location: Latvia
Posts: 26
nezinu is on a distinguished road
//+------------------------------------------------------------------+
//| Deleting.mq4 |
//| coded by Rolands Auza |
//| www.rm-forex.lv |
//+------------------------------------------------------------------+
#property copyright "coded by Rolands Auza"
#property link " www.rm-forex.lv "
extern string currencyToClose="GBPJPY";
extern string currencyToDelete="GBPJPY";

int init() {return(0);}
int deinit() {return(0);}
int start() {

int cnt, deleteClose1,Close1,Close2;

for(cnt=0;cnt<OrdersTotal();cnt++)
{
OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol()==currencyToDelete)
{
if(OrderType()==OP_BUYLIMIT || OrderType()==OP_SELLLIMIT)
{
deleteClose1=OrderDelete(OrderTicket());
if(deleteClose1==true) Comment("Order Deleted");
}
} //if
if (OrderSymbol()==currencyToClose)
{
if(OrderType()==OP_BUY)
{

Close1=OrderClose(OrderTicket(),OrderLots(),Bid,0, Blue);
}

if(OrderType()==OP_SELL)
{
Close2=OrderClose(OrderTicket(),OrderLots(),Ask,0, Red);

}
} //if currency to close
} //for
return(0);
}
__________________
Somebody likes sport betting, somebody casino, but I prefer Forex and currency trading. Forex un valūtu tirdzniecība rullz!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
 
Old 01-26-2007, 05:52 PM
Junior Member
 
Join Date: Sep 2006
Posts: 17
hedge4x is on a distinguished road
thanks for your help
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
 
Old 12-22-2007, 02:34 PM
matrixebiz's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 1,159
matrixebiz is on a distinguished road
Can you modify to only close GBP/JPY once a set negative float dollar amount is hit? and what is the difference between Close and Delete?
Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
 

Bookmarks
Thread Tools

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 05:37 AM
Open a new order !! ammar Expert Advisors - Metatrader 4 14 09-18-2006 05:34 PM
Close All Order when Profit.... FXfish Metatrader 4 1 08-15-2006 03:43 PM
how to allow EA to open another order? winnysunny Expert Advisors - Metatrader 4 2 03-22-2006 01:14 AM
How to close an open order after X hours? Maji Metatrader 4 2 03-18-2006 01:14 AM


All times are GMT. The time now is 11:04 PM.



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