What am I missing?
-
This is a part of my latest EA and it doesn't work:
https://fxdreema.com/shared/SBX9d9xibWhat is intended to do is easy. Once price reaches 50 pip move SL to 3 pips beyond breakeven. Once it reaches 100 pips close the order. Well, I don't know why but it doesn't do any of them.

Could someone please tell me what am I missing?
-

-
this is testable in tester:
https://fxdreema.com/shared/o0zAtdend
-
I forgot to say that Variable A is reset at a different place in my EA, not shown at my example. That point is already fixed.
On the other hand, trading model is exactly what I need according to its definition. I want the SL to move only when the price is ABOVE open price in a buy and BELOW open price in a sell. Additionally, I don't understand why a button is required for it to work. Your additional blocks are really necessary? Why should I add a button?
-
For tester
because you want to test it as fast as possible (you can always open the trade in other ways)
When it is working in the tester, and is not working on the demo, than problem is somewhere in broker conditions (like set SL too close to the current price is not allowed by some brokers) .. -
Oh. Ok
I will try it. Thanks