Experienced, winning traders try to stay in control by not letting their emotions influence their decisions even when the unexpected crops up. It is quite normal when we are caught off guard to react emotionally, that is human nature, however, one of the best ways to handle getting caught off guard is to remain calm and logical, which in turn will reduce our psychological stress.
Trading in and of itself is stressful. With each trade your money is on the line and you are aware that you may have to deal with a loss and perhaps a blow to your ego. You have to take it all in stride and not allow yourself to be overwhelmed by it all. Feeling flustered is very natural but you need to reduce as much background stress as is humanly possible. When background stress is great, even a minor setback can set you off. Instead of flying off the handle prematurely, it is better to reduce background stress, and thus, increase your ability to handle unanticipated events.
In addition to managing background stress, it is also important to anticipate as many possible adverse events as possible. It is impossible to anticipate everything that can go wrong, but the more you can specify what can go wrong, and have a plan to deal with it, the more you'll be able to handle the event when it happens. For example, be aware that earnings reports, rate hikes, or major political events can impact the markets and play havoc with your trading plan. If you get caught off guard, you may not handle the situation very well. You may get overly angry or frustrated, and act on impulse, rather than calmly and rationally. But if you decide beforehand how you will deal with the event, you'll react more decisively.
Being on-guard and ready to take action, and you will get through unanticipated adverse events without getting bogged down by them. The more you can reduce background stress and react to unanticipated events decisively, the more profitably you will trade in the long run.