Problem getting pending order's Stop Loss price
-
I need to get the stop loss price from a pending order to use it to set the TP for an opened trade, but I can't get it using a "For each pending order" loop.
I'm attaching a script with the blocks I'm using.
What I'm doing wrong?
Thanks. -
Check this out

-

-
Hi josecortesllobat,
Just curious. Why did you change that Group mode? I don't see the difference between your fisrt and second reply.
-
Thank you, it works perfectly. It's not a very elegant approach but it works fine.
I think that it would be more adequate to have different kinds of loops for orders and trades to avoid this problem but I'm happy to see it can be done with some workarounds.
-
What if you do:
Buy pending order -> For each Pending Order (with Not more than... set to 1, so you really select only the latest pending order that was just created) -> Buy now (and for SL select Custom (price level) and the pink (in loop) stuff) -
It was a mistake in the first picture. The second one is the right one.
