This commit is contained in:
Christof 2020-05-25 09:05:24 +02:00
parent fb3d82ccb9
commit 4531c924da

View File

@ -384,9 +384,9 @@ def generate_candlestick_graph(pair: str, data: pd.DataFrame, trades: pd.DataFra
traces = area['traces'] traces = area['traces']
if len(traces) != 2: if len(traces) != 2:
raise Exception( raise Exception(
f"plot_config.fill_area.traces = {traces}: " \ f"plot_config.fill_area.traces = {traces}: " +
+ f"needs exactly 2 indicators. " \ f"needs exactly 2 indicators. " +
+ f"{len(traces)} is given." f"{len(traces)} is given."
) )
color = area['color'] color = area['color']
if traces[0] in data and traces[1] in data: if traces[0] in data and traces[1] in data:
@ -406,6 +406,7 @@ def generate_candlestick_graph(pair: str, data: pd.DataFrame, trades: pd.DataFra
) )
fig.add_trace(trace_b) fig.add_trace(trace_b)
fig.add_trace(trace_a) fig.add_trace(trace_a)
# Add indicators to main plot # Add indicators to main plot
fig = add_indicators(fig=fig, row=1, indicators=plot_config['main_plot'], data=data) fig = add_indicators(fig=fig, row=1, indicators=plot_config['main_plot'], data=data)