If distance between the middle sensor and the object is greater than max range then it moves forward irrespective of distance between the other two ultrasonic sensors and objects.
I will provide arduino code as well, don't worry. Follow this algorithm clearly, while writing your arduino code.
This is the algorithm when you use three ultrasonic sensors.