//________________COUNT BUYS__________________ int BuyCnt = 0; i = OrdersTotal(); for( i=0;i= SELLS, close BUYS at Profit whilst true while (BuyCnt>=SellCnt+5) //+5 means can be unhedged by 5 positions for( i=0;i0.1) OrderClose(OrderTicket(),Lots,Bid,0,0); //____If SELLS >= BUYS, close SELLS at Profit whilst true while (SellCnt>=BuyCnt+5) //+5 means can be unhedged by 5 positions for( i=0;i0.1) OrderClose(OrderTicket(),Lots,Ask,0,0); } }