Tuesday, 18 December 2012

semua open posisi terclose jam 18.00




minta tolong donk cara bikin kode agar semua open posisi terclose jam 18.00.
trims..
Code:
if (TimeHour(CurTime())>=18)
   {
   for (int i=0;i<OrdersTotal();i++)
      {
      if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
         {
         OrderClose(OrderTicket(),OrderLots(),OrderClosePrice(),3);
         }
      }
   }

No comments:

Post a Comment