For each new position modify last position stop loss
-
My EA places 10 buy stop orders. when the second buy stop order is hit, the first buy stop loss is modified and moved closer to protect profit. when the third buy stop is hit the second buy stop loss is modified.
every time a buy stop order is hit, the previous trade is protected by moving stop loss closer to it. each trade has its own stop loss.
-
And the question is?
-
how do i modify the previous trade stop loss everytime a new buy stop is triggered?
-
im using mt5
-
on trade tab... trade opened... for each trade/order... modify stop... move the last opened SL where you want it. In the for each trade/order blocks you can select each by missing trades you don't want to change
-
it is working but i dont want the newest trade to be affected. i am not sure if that is what you are explaining above. lets say i have a buy and 5 buy stop orders. this first buy's stop loss is not changed till a new pending order is triggered. this new position's stop loss is not changed , the first buy stop loss is the one that is changed. everytime we hit a buy stop order, the previous position stop order is changed. the idea is, every position must be protected by moving their loss while the most recent trade is still far and when a new trade is made thats when we protect this trade while the new one remain unprotected or the stop loss remain in their original place.
-
Glad it's working, what I put was to not change any other than the one you want. For example, you can u use newest to oldest but miss 1 so you select 2, and place the SL at 1 SL, thus leaving a cascading effect where every new trade moves the SL up so they are all on the same level.
-
Stop losses are moved as planned the problem is even the new trade's stop loss is moved and thus means every trade that opens the stop loss close it. what i want is the stop loss to protect old trades and leave new trade alone. when another new trade is created, it is not protected and the previous trade is the one that now needs protection.
-
As I said do this on the on trade tab, this way things will only change at trade open time, then use a for each block to select only the trade(s) you want to change
-
Sounds complicated for me
-
No that complicated but the only way to know is to set up a project and test things on backtest/demo.