Merge pull request #2297 from jraviotta/scattergl

Enhancements to BB plotting
This commit is contained in:
Matthias
2019-10-05 11:01:10 +02:00
committed by GitHub
2 changed files with 22 additions and 18 deletions

View File

@@ -197,8 +197,7 @@ def test_generate_candlestick_graph_no_trades(default_conf, mocker, testdatadir)
# All buy-signals should be plotted
assert int(data.sell.sum()) == len(sell.x)
assert find_trace_in_fig_data(figure.data, "BB lower")
assert find_trace_in_fig_data(figure.data, "BB upper")
assert find_trace_in_fig_data(figure.data, "Bollinger Band")
assert row_mock.call_count == 2
assert trades_mock.call_count == 1
@@ -239,7 +238,7 @@ def test_add_profit(testdatadir):
fig1 = add_profit(fig, row=2, data=cum_profits, column='cum_profits', name='Profits')
figure = fig1.layout.figure
profits = find_trace_in_fig_data(figure.data, "Profits")
assert isinstance(profits, go.Scattergl)
assert isinstance(profits, go.Scatter)
assert profits.yaxis == "y2"
@@ -268,14 +267,14 @@ def test_generate_profit_graph(testdatadir):
assert len(figure.data) == 4
avgclose = find_trace_in_fig_data(figure.data, "Avg close price")
assert isinstance(avgclose, go.Scattergl)
assert isinstance(avgclose, go.Scatter)
profit = find_trace_in_fig_data(figure.data, "Profit")
assert isinstance(profit, go.Scattergl)
assert isinstance(profit, go.Scatter)
for pair in pairs:
profit_pair = find_trace_in_fig_data(figure.data, f"Profit {pair}")
assert isinstance(profit_pair, go.Scattergl)
assert isinstance(profit_pair, go.Scatter)
def test_start_plot_dataframe(mocker):