From 514860ac3b5700f33b3e786893e916761a47541f Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 1 Sep 2019 10:17:02 +0200 Subject: [PATCH] Improve documentation --- docs/configuration.md | 27 +++++++++++++++------------ docs/strategy-customization.md | 2 +- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index dc4c365f6..1f64da306 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -192,19 +192,20 @@ end up paying more then would probably have been necessary. ### Understand order_types -The `order_types` configuration parameter contains a dict mapping order-types to -market-types as well as stoploss on or off exchange type and stoploss on exchange -update interval in seconds. This allows to buy using limit orders, sell using +The `order_types` configuration parameter maps actions (`buy`, `sell`, `stoploss`) to order-types (`market`, `limit`, ...) as well as configures stoploss to be on the exchange and stoploss on exchange update interval in seconds. + +This allows to buy using limit orders, sell using limit-orders, and create stoploss orders using market. It also allows to set the stoploss "on exchange" which means stoploss order would be placed immediately once the buy order is fulfilled. In case stoploss on exchange and `trailing_stop` are -both set, then the bot will use `stoploss_on_exchange_interval` to check it periodically -and update it if necessary (e.x. in case of trailing stoploss). -This can be set in the configuration file or in the strategy. -Values set in the configuration file overwrites values set in the strategy. +both set, then the bot will use `stoploss_on_exchange_interval` to check the stoploss periodically +and update it if necessary (e.g. in case of trailing stoploss). +`order_types` can be set in the configuration file or in the strategy. +`order_types` set in the configuration file overwrites values set in the strategy as a whole, so you need to configure the whole `order_types` dictionary in one place. + +If this is configured, the following 4 values (`buy`, `sell`, `stoploss` and +`stoploss_on_exchange`) need to be present, otherwise the bot will fail to start. -If this is configured, all 4 values (`buy`, `sell`, `stoploss` and -`stoploss_on_exchange`) need to be present, otherwise the bot will warn about it and fail to start. `emergencysell` is an optional value, which defaults to `market` and is used when creating stoploss on exchange orders fails. The below is the default which is used if this is not configured in either strategy or configuration file. @@ -242,11 +243,13 @@ Configuration: !!! Note Stoploss on exchange interval is not mandatory. Do not change its value if you are unsure of what you are doing. For more information about how stoploss works please - read [the stoploss documentation](stoploss.md). + refer to [the stoploss documentation](stoploss.md). !!! Note - In case of stoploss on exchange if the stoploss is cancelled manually then - the bot would recreate one. + If `stoploss_on_exchange` is enabled and the stoploss is cancelled manually on the exchange, then the bot wil create a new order. + +!!! Warning stoploss_on_exchange failures + If stoploss on exchange creation fails for some reason, then an "emergency sell" is initiated. By default, this will sell the asset using a market order. The order-type for the emergency-sell can be changed by setting `emergencysell` - however this is not advised. ### Understand order_time_in_force diff --git a/docs/strategy-customization.md b/docs/strategy-customization.md index c7da19659..e07585800 100644 --- a/docs/strategy-customization.md +++ b/docs/strategy-customization.md @@ -224,7 +224,7 @@ This would signify a stoploss of -10%. For the full documentation on stoploss features, look at the dedicated [stoploss page](stoploss.md). -If your exchange supports it, it's recommended to also set `"stoploss_on_exchange"` in the order dict, so your stoploss is on the exchange and cannot be missed for network-problems (or other problems). +If your exchange supports it, it's recommended to also set `"stoploss_on_exchange"` in the order_types dictionary, so your stoploss is on the exchange and cannot be missed due to network-problems (or other problems). For more information on order_types please look [here](configuration.md#understand-order_types).