This commit is contained in:
Matthias 2019-05-20 20:13:01 +02:00
parent 58ced36445
commit 51aa469f67
5 changed files with 1 additions and 5 deletions

View File

@ -7,7 +7,6 @@ Most of the strategy files already include the optimal `stoploss`
value. This parameter is optional. If you use it in the configuration file, it will take over the
`stoploss` value from the strategy file.
## Stop Loss support
At this stage the bot contains the following stoploss support modes:

View File

@ -93,7 +93,6 @@ class FreqtradeBot(object):
"""
Called on startup and after reloading the bot - triggers notifications and
performs startup tasks
: return: None
"""
self.rpc.startup_messages(self.config, self.pairlists)
if not self.edge:

View File

@ -436,7 +436,6 @@ class Trade(_DECL_BASE):
# Stoploss value got changed
logger.info(f"Stoploss for {trade} needs adjustment.")
logger.info(f"Stoploss: {trade.initial_stop_loss_pct}: {desired_stoploss}")
# Force reset of stoploss
trade.stop_loss = None
trade.adjust_stop_loss(trade.open_rate, desired_stoploss)

View File

@ -114,7 +114,7 @@ def test_cleanup(mocker, default_conf, caplog) -> None:
def test_worker_running(mocker, default_conf, caplog) -> None:
mock_throttle = MagicMock()
mocker.patch('freqtrade.worker.Worker._throttle', mock_throttle)
mocker.patch('freqtrade.persistence.Trade.adjust_initial_stoploss', MagicMock())
mocker.patch('freqtrade.persistence.Trade.stoploss_reinitialization', MagicMock())
worker = get_patched_worker(mocker, default_conf)

View File

@ -822,7 +822,6 @@ def test_stoploss_reinitialization(default_conf, fee):
assert trade_adj.initial_stop_loss == 0.96
assert trade_adj.initial_stop_loss_pct == -0.04
# Trailing stoploss (move stoplos up a bit)
trade.adjust_stop_loss(1.02, 0.04)
assert trade_adj.stop_loss == 0.9792