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

 
Here is my basic codes structure:

...

Improperly formatted code removed by moderator. Please EDIT your post and use the CODE button (Alt-S) when inserting code.

Code button in editor

Hover your mouse over your post and select "edit" ... 

...

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 want to add a code that when the A condition was already activated it much stop immediately, and only counted the B and C conditions, the same thing with the C condition, A and B conditions much stop running when the C condition was activated.

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


 
We can't read your code and help until you fix the formatting.
Reason: