OrderDelete() Arrow Colour is not working

 

Hello,

OrderDelete(OrderTicket(), clrViolet) , I am using this code, it should create an arrow mark object on chart with Violet but it not creating.


Full code :

void CloseOpenAndPendingTrades(int trade_close_magic)
  {
   for(int pos_0 = OrdersTotal() - 1; pos_0 >= 0; pos_0--)
     {
      OrderSelect(pos_0, SELECT_BY_POS, MODE_TRADES);
      if(OrderSymbol() != Symbol() || OrderMagicNumber() != trade_close_magic)
         continue;

      if(OrderType() != OP_BUY && OrderType() != OP_SELL)
         OrderDelete(OrderTicket(), clrViolet);
      else
        {
         if(OrderType() == OP_BUY)
            OrderClose(OrderTicket(), OrderLots(), Bid, 3, clrBlue);
         else
            OrderClose(OrderTicket(), OrderLots(), Ask, 3, clrYellow);
        }
     }
  }
 
anuj71:

Hello,

OrderDelete(OrderTicket(), clrViolet) , I am using this code, it should create an arrow mark object on chart with Violet but it not creating.


Full code :

Because your logic is flawed.  The answer was already given to you in a previous post
 
Paul Anscombe #:
Because your logic is flawed.  The answer was already given to you in a previous post

What is flaw in this Logic? and when it got answered? which post your talking about?


if(OrderType() != OP_BUY && OrderType() != OP_SELL)
         OrderDelete(OrderTicket(), clrViolet);
Reason: