From ff17972f5be97df4f216e4b75c7910978a981284 Mon Sep 17 00:00:00 2001 From: Giulio De Pasquale Date: Mon, 25 Jan 2021 13:19:40 +0000 Subject: [PATCH] cleaned debug messages --- rustybot/src/managers.rs | 2 -- rustybot/src/strategy.rs | 8 +++----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/rustybot/src/managers.rs b/rustybot/src/managers.rs index 127dc24..7cf202a 100644 --- a/rustybot/src/managers.rs +++ b/rustybot/src/managers.rs @@ -281,7 +281,6 @@ impl PositionManager { .insert(self.current_tick(), pos_post_tick.clone()); self.active_position = Some(pos_post_tick); - println!("Message: {:?}", messages); return Ok((events, messages)); } } @@ -600,7 +599,6 @@ impl PairManager { messages.merge(opt_pos_messages); messages.merge(opt_order_messages); - println!("Total messages: {:?}", messages); // TODO: to move into Handler? if let Some(messages) = messages { for m in messages { diff --git a/rustybot/src/strategy.rs b/rustybot/src/strategy.rs index 923a67d..b694723 100644 --- a/rustybot/src/strategy.rs +++ b/rustybot/src/strategy.rs @@ -81,9 +81,9 @@ impl TrailingStop { } fn update_stop_percentage(&mut self, position: &Position) { - println!( - "State: {:?} | PL%: {:0.2}", - position.profit_state(), + info!( + "\tState: {:?} | PL%: {:0.2}", + position.profit_state().unwrap(), position.pl_perc() ); @@ -239,8 +239,6 @@ impl PositionStrategy for TrailingStop { self.update_stop_percentage(&position); - println!("Stop percentage: {:?}", self.stop_percentages); - (position, None, None) } }