Forex



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

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 01-24-2007, 09:39 PM
Junior Member
 
Join Date: Sep 2006
Posts: 24
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #2 (permalink)  
Old 01-25-2007, 08:20 AM
nezinu's Avatar
Junior Member
 
Join Date: Nov 2006
Location: Latvia
Posts: 29
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #3 (permalink)  
Old 01-26-2007, 06:52 PM
Junior Member
 
Join Date: Sep 2006
Posts: 24
hedge4x is on a distinguished road
thanks for your help
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
  #4 (permalink)  
Old 12-22-2007, 03:34 PM
matrixebiz's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 1,215
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!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
rolands auza, close all open order

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
How to close an open order after X hours? Maji Metatrader 4 4 11-06-2008 12:52 AM
Open/close trade on same bar's close? WNW Expert Advisors - Metatrader 4 2 03-29-2007 06:37 AM
Open a new order !! ammar Expert Advisors - Metatrader 4 14 09-18-2006 06:34 PM
Close All Order when Profit.... FXfish Metatrader 4 1 08-15-2006 04:43 PM
how to allow EA to open another order? winnysunny Expert Advisors - Metatrader 4 2 03-22-2006 02:14 AM


All times are GMT. The time now is 06:19 PM.



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