Conditional trailing stop loss
-
Hi guys,
Sorry if I'm breaking any forum rules - it's literally my first time ever I've used one

I've had a couple of very intensive days with the fxDreema platform and I'm absolutely amazed how great it is.Neverhteless, I'm struggling to get one formation done - maybe someone will be able to help.
I'm working on a hedging pattern where stop losses are set up slightly further than the take profits.
At times the TP are activated but the price doesn't hit SL and goes the other way.
I want to take advantage of this edge and start trailing the SL back behind the price as it goes back.I've got the part on a tick chart - FOR EACH TRADE -> PIPS AWAY FROM STOP LOSS -> MODIFY STOPS - that is working well.
The problem is I don't want it to kick in too early and break my hedging pattern before the situation appears.
So basically what I nead is a condition set up that will allow the trailing to start after:
a) two or more trades had been opened and consecutively
b) one or more trades had been closed by TP
Easy to say but I've spent long hours on it without success.That would be a very useful setup for any hedging strategy (for those of you who are allowed to hedge).
-
No problem. Let's take a look on what you have so far. Could you please share your project?
-
So this one works basically but the conditionf for starting to trail is not fully correct
shared/x7oqpBMI
If, by luck, a previous closed trade is of appropriate type the robot will not start trailing until the TP is taken. In the other case however it will kick in right after a second trade is created.
-
Sorry, think this is how the link should go: https://fxdreema.com/shared/x7oqpBMI
-
Ok. Let's review it step by step.
-
Blocks 63 and 66 are comparing information from 2 candles away on thir left operands with that of the current candle on the right operands. Is this intended?
-
Block 60 is looking for any trade being closed 'no matter how'. This means both TP or SL being hit. Is that as intended?
-
-
- Not sure if I got this right - they were supposed to check if a second candle back is over moving average. The condition fror buy/sell signal is not so important though.
- Yes. It is supposed not to leave out any pending orders after the hedge grid is terminated.
-
Ok. Obviously we need to study your conditions in a more detailed way. So you say you want:
a) two or more trades had been opened and consecutively
What do you exactly mean by 'consecutive'? Consecutive candles? Consecutive buys/sells independently of the candle? Anything else?
b) one or more trades had been closed by TP
Sma here. Two or more trades in what time period? Or in which other conditions?
-
The thing is I want to keep it simple without any additional conditions.
So again. An order is opened, it launches an opposite pending order. The condition is: IF after opening two (or more) orders that run simultaneously, one (or more) orders hit TP, start trailing SL of the remaining orders.Seems simple to write it but I couldn't get it done. I wouldn't like to make that dependable on any other factors like time, candles, etc.
-
So you want to open a buy/sell and, at the exact same time, a pending sell/buy in the opposite direction. Right?
This means you can have two open trades at the same time (buy and sell). Right?
Can there be additional trades or pending orders or just these initial two?
-
Exactly like that.
The hedging structure can of course develop to 3,4 maybe more trades. -
And once a buy/sell is open, is the following pending order supposed to be at the exact price level of that same buy/sell or a few pips beyond?
-
Not sure what you mean.
There is an offset between the two hedge orders - in the example it's set to 20 pips.
There is also an offset between the TP of the first order and SL of the hedge order. In the example it is strongly overdrawn to show what I mean but generally it would be couple of pips only for the hedge structure to work properly. In other words there will be two opposite hedge orders offset by x pips ans then at each side of the hedge there will be first TPs and anfter some pips the SLs. -
Could you please upload a few screenshot showing what you exactly want? I thisnk that will be the easier way.