Can anybody helps me with what code I should use for the "if" condition running only one time and stop, for the second "if" running
We can't read your code and help until you fix the formatting.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
...
...
So basically, if I set numbers like the above when price reached the A1 (2), the A2 (0) activates and moves my SL, nothing wrong with this phase, when the price continues to hit the B1 (3), SL one more time moves to B2 (1) pips, everything still fine, but then the market price suddenly drops to back to A1 (2), at this point, the A condition much stops running and the SL would be B2 (1), but instead, one more time the SL moves back to A2 (0), again and again between A2 and B2 if price running up and down between A1 and B1. The same case has happened with the C condition.
I found some code that can do that but in mql5, I'm a newbie so hope you guys can help me with this case and gives me the idea to put the right thing in the right place. Thank you so much