added a check for stoploss > 0