Navigation:Home > Content >

Close_Open_Sell1.mq4

Time: 2013-06-17 | Download file:Close_Open_Sell1.mq4

//+------------------------------------------------------------------+
//|                                              Close Open Sell.mq4 |
//|                                  Copyright © 2007, GwadaTradeBoy |
//|                                           [email protected] |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2007, GwadaTradeBoy"
#property link      "[email protected]"

int total = 0, cnt = 0;
//+------------------------------------------------------------------+
//| script program start function                                    |
//+------------------------------------------------------------------+
int start()
   {
//----
      total = OrdersTotal();
      for (cnt = total ; cnt >=0 ; cnt--)
               {
                  OrderSelect(0,SELECT_BY_POS,MODE_TRADES);
                  if(OrderType()==OP_SELL)
                     OrderClose(OrderTicket(),OrderLots(),Ask,5,Violet);
               }
//----
      return(0);
   }
//+------------------------------------------------------------------+

Recommend