EA to open additional orders after gaining pips

 

I'm learning mql4 and trying to make an EA that opens additional positions after the previous position gained 25 pips.  It works but not completely. The problem is that after the first position gains +25 pips it opens an additional position like it supposed to but then it continues to open additional positions every tick instead of waiting for that newest position to gain +25 pips before opening another one.

Here's what I've done

int start()

{


if (OrderSelect(0, SELECT_BY_POS)==true && Bid>OrderOpenPrice()+0.25)

      {    OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage,StopLoss,ProfitTarget); return;      }


}

I thought OrderSelect(0, SELECT_BY_POS)==true  is supposed to make EA select the newest position in the list.

 
Nope, oldest position, not necessary the position taken by the EA on that pair. Count down and filter
Reason: