check distance between positions then close one of them
-
For each position that is at a short distance (or a certain distance) from another position, close one of them (for example, the most recent one).
How can I use blue blocks next to pink blocks?
Or what is the right way for this scenario?
https://fxdreema.com/shared/e63HK5Xne -
This is on on tick not on trade

I would save the open prices into two variables, then compare these -
@jstap
How can I save the opening price of each position and then check the distance?
When I put them in the loop (for each position) or on the on Trade (for each position that is created), it only stores one opening price for me.
Is it possible to guide the details of this case? -
You can save the price when trade is placed in a variable, or get the value in pink blocks separately, save if needed, test and add a new shared link to see what is happening if not working