Use Stop-Loss and Correct Position Size
Risk up to 1-2% of your entire account on a trade and ensure you have a stop-loss in place so that you are always able to control your losses.
Just as with any other risk, don't use excessive leverage on your trades, as using high leverage increases the size of your possible losses. Always trade based on what you can afford to lose.
Don't Over-leverage
Set all entry and exit rules ahead of time, and stick to them. Avoid revenge trading, and also keep a trading journal.
Have a Trading Plan and Stick to It
Start small, use strong risk control, and monitor your forex robot regularly.
Practice and Discipline