Found a big mistake in stoploss calc indentation.

That was the problem. Yup. Now let's see what the rest does.