Wave a red flag at the train to signal for it to stop. If there's a threat to the train, such as an obstruction or person on the tracks ahead of it, wave a red flag vigorously at it to signal to the operator that they need to apply the emergency brakes.