From 6d588b3b0bf0f464a5cd86bb435c4887773823f1 Mon Sep 17 00:00:00 2001 From: misagh Date: Wed, 16 Jan 2019 14:28:52 +0100 Subject: [PATCH] trailing stop loss on exchange extracted to a separate function --- freqtrade/freqtradebot.py | 2 +- freqtrade/tests/test_freqtradebot.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index 25951aba5..544e4a997 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -652,7 +652,7 @@ class FreqtradeBot(object): # if trailing stoploss is enabled we check if stoploss value has changed # in which case we cancel stoploss order and put another one with new # value immediately - handle_trailing_stoploss_on_exchange(trade, order) + self.handle_trailing_stoploss_on_exchange(trade, order) return result diff --git a/freqtrade/tests/test_freqtradebot.py b/freqtrade/tests/test_freqtradebot.py index dcdae16fe..fe2dd0ec2 100644 --- a/freqtrade/tests/test_freqtradebot.py +++ b/freqtrade/tests/test_freqtradebot.py @@ -1080,7 +1080,6 @@ def test_handle_stoploss_on_exchange_trailing(mocker, default_conf, fee, caplog, 'last': 0.00002344 })) - cancel_order_mock = MagicMock() stoploss_order_mock = MagicMock() mocker.patch('freqtrade.exchange.Exchange.cancel_order', cancel_order_mock)