Add plot_config to optional plot

This commit is contained in:
Matthias
2020-01-08 19:35:00 +01:00
parent c3fd894a6c
commit c9b0b4c7a4
6 changed files with 39 additions and 1 deletions

View File

@@ -78,7 +78,7 @@ class {{ strategy }}(IStrategy):
'buy': 'gtc',
'sell': 'gtc'
}
{{ plot_config | indent(4) }}
def informative_pairs(self):
"""
Define additional, informative pair/interval combinations to be cached from the exchange.

View File

@@ -80,6 +80,22 @@ class SampleStrategy(IStrategy):
'sell': 'gtc'
}
plot_config = {
'main_plot': {
'tema': {},
'sar': {'color': 'white'},
},
'subplots': {
"MACD": {
'macd': {'color': 'blue'},
'macdsignal': {'color': 'orange'},
},
"RSI": {
'rsi': {'color': 'red'},
}
}
}
def informative_pairs(self):
"""
Define additional, informative pair/interval combinations to be cached from the exchange.

View File

@@ -0,0 +1,18 @@
plot_config = {
# Main plot indicators (Moving averages, ...)
'main_plot': {
'tema': {},
'sar': {'color': 'white'},
},
'subplots': {
# Subplots - each dict defines one additional plot
"MACD": {
'macd': {'color': 'blue'},
'macdsignal': {'color': 'orange'},
},
"RSI": {
'rsi': {'color': 'red'},
}
}
}