Add Underwater plot

This commit is contained in:
Matthias
2022-01-01 14:40:20 +01:00
parent 78ba2d3fc7
commit fb06a673e0
2 changed files with 31 additions and 6 deletions

View File

@@ -336,7 +336,7 @@ def test_generate_profit_graph(testdatadir):
assert fig.layout.yaxis3.title.text == "Profit BTC"
figure = fig.layout.figure
assert len(figure.data) == 6
assert len(figure.data) == 7
avgclose = find_trace_in_fig_data(figure.data, "Avg close price")
assert isinstance(avgclose, go.Scatter)
@@ -348,6 +348,9 @@ def test_generate_profit_graph(testdatadir):
parallel = find_trace_in_fig_data(figure.data, "Parallel trades")
assert isinstance(parallel, go.Bar)
underwater = find_trace_in_fig_data(figure.data, "Underwater Plot")
assert isinstance(underwater, go.Scatter)
for pair in pairs:
profit_pair = find_trace_in_fig_data(figure.data, f"Profit {pair}")
assert isinstance(profit_pair, go.Scatter)