How to check distance between 2 running positions?
-
Hey, im trying to check the pip distance between two running positions, if its >= than X ill close both.
These 2 positions are the only ones running (using positions count before checking distance)
How can i do it?
Thanks
-
@maledetu formula block high-low will give you the distance as a price fraction, modify variables block to change to pips, variable in pips same variable in modify box, as is I believe, or as pips, one or the other will convert formula variable to pips.
-
@maledetu Do you mean distance from open price? Or the open price from each other?
-
Hey guys thanks for the help.
What i need is just the distance in pips from open price of each one.
Goal is to check if there are only 2 open positions. If true and distance from them is more than X close both.Example:
Position A is running and was opened at 1.1
Position B is running and was opened at 1.3Difference in pips from both openings is 0.2
Lets say i set to close positions that are 0.2 or more in distance if there are only 2 running.
Both positions are closed.
Still trying to figure it out.
-
-
@jstap Thanks! ill test it and see how it goes, but anyway thanks for the help