From 5da63d399be30908273ce7b2db7178e380a54dad Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 9 Mar 2020 17:38:25 +0100 Subject: [PATCH 1/5] Reduce default order_book_max to 1 --- config.json.example | 2 +- config_binance.json.example | 2 +- config_full.json.example | 2 +- config_kraken.json.example | 2 +- freqtrade/templates/base_config.json.j2 | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config.json.example b/config.json.example index 46441e72d..8ebb092e1 100644 --- a/config.json.example +++ b/config.json.example @@ -23,7 +23,7 @@ "ask_strategy":{ "use_order_book": false, "order_book_min": 1, - "order_book_max": 9, + "order_book_max": 1, "use_sell_signal": true, "sell_profit_only": false, "ignore_roi_if_buy_signal": false diff --git a/config_binance.json.example b/config_binance.json.example index e2c9879b0..d324ce883 100644 --- a/config_binance.json.example +++ b/config_binance.json.example @@ -23,7 +23,7 @@ "ask_strategy":{ "use_order_book": false, "order_book_min": 1, - "order_book_max": 9, + "order_book_max": 1, "use_sell_signal": true, "sell_profit_only": false, "ignore_roi_if_buy_signal": false diff --git a/config_full.json.example b/config_full.json.example index f0414bd0d..181740b9a 100644 --- a/config_full.json.example +++ b/config_full.json.example @@ -38,7 +38,7 @@ "price_side": "ask", "use_order_book": false, "order_book_min": 1, - "order_book_max": 9, + "order_book_max": 1, "use_sell_signal": true, "sell_profit_only": false, "ignore_roi_if_buy_signal": false diff --git a/config_kraken.json.example b/config_kraken.json.example index 4f74d0b7d..dcf4c552a 100644 --- a/config_kraken.json.example +++ b/config_kraken.json.example @@ -23,7 +23,7 @@ "ask_strategy":{ "use_order_book": false, "order_book_min": 1, - "order_book_max": 9, + "order_book_max": 1, "use_sell_signal": true, "sell_profit_only": false, "ignore_roi_if_buy_signal": false diff --git a/freqtrade/templates/base_config.json.j2 b/freqtrade/templates/base_config.json.j2 index 0049d59a0..134719273 100644 --- a/freqtrade/templates/base_config.json.j2 +++ b/freqtrade/templates/base_config.json.j2 @@ -24,7 +24,7 @@ "price_side": "ask", "use_order_book": false, "order_book_min": 1, - "order_book_max": 9, + "order_book_max": 1, "use_sell_signal": true, "sell_profit_only": false, "ignore_roi_if_buy_signal": false From 74a17c7b7b45cac99238bcb684e7089c5b92c735 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 9 Mar 2020 17:38:35 +0100 Subject: [PATCH 2/5] Clarify warning in the documentation --- docs/configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/configuration.md b/docs/configuration.md index 5580b9c68..aedd3e043 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -537,7 +537,7 @@ The idea here is to place the sell order early, to be ahead in the queue. A fixed slot (mirroring `bid_strategy.order_book_top`) can be defined by setting `ask_strategy.order_book_min` and `ask_strategy.order_book_max` to the same number. !!! Warning "Orderbook and stoploss_on_exchange" - Using `ask_strategy.order_book_max` higher than 1 may increase the risk, since an eventual [stoploss on exchange](#understand-order_types) will be needed to be cancelled as soon as the order is placed. + Using `ask_strategy.order_book_max` higher than 1 will increase the risk, since an eventual [stoploss on exchange](#understand-order_types) will be needed to be cancelled as soon as the order is placed. Also, the sell order will remain on the exchange for `unfilledtimeout.sell` (or until it's filled) - which can lead to missed stoplosses (even without stoploss on exchange). #### Sell price without Orderbook enabled From e0afbcd4af8e2b1e51a5eaca2b7e5ecd457f9f53 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 9 Mar 2020 17:41:44 +0100 Subject: [PATCH 3/5] Additional warning about order_book-max --- docs/configuration.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index aedd3e043..a9487a0ed 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -536,8 +536,14 @@ The idea here is to place the sell order early, to be ahead in the queue. A fixed slot (mirroring `bid_strategy.order_book_top`) can be defined by setting `ask_strategy.order_book_min` and `ask_strategy.order_book_max` to the same number. -!!! Warning "Orderbook and stoploss_on_exchange" - Using `ask_strategy.order_book_max` higher than 1 will increase the risk, since an eventual [stoploss on exchange](#understand-order_types) will be needed to be cancelled as soon as the order is placed. Also, the sell order will remain on the exchange for `unfilledtimeout.sell` (or until it's filled) - which can lead to missed stoplosses (even without stoploss on exchange). +!!! Warning "Order_book_max > 1 - increased Risk!" + Using `ask_strategy.order_book_max` higher than 1 will increase the risk, since an eventual [stoploss on exchange](#understand-order_types) will be needed to be cancelled as soon as the order is placed. + Also, the sell order will remain on the exchange for `unfilledtimeout.sell` (or until it's filled) - which can lead to missed stoplosses (with or without using stoploss_on_exchange). + +!!! Warning "Order_book_max > 1 in dry-run" + Using `ask_strategy.order_book_max` higher than 1 will result in improved dry-run results, since dry-run assumes orders to be filled almost instantly. + It is therefore advised to not use this setting for dry-runs. + #### Sell price without Orderbook enabled From 42038da7f1f47d5e34cc10af04f9b42c5f6e4533 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 10 Mar 2020 07:57:25 +0100 Subject: [PATCH 4/5] Update docs/configuration.md Co-Authored-By: hroff-1902 <47309513+hroff-1902@users.noreply.github.com> --- docs/configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/configuration.md b/docs/configuration.md index a9487a0ed..1fca61fdb 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -541,7 +541,7 @@ A fixed slot (mirroring `bid_strategy.order_book_top`) can be defined by setting Also, the sell order will remain on the exchange for `unfilledtimeout.sell` (or until it's filled) - which can lead to missed stoplosses (with or without using stoploss_on_exchange). !!! Warning "Order_book_max > 1 in dry-run" - Using `ask_strategy.order_book_max` higher than 1 will result in improved dry-run results, since dry-run assumes orders to be filled almost instantly. + Using `ask_strategy.order_book_max` higher than 1 will result in improper dry-run results (significantly better than real orders executed on exchange), since dry-run assumes orders to be filled almost instantly. It is therefore advised to not use this setting for dry-runs. From a046c4829c01ad2934337c59a304b181cb4f2a23 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 10 Mar 2020 09:03:44 +0100 Subject: [PATCH 5/5] Apply suggestions from code review Co-Authored-By: hroff-1902 <47309513+hroff-1902@users.noreply.github.com> --- docs/configuration.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index 1fca61fdb..76df5bd08 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -536,9 +536,9 @@ The idea here is to place the sell order early, to be ahead in the queue. A fixed slot (mirroring `bid_strategy.order_book_top`) can be defined by setting `ask_strategy.order_book_min` and `ask_strategy.order_book_max` to the same number. -!!! Warning "Order_book_max > 1 - increased Risk!" - Using `ask_strategy.order_book_max` higher than 1 will increase the risk, since an eventual [stoploss on exchange](#understand-order_types) will be needed to be cancelled as soon as the order is placed. - Also, the sell order will remain on the exchange for `unfilledtimeout.sell` (or until it's filled) - which can lead to missed stoplosses (with or without using stoploss_on_exchange). +!!! Warning "Order_book_max > 1 - increased risks for stoplosses!" + Using `ask_strategy.order_book_max` higher than 1 will increase the risk the stoploss on exchange is cancelled too early, since an eventual [stoploss on exchange](#understand-order_types) will be cancelled as soon as the order is placed. + Also, the sell order will remain on the exchange for `unfilledtimeout.sell` (or until it's filled) - which can lead to missed stoplosses (with or without using stoploss on exchange). !!! Warning "Order_book_max > 1 in dry-run" Using `ask_strategy.order_book_max` higher than 1 will result in improper dry-run results (significantly better than real orders executed on exchange), since dry-run assumes orders to be filled almost instantly.