How to use previous stop loss? - page 2

 
gangsta1:

The code I used finds the previous stop loss value in pips by subtracting the open price of that order with the stop loss value in price and stores it in previousstop.

Then I get the stop loss value in price (stored in stop) by adding the previous stop value in pips to the open price of the new order.

No you don't, the open price of the new order is Bid not OrderOpenPrice()
 

Thanks, thats what was missing! Managed to setup the same for tp with: previoustakeprofit = (OrderOpenPrice()-OrderTakeProfit());

Thanks for your help.

Reason: