New position won't work

 
Hello. I tired try different ways. But i cannt. Problem is Dont work Ucuncu_PendingBuy() after Ikinci_PendingSell(). Please help

void OnTick()
  {
   
      ASK = SymbolInfoDouble(_Symbol,SYMBOL_ASK);

      if(PositionsTotal()==0)
      {
      DeletePending();
      }

      Birinci_buy();
      
  }

//+------------------------------------------------------------------+

void Birinci_buy()
  {
   if(PositionsTotal()==0)
     {
      if(!Trade.Buy(Birinci_Lot,_Symbol,ASK,ASK-SL-Spread,ASK+TP,"Birinci_buy"))
         return;
      else
        {
         PendingPrice = ASK-Distance;
         Ikinci_PendingSell();
        }
     }
  }



void Ikinci_PendingSell()
  {
   Trade.SellStop(Ikinci_Lot,PendingPrice,_Symbol,PendingPrice+SL+Spread,PendingPrice-TP,ORDER_TIME_GTC,0,"Ikinci_PendingSell");
   PendingPrice = PendingPrice+Distance;
   Ucuncu_PendingBuy();
   
  }



void Ucuncu_PendingBuy()
  {
      if(PositionsTotal() == 2)
     {
      Trade.BuyStop(Ucuncu_Lot,PendingPrice,_Symbol,PendingPrice-SL-Spread,PendingPrice+TP,ORDER_TIME_GTC,0,"Ucuncu_PendingBuy");
      PendingPrice = PendingPrice-Distance;
      Dorduncu_PendingSell();
     }
      
  }



void Dorduncu_PendingSell()
  {
         if(PositionsTotal() == 3)
         {
         Trade.SellStop(Dorduncu_lot,PendingPrice,_Symbol,PendingPrice+SL+Spread,PendingPrice-TP,ORDER_TIME_GTC,0,"Dorduncu_PendingSell");
         PendingPrice = PendingPrice+Distance;
         }
      
  }
 
  1. Hope: I tired try different ways.

    We can't read your mind. You have to show your “ways.”

  2. Hope But i cannt.

    Can't what? Speak English, proper sentences.
              Be precise and informative about your problem

  3. Hope: Problem is Dont work

    “Doesn't work” is meaningless — just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires — could be anything, meaningless.
    We can't read your mind nor see your machine; only what you give us on this forum.
         How To Ask Questions The Smart Way. (2004)
              When asking about code

  4. if(!Trade.Buy(Birinci_Lot,_Symbol,ASK,ASK-SL-Spread,ASK+TP,"Birinci_buy"))

    We have no idea what SL, TP, or Spread is, or where do you update them.

    Always post all relevant code (using Code button) or attach the source file.