diff --git a/docs/plotting.md b/docs/plotting.md index 09eb6ddb5..f794cdedc 100644 --- a/docs/plotting.md +++ b/docs/plotting.md @@ -168,6 +168,7 @@ Additional features when using plot_config include: * Specify colors per indicator * Specify additional subplots +* Specify idicator 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. @@ -194,7 +195,13 @@ Sample configuration with inline comments explaining the process: "RSI": { 'rsi': {'color': 'red'}, } - } + }, + 'fill_area': { + "Ichimoku Cloud": { + 'traces': ('senkou_a', 'senkou_b'), + 'color': 'rgba(0,176,246,0.2)', + }, + } } ``` diff --git a/freqtrade/plot/plotting.py b/freqtrade/plot/plotting.py index ec0d53a0b..2d0d01388 100644 --- a/freqtrade/plot/plotting.py +++ b/freqtrade/plot/plotting.py @@ -383,7 +383,7 @@ def generate_candlestick_graph(pair: str, data: pd.DataFrame, trades: pd.DataFra #fill area betwenn traces i.e. for ichimoku if 'fill_area' in plot_config.keys(): - for area in plot_config['fill_area']: + for label, area in plot_config['fill_area'].items(): #!error: need exactly 2 trace traces = area['traces'] color = area['color'] @@ -397,7 +397,7 @@ def generate_candlestick_graph(pair: str, data: pd.DataFrame, trades: pd.DataFra trace_a = go.Scatter( x=data.date, y=data.get(traces[1]), - name=f'{traces[0]} * {traces[1]}', + name=label, fill="tonexty", fillcolor=color, line={'color': 'rgba(255,255,255,0)'},