From 50533b053767d7a1388116a88762fbb63b3dceb8 Mon Sep 17 00:00:00 2001 From: Giulio De Pasquale Date: Sun, 24 Jan 2021 14:34:24 +0000 Subject: [PATCH] abs in delta calculation (in the right place now) --- rustybot/src/strategy.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rustybot/src/strategy.rs b/rustybot/src/strategy.rs index c782dad..189c5bf 100644 --- a/rustybot/src/strategy.rs +++ b/rustybot/src/strategy.rs @@ -238,7 +238,7 @@ impl OrderStrategy for FastOrderStrategy { .current_form .price() .ok_or("The active order does not have a price!")?; - let delta = (1.0 - (offer_comparison / order_price).abs()) * 100.0; + let delta = (1.0 - (offer_comparison / order_price)).abs() * 100.0; if delta > self.threshold { messages.push(Message::SubmitOrder {