breakeven
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
breakeven
int start()
{
int totalorders = OrdersTotal();
for(int i=totalorders-1;i>=0;i--)
{
OrderSelect(i, SELECT_BY_POS);
{
if (OrderSymbol()==Symbol()&& OrderType() == OP_BUY ) {
OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice(),OrderTakeProfit(),0,Green);
ObjectsDeleteAll(); 
}          
if (OrderSymbol()==Symbol()&& OrderType() == OP_SELL ) {
OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice(),OrderTakeProfit(),0,Green);
 
}
}
}
return;
}

Comments