From aea5331df8183deeb584d1f56e58cbe6ce7d849b Mon Sep 17 00:00:00 2001 From: gcarq Date: Fri, 8 Sep 2017 16:00:08 +0200 Subject: [PATCH] remove bitwise operator --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 239666d6f..78b24350b 100755 --- a/main.py +++ b/main.py @@ -167,9 +167,9 @@ def handle_trade(trade: Trade) -> None: logger.debug('Handling open trade %s ...', trade) # Get current rate current_rate = api_wrapper.get_ticker(trade.pair)['bid'] - current_profit = 100 * ((current_rate - trade.open_rate) / trade.open_rate) + current_profit = 100.0 * ((current_rate - trade.open_rate) / trade.open_rate) - if 'stoploss' in CONFIG & current_profit < float(CONFIG['stoploss'])*100: + if 'stoploss' in CONFIG and current_profit < float(CONFIG['stoploss']) * 100.0: logger.debug('Stop loss hit.') execute_sell(trade, current_rate) return