From 8b248780231c9b5306a1f42ef0764402f0ffd12e Mon Sep 17 00:00:00 2001 From: Christof Date: Sat, 19 Dec 2020 18:21:26 +0100 Subject: [PATCH] plot_config documentation for fill_to, fill_label, fill_color --- docs/plotting.md | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/docs/plotting.md b/docs/plotting.md index f794cdedc..30844606c 100644 --- a/docs/plotting.md +++ b/docs/plotting.md @@ -168,7 +168,7 @@ Additional features when using plot_config include: * Specify colors per indicator * Specify additional subplots -* Specify idicator pairs to fill area in between +* Specify indicator pairs to fill area in between The sample plot configuration below specifies fixed colors for the indicators. Otherwise consecutive plots may produce different colorschemes each time, making comparisons difficult. It also allows multiple subplots to display both MACD and RSI at the same time. @@ -184,29 +184,32 @@ Sample configuration with inline comments explaining the process: 'ema50': {'color': '#CCCCCC'}, # By omitting color, a random color is selected. 'sar': {}, + # fill area between senkou_a and senkou_b + 'senkou_a': { + 'color': 'green', #optional + 'fill_to': 'senkou_b', + 'fill_label': 'Ichimoku Cloud' #optional, + 'fill_color': 'rgba(255,76,46,0.2)', #optional + }, + # plot senkou_b, too. Not only the area to it. + 'senkou_b': {} }, 'subplots': { # Create subplot MACD "MACD": { - 'macd': {'color': 'blue'}, - 'macdsignal': {'color': 'orange'}, + 'macd': {'color': 'blue', 'fill_to': 'macdhist'}, + 'macdsignal': {'color': 'orange'} }, # Additional subplot RSI "RSI": { - 'rsi': {'color': 'red'}, + 'rsi': {'color': 'red'} } - }, - 'fill_area': { - "Ichimoku Cloud": { - 'traces': ('senkou_a', 'senkou_b'), - 'color': 'rgba(0,176,246,0.2)', - }, - } + } } -``` +``` !!! Note - The above configuration assumes that `ema10`, `ema50`, `macd`, `macdsignal` and `rsi` are columns in the DataFrame created by the strategy. + The above configuration assumes that `ema10`, `ema50`, `senkou_a`, `senkou_b`, `macd`, `macdsignal` and `rsi` are columns in the DataFrame created by the strategy. ## Plot profit