First learn to accept that losses is a part of the process. Next set some fixed stop loss settings, drawdown limits, max number of trades etc. Then gradually add flexibility to your trading plan (i.e. rules when and why you can adjust the parameters mentioned above).