Thread: Ask!
View Single Post
  #381 (permalink)  
Old 10-03-2006, 10:03 AM
MehdiForex MehdiForex is offline
Junior Member
 
Join Date: Apr 2006
Posts: 6
MehdiForex is on a distinguished road
Hello all,

I want to close all my orders at the same time but i coudn't.
I tried this code but it didn't work :

''''''''''''''''''''''''''''''''''''''''

total = OrdersTotal();
for(i=0;i < total;i++)
{
if(OrderSelect(i, SELECT_BY_POS)==true)
{
OrderClose(OrderTicket(),OrderLots(),Ask,80,CLR_NO NE);
OrderClose(OrderTicket(),OrderLots(),Bid,80,CLR_NO NE);
}
}

''''''''''''''''''''''''''''''''''''''''
Can anybody help me ?
I would be very grateful if you can help me
Reply With Quote