no, that's only a basic reversing circuit, in your application you have to add latch, it's a N.O. contact from M1 connected in parallel with forward switch (S1) and N.O. contact from M2 connected in parallel with reverse (S2) switch, in this case when S1 is triggered it will ignore S2 and also S1 and you need to add microswitches to both ends for stopping the motor aside from S1 and S2, when the motor reaches the end , i.e. forward end, it will open the forward stop switch and also closes the reverse start switch
S1 = forward run
S2 = reverse run
S3 = forward stop
S4 = reverse stop
S1 >>>>>>>>>>> S3
S4 <<<<<<<<<<< S2