Stepper motor controlled by turning only in one direction and stalling in opposite direction
I can see the problem here . And as i know multiple if else if statement should end with else in the end to tell the arduino if all the statement above is false then else{do this}.
if-else-if ladder: Here, a user can decide among multiple options.The if statements are executed from the top down. As soon as one of the conditions controlling the if is true, the statement associated with that if is executed, and the rest of the ladder is bypassed. If none of the conditions is true, then the final else statement will be executed.
Do this 
If(){ im true don't go to the else if and if im false go down}
else if (){im true so go out and if I'm false go down}
else{ i know everything above me are false so let me tell YOUre microcontroller that every thing  is false so check again .}
this link will help you .enter link description here