From ec55f1e45ece6e75fa93fe9117790e3054bcc574 Mon Sep 17 00:00:00 2001 From: misagh Date: Sun, 2 Dec 2018 15:38:42 +0100 Subject: [PATCH] slippage to percentage --- freqtrade/freqtradebot.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index 6d64c2faf..06a50f9a4 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -443,9 +443,11 @@ class FreqtradeBot(object): amount = stake_amount / buy_limit + last_candle_close = self.exchange.klines[pair][-1][4] logger.info('passing order... pair: %s, stake_amount: %s, ' - 'buy limit: %s, last candle close: %s', - pair_s, stake_amount, buy_limit, self.exchange.klines[pair][-1][4] + 'buy limit: %s, last candle close: %s, slippage: %s percent.', + pair_s, stake_amount, buy_limit, last_candle_close, + ((buy_limit / last_candle_close) / last_candle_close) * 100 ) order_id = self.exchange.buy(pair=pair, ordertype=self.strategy.order_types['buy'],