Orders Execution
Checks for the total of open ordersIt can change open orders parameters, due to possible stepping strategy
1 Views
0 Downloads
0 Favorites
Break_even

int start()
  {
for(int i=0;i<OrdersTotal();i++)
{
OrderSelect(i,SELECT_BY_POS);
if(Symbol()!=OrderSymbol())continue;
if(OrderType()>1)continue;
if(OrderType()==0&&OrderStopLoss()>=OrderOpenPrice())continue;
if(OrderType()==1&&OrderStopLoss()<=OrderOpenPrice())continue;
OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice(),OrderTakeProfit(),0);
}
 return;}
//+------------------------------------------------------------------+

Comments