Stop Loss not working on buylimit/selllimit

 

Hi all,

I've been working on an EA for the last couple weeks and for some reason the stop loss is not working as it should.

When the position is open it displays the SL and TP correctly but never acts on it. 


if(BuyTrig)

{

   Trade.BuyLimit(

      tradeVolume,

      closeP + spreadEntrada,

      _Symbol,

      (SL>0) ? (closeP - SL) : 0,

      (TP>0) ? (closeP + TP) : 0,

      ORDER_TIME_DAY,

      0);

}


Thanks already!

Reason: