The problem is that if a trade moves back into a loss then the conditions are not met so the stop loss returns.
What you have coded is not a break even code but one that removes the stoploss completely. Use the search box to search for ‘BreakEven’ and there are plenty of topics with example code available.
This should fix your code but perhaps it is not what you actually want:
Thank you Vonasi. I was just preparing the question, but just in this moment I had a power outage of one hour, and I don’t know how the question was posted, but it was.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok