How to create new stoploss and take profit
-
Hi, can anyone point me to a post where I can find a solution on creating an ea to add a stop loss and a take profit to existing trades that don't have them?
-
@Rem1978 You can do this:

-
Does new stoploss in pips mean the new stoploss will be 50 pips away from open price?
-
This depends on when you set it and where you place it
-
My pending orders already have SLs
-
@Hits In my example above, yes.
-
So how do I make the EA move my stop to entry on my pending orders before they fill?
Or like, make the SL move 1 pip up or down of my choice, if that doesn’t work.
-
@Hits
Because when I set the new stop loss to 1 pip. The stoploss would trail the ask price (for my buy limit order) by 1 pip, but I was trying to make it so it only adjusts the stoploss once, instead of doing it every time the ask price moves.Also I’m still confused on if the -1 pips would make the new stoploss -1 pips below the new ask price (for my buy orders)
-
-
Sorry. I missed your posts. I'm not completely sure what you exactly need. If your pending orders include an initial SL, when do you need it exactly to be modified? As soon as the order is triggered or later?
-
@l-andorrà https://fxdreema.com/shared/CEx6EEs0b
Hello, it’s okay. I want the SL to change once the pending order is placed, not triggered. And I only want the SL to change one time per pending order because without that it will keep changing when the reference price is current market.
-
But what's the point of changing the SL when the order is placed. Why not using the correct SL in the first place? I don't see the logic behind that.
-
Because fxdreema doesn’t allow me to use the stoploss I want from the start. Anyways, do you know if the code I have there is right, and how do I make the SL only change once per pending order?
-
@l-andorrà
I tried the EA, but it won’t work. -
Whatever you set when placing trade will be used, unless your broker has a minimum distance from open
-
@jstap
So I can’t change the SL? -
Yes you can but how do you mean
-
@jstap
Basically I want the stoploss to move 0.1 pips away from the bid/ask price once the pending order is placed. -
Your broker probably won't allow that, and if you look at how price moves, you will see that this would be a loss 99.999% of the time, this is why people wait until trade is opened, and your spread will definitely be larger
-
@jstap
Can I still know how to do it?