Problem with setting the stop to breakeven

 

Hello to all. I would set the stop of an open position to breakeven, but I'm doing something wrong. Look at the code please and leave a comment if you find out the mistake.

This is a part of the entire EA:

#include <Trade\Trade.mqh>
CTrade trade;

#define EXPERT_MAGIC 123456

double PatternTP2=0;
ulong position_ticket=0;
double position_price_open=0;

void OnTick()
  {
        
    //...
    if (PositionsForThisCurrencyPair==1)
     {
         if (PositionSelect(_Symbol)==true)
         {
         for (int conta=PositionsTotal()-1; conta>=0; conta--)
         {
             string symbol=PositionGetSymbol(conta);
             if (Symbol()==symbol)
             {
               position_ticket=PositionGetTicket(conta);
               position_price_open=PositionGetDouble(POSITION_PRICE_OPEN);
             }
         }
         StopModify();
         }
     }
     //...
  }

void StopModify ()
   {
      MqlTradeRequest myrequest;
      MqlTradeResult myresult;
      ZeroMemory(myrequest);
      PatternTP2=MyHandleArray[5]+(((MyHandleArray[2]-MyHandleArray[5])*61.8)/100); //This is right

      myrequest.action  =TRADE_ACTION_SLTP;
      myrequest.position=position_ticket;
      myrequest.symbol=_Symbol; 
      myrequest.sl      =position_price_open;
      myrequest.tp      =PatternTP2;
      myrequest.magic=EXPERT_MAGIC;
   }

Thanks.

Reason: