When a locomotive is running forwards, the water level will tend to rise in the gauge glass. Conversely, when the locomotive is running backwards, the water level will tend to fall in the gauge glass. To try and illustrate this, let's consider the boiler as a simple cuboid partly filled with water. If it is level, there will be a reading in the gauge glass. If we place it on a gradient, the water level shown in the glass will rise or fall, depending on whether the gradient is uphill or downhill. So far, so good and quite simple. On the level, if we impart motion, a force has to be applied to the water to accelerate it. The force can only be applied to the water by the boiler structure. It follows that the water level at the back end will rise to give accelerating force. That is easy to demonstrate by filling a bowl of water and accelerating it. The water will surge to one end. However, once up to speed and moving at constant speed, the forces on the water are in equilibrium and the water level will be the same as when stationary. All the foregoing is fine and probably easy to understand. If we now consider the situation of what happens on a gradient running at a constant speed. Like the rest of the locomotive and train, a force has to be imparted to the water to lift it up that gradient. Again the force on the water can only be applied by the boiler structure and, to impart this force, the head of water at the lower end must be higher than that at the upper end. We aren't talking about huge forces, here. 1" of water head is only about 0.04 psi. Hopefully the simple sketches will make this a bit clearer. If the locomotive is going in reverse, all this happens at the opposite end, causing a lowering of the reading in the gauge glass. This is all associated with the regulator being open because it is the steam in the cylinders that is ultimately providing this force to overcome gravity and to have this force, the reg has to be open. When you close the reg, you remove the applied force, causing the water level to fall going forward and rise going in reverse. Of course, there is a change in water level around the steam offtake from the boiler but this position does not change relative to the gauge glasses with change in direction so should have no effect on the reading in the gauge glass, everything else being equal. I also know that there is a lot more going on inside the boiler to affect the level shown in the gauge glass.