plot_config documentation for fill_to, fill_label, fill_color

This commit is contained in:
Christof 2020-12-19 18:21:26 +01:00
parent 5b2902fcbc
commit 8b24878023

View File

@ -168,7 +168,7 @@ Additional features when using plot_config include:
* Specify colors per indicator * Specify colors per indicator
* Specify additional subplots * 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. 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. 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'}, 'ema50': {'color': '#CCCCCC'},
# By omitting color, a random color is selected. # By omitting color, a random color is selected.
'sar': {}, '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': { 'subplots': {
# Create subplot MACD # Create subplot MACD
"MACD": { "MACD": {
'macd': {'color': 'blue'}, 'macd': {'color': 'blue', 'fill_to': 'macdhist'},
'macdsignal': {'color': 'orange'}, 'macdsignal': {'color': 'orange'}
}, },
# Additional subplot RSI # Additional subplot RSI
"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 !!! 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 ## Plot profit