The stop and stop limit order handling has been improved. We weren't doing it correctly before, so we appreciate you bringing it to our attention.
What was happening is the stop order wasn't really functional in the paper trader, and the stop limit order was working like the stop order should have. PositionManager was using stop limit orders for the stop loss when it really should have been using stop orders.
I have modified the Order class so it now has a StopPrice in addition to the LimitPrice. The stop order uses this new field instead of the LimitPrice field. We don't fully support StopLimit orders yet, but when we do the stop price will go in the StopPrice field, and the limit price will go in the LimitPrice field. We think this makes more sense. However, this means that if you have written your own broker plugin, you may have to update it to look in the StopPrice field instead of the LimitPrice field.
I have also modified PositionManager so that it uses stop orders for the stop loss.
I mentioned that we don't fully support StopLimit orders yet. Specifically, there is no overload to the OpenPosition, AddToPosition, or RemoveFromPosition methods that allows you to specify both a stop price and a limit price. Additionally, the paper trader has not been programmed to handle stop limit orders correctly. If it does receive a stop limit order, it will reject it. We have bug 977 to add support stop limit orders. Right now I'm not sure what kind of priority we will give this bug, so let us know if you want to use stop limit orders.