Stop loss should also be shown when trailing is active

This commit is contained in:
Matthias
2019-01-02 13:34:08 +01:00
parent 71eba2afba
commit 516217b6cb
2 changed files with 3 additions and 1 deletions

View File

@@ -278,7 +278,8 @@ class IStrategy(ABC):
# evaluate if the stoploss was hit
if self.stoploss is not None and trade.stop_loss >= current_rate:
selltype = SellType.STOP_LOSS
if trailing_stop:
# Trailing stop (and rate did move)
if trailing_stop and trade.open_rate != trade.max_rate:
selltype = SellType.TRAILING_STOP_LOSS
logger.debug(
f"HIT STOP: current price at {current_rate:.6f}, "