Problem with opening two orders in the same time

 

I try to  open orders in the same time (Buy and BuyLimit),but after second positions , buylimit sending does not work.Works only a Buy order. That is mean buycount >buylimitcount , but the point its buycount = buylimit in the first time  Please , can you some one help me, where is the mistake ?

This is my code :

some code

if(Ask>=NextBuyPrice)

   if(signal=="buy")

   {

 int buyticket=  OrderSend (_Symbol,OP_BUY,0.01,Ask,3,Ask-1000*_Point,Ask+1000*_Point,NULL,0,0,Green);

 int buyticket1=OrderSend(_Symbol,OP_BUYLIMIT,0.01,Ask-(countBuyLimitPosition()*200*_Point)-((countBuyLimitPosition()+1)*400*_Point),0,Ask-1000*_Point,Ask+1000*_Point,NULL,0,0,Green);

   NextBuyPrice=Ask+200*_Point; 

}

Why buyticket1 works perfectly only for two positions, and after that its gone.... see the picture

Files:
Capture.JPG  31 kb
 
Difficult to see the code …. Post it correctly