How to check if a trade is in break even?
-
Hi, does anybody know how to check if a trade is in break even or any way to check the distance from an open trade to it's stop loss? "Check stop loss" checks the distance from the price to the stop loss but not the distance from the open trade to it's stop loss.
-
I've tried so far to make a boolean flag switching from to false each time a trade opens and to true each time the distance from the trade at which the break even should be set but so far it has created more problems than what it solved...
-
have you tried this?
save it into variable, but dont forget, in variable it is saved in price fraction (if you need that in pips, you need adjust result with some multiplier (*10000 or *100 for jpy pairs) ... or with function ...)
For each Trade block goes through all trades, if you apply some filter in parameters, you can control it ...

-
I forgot this, you can that result with function MathAbs convert to absolute value because there is possibility of negative result ...

-
@miro1360 It woked!, thank you very much!