Do you know how to use the MT4 optimizer? This is what you should try if all you need to know is better settings.
Unfortunately, many EA's act in the way you described. There may be no settings to prevent losses like this, but using the Optimizer is the best step for what you are asking.