diff --git a/config.json.example b/config.json.example index c1686a4ac..85f8015ea 100644 --- a/config.json.example +++ b/config.json.example @@ -10,7 +10,7 @@ "unfilled_timeout": { "buy": { "after": 10, - "if_buy_signal_still_valid": false + "even_if_buy_signal_valid": false }, "sell": { "after": 30 diff --git a/config_binance.json.example b/config_binance.json.example index 7c884feeb..3e8ec0b14 100644 --- a/config_binance.json.example +++ b/config_binance.json.example @@ -10,7 +10,7 @@ "unfilled_timeout": { "buy": { "after": 10, - "if_buy_signal_still_valid": false + "even_if_buy_signal_valid": false }, "sell": { "after": 30 diff --git a/config_full.json.example b/config_full.json.example index 79adde9da..390496e62 100644 --- a/config_full.json.example +++ b/config_full.json.example @@ -23,7 +23,7 @@ "unfilled_timeout": { "buy": { "after": 10, - "if_buy_signal_still_valid": false + "even_if_buy_signal_valid": false }, "sell": { "after": 30 diff --git a/config_kraken.json.example b/config_kraken.json.example index 4b2520455..f24cade01 100644 --- a/config_kraken.json.example +++ b/config_kraken.json.example @@ -10,7 +10,7 @@ "unfilled_timeout": { "buy": { "after": 10, - "if_buy_signal_still_valid": false + "even_if_buy_signal_valid": false }, "sell": { "after": 30 diff --git a/docs/configuration.md b/docs/configuration.md index b3123cb10..6bc788c4e 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -59,7 +59,7 @@ Mandatory parameters are marked as **Required**, which means that they are requi | `trailing_stop_positive_offset` | Offset on when to apply `trailing_stop_positive`. Percentage value which should be positive. More details in the [stoploss documentation](stoploss.md). [Strategy Override](#parameters-in-the-strategy).
*Defaults to `0.0` (no offset).*
***Datatype:*** *Float* | `trailing_only_offset_is_reached` | Only apply trailing stoploss when the offset is reached. [stoploss documentation](stoploss.md). [Strategy Override](#parameters-in-the-strategy).
*Defaults to `false`.*
***Datatype:*** *Boolean* | `unfilled_timeout.buy.after` | **Required.** How long (in minutes) the bot will wait for an unfilled buy order to complete, after which the order will be cancelled. [Strategy Override](#parameters-in-the-strategy).
***Datatype:*** *Integer* -| `unfilled_timeout.buy.if_buy_signal_still_valid` | **Required.** Choose whether you would prefer unfilled buy orders to [timeout if buy signal was still valid](#timeout-even-if-buy-signal-valid). If false, your unfilled buy orders won't get timed out, so use this option wisely.
*Defaults to `true`.*
***Datatype:*** *Boolean* +| `unfilled_timeout.buy.even_if_buy_signal_valid` | **Required.** Choose whether you would prefer your unfilled buy orders to [timeout even if buy signal was still valid](#timeout-even-if-buy-signal-valid). If false, your unfilled buy orders won't get timed out, so use this option wisely.
*Defaults to `true`.*
***Datatype:*** *Boolean* | `unfilled_timeout.sell.after` | **Required.** How long (in minutes) the bot will wait for an unfilled sell order to complete, after which the order will be cancelled. [Strategy Override](#parameters-in-the-strategy).
***Datatype:*** *Integer* | `bid_strategy.ask_last_balance` | **Required.** Set the bidding price. More information [below](#buy-price-without-orderbook). | `bid_strategy.use_order_book` | Enable buying using the rates in [Order Book Bids](#buy-price-with-orderbook-enabled).
***Datatype:*** *Boolean* diff --git a/freqtrade/constants.py b/freqtrade/constants.py index 8c3ccdc6a..b38ffc9ba 100644 --- a/freqtrade/constants.py +++ b/freqtrade/constants.py @@ -101,7 +101,7 @@ CONF_SCHEMA = { 'type': 'object', 'properties': { 'after': {'type': 'number', 'minimum': 1}, - 'if_buy_signal_still_valid': {'type': 'boolean'}, + 'even_if_buy_signal_valid': {'type': 'boolean'}, }, }, 'sell': { diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index aaec927f3..6d669d23a 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -827,12 +827,12 @@ class FreqtradeBot: self.dataprovider.ohlcv(trade.pair, self.strategy.ticker_interval)) # proceed to cancel buy order by timeout if configuration - # unfilled_timeout.if_buy_signal_still_valid is true (original behaviour) -OR- + # unfilled_timeout.even_if_buy_signal_valid is true (original behaviour) -OR- # cancel buy order only if buying condition is no longer valid OR if there's # a sell signal present - config_buy_signal_still_valid = self.config.get('unfilled_timeout', {}) \ - .get('buy').get('if_buy_signal_still_valid') - if (config_buy_signal_still_valid) or (not buy or sell): + config_timeout_eifbsv = self.config.get('unfilled_timeout', {}) \ + .get('buy').get('even_if_buy_signal_valid') + if (config_timeout_eifbsv) or (not buy or sell): self.handle_timedout_limit_buy(trade, order) self.wallets.update() diff --git a/tests/conftest.py b/tests/conftest.py index 349c46499..0f7cd02a7 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -213,7 +213,7 @@ def default_conf(testdatadir): "unfilled_timeout": { "buy": { "after": 10, - "if_buy_signal_still_valid": False + "even_if_buy_signal_valid": False }, "sell": { "after": 30