an even, better config naming
This commit is contained in:
parent
29a8674496
commit
0f66d918c6
@ -10,7 +10,7 @@
|
||||
"unfilled_timeout": {
|
||||
"buy": {
|
||||
"after": 10,
|
||||
"if_buy_signal_still_valid": false
|
||||
"even_if_buy_signal_valid": false
|
||||
},
|
||||
"sell": {
|
||||
"after": 30
|
||||
|
@ -10,7 +10,7 @@
|
||||
"unfilled_timeout": {
|
||||
"buy": {
|
||||
"after": 10,
|
||||
"if_buy_signal_still_valid": false
|
||||
"even_if_buy_signal_valid": false
|
||||
},
|
||||
"sell": {
|
||||
"after": 30
|
||||
|
@ -23,7 +23,7 @@
|
||||
"unfilled_timeout": {
|
||||
"buy": {
|
||||
"after": 10,
|
||||
"if_buy_signal_still_valid": false
|
||||
"even_if_buy_signal_valid": false
|
||||
},
|
||||
"sell": {
|
||||
"after": 30
|
||||
|
@ -10,7 +10,7 @@
|
||||
"unfilled_timeout": {
|
||||
"buy": {
|
||||
"after": 10,
|
||||
"if_buy_signal_still_valid": false
|
||||
"even_if_buy_signal_valid": false
|
||||
},
|
||||
"sell": {
|
||||
"after": 30
|
||||
|
@ -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). <br>*Defaults to `0.0` (no offset).* <br> ***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). <br>*Defaults to `false`.* <br> ***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).<br> ***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. <br>*Defaults to `true`.* <br> ***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. <br>*Defaults to `true`.* <br> ***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).<br> ***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). <br> ***Datatype:*** *Boolean*
|
||||
|
@ -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': {
|
||||
|
@ -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()
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user