Can magic be modified?

 

I want to add the magic number to the manual open position list, but what I wrote doesn't seem to work. See if there is a solution?

   int total = PositionsTotal();
   for(int i = total - 1; i >= 0; i--)
   {
      if(PositionGetString(POSITION_SYMBOL) == _Symbol && PositionGetInteger(POSITION_MAGIC) != 001)
      {
         MqlTradeRequest request = {};
         MqlTradeResult  result = {};
         request.action = TRADE_ACTION_MODIFY;
         request.type_filling = ORDER_FILLING_IOC;
         request.position = PositionGetTicket(i);
         request.symbol = _Symbol;
         request.magic = 001;
         int aaat = 0;
      }
   }


 
Blur Darkness: I want to add the magic number to the manual open position list, but what I wrote doesn't seem to work. See if there is a solution?

You can't change the magic number of a position once it is applied.

 
Fernando Carreiro #:

You can't change the magic number of a position once it is applied.

ok,thanks!
Reason: