Forex
Google
New signals service!

Go Back   Forex Trading > Discussion Areas > 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
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-15-2006, 07:38 AM
mas mas is offline
Junior Member
 
Join Date: Nov 2005
Posts: 17
mas is on a distinguished road
close all orders

hi


I need the code in expirt to close all orders
I wrote this cood but its not working ... any one help me in this plzzzzzzzzz. ???


-------------
for (int j=0; j<OrdersTotal(); j++)
{
OrderSelect(j, SELECT_BY_POS, MODE_TRADES);
OrderPrint();
if ( OrderType() == OP_BUY )
{
OrderClose(OrderTicket(),OrderLots(),Bid,3,Violet) ;
{
else
OrderClose(OrderTicket(),OrderLots(),Ask,3,Violet) ;

}
---------------
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-15-2006, 08:47 AM
Administrator
 
Join Date: Sep 2005
Posts: 16,701
Blog Entries: 137
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
Quote:
Originally Posted by mas
hi


I need the code in expirt to close all orders
I wrote this cood but its not working ... any one help me in this plzzzzzzzzz. ???


-------------
for (int j=0; j<OrdersTotal(); j++)
{
OrderSelect(j, SELECT_BY_POS, MODE_TRADES);
OrderPrint();
if ( OrderType() == OP_BUY )
{
OrderClose(OrderTicket(),OrderLots(),Bid,3,Violet) ;
{
else
OrderClose(OrderTicket(),OrderLots(),Ask,3,Violet) ;

}
---------------
There are the scripts here to close the orders.
You may use it as a sample.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-15-2006, 09:14 AM
mas mas is offline
Junior Member
 
Join Date: Nov 2005
Posts: 17
mas is on a distinguished road
thank u very match
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

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
Close and Reverse orders elihayun Tools and utilities 20 09-16-2008 04:56 AM
modify orders and close pending orders bkgridley Questions 8 05-23-2007 10:49 PM
Script to close open orders... babarmughal Expert Advisors - Metatrader 4 1 12-13-2006 05:50 PM
SHI Silvertrend close orders EA?? fxbrandon Expert Advisors - Metatrader 4 1 11-29-2006 09:17 PM
Script close all orders paulosilva555 Metatrader 4 1 02-17-2006 05:19 PM


All times are GMT. The time now is 08:35 AM.



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