Print when in Critical/Loss as well

This commit is contained in:
Giulio De Pasquale 2021-02-25 20:19:07 +00:00
parent 888843d853
commit 793fd40b4c

View File

@ -309,6 +309,8 @@ impl PositionStrategy for TrailingStop {
// if in loss, ask the order manager to set the stop limit order, // if in loss, ask the order manager to set the stop limit order,
// if not already set // if not already set
if let Some(PositionProfitState::Critical) | Some(PositionProfitState::Loss) = position.profit_state() { if let Some(PositionProfitState::Critical) | Some(PositionProfitState::Loss) = position.profit_state() {
self.print_status(&position);
if !stop_loss_set { if !stop_loss_set {
info!("In loss. Opening trailing stop order."); info!("In loss. Opening trailing stop order.");