diff --git a/docs/assets/plot-profit.png b/docs/assets/plot-profit.png index 88d69a2d4..e9fe6c341 100644 Binary files a/docs/assets/plot-profit.png and b/docs/assets/plot-profit.png differ diff --git a/docs/plotting.md b/docs/plotting.md index 13e700596..315dbc236 100644 --- a/docs/plotting.md +++ b/docs/plotting.md @@ -284,6 +284,7 @@ The `plot-profit` subcommand shows an interactive graph with three plots: Note that this is not the real-world profit, but more of an estimate. * Profit for each individual pair. * Parallelism of trades. +* Underwater (Periods of drawdown). The first graph is good to get a grip of how the overall market progresses. diff --git a/freqtrade/plot/plotting.py b/freqtrade/plot/plotting.py index 01605284f..c0888808f 100644 --- a/freqtrade/plot/plotting.py +++ b/freqtrade/plot/plotting.py @@ -197,6 +197,9 @@ def add_underwater(fig, row, trades: pd.DataFrame) -> make_subplots: x=underwater['date'], y=underwater['drawdown'], name="Underwater Plot", + fill='tozeroy', + fillcolor='#cc362b', + line={'color': '#cc362b'}, ) fig.add_trace(underwater, row, 1) except ValueError: @@ -211,10 +214,13 @@ def add_parallelism(fig, row, trades: pd.DataFrame, timeframe: str) -> make_subp try: result = analyze_trade_parallelism(trades, timeframe) - drawdown = go.Bar( + drawdown = go.Scatter( x=result.index, y=result['open_trades'], name="Parallel trades", + fill='tozeroy', + fillcolor='#242222', + line={'color': '#242222'}, ) fig.add_trace(drawdown, row, 1) except ValueError: @@ -520,7 +526,6 @@ def generate_profit_graph(pairs: str, data: Dict[str, pd.DataFrame], ) fig = make_subplots(rows=5, cols=1, shared_xaxes=True, - row_width=[1, 1, 1, 1, 1], row_heights=[1, 1, 1, 0.5, 1], vertical_spacing=0.05, subplot_titles=[ diff --git a/tests/test_plotting.py b/tests/test_plotting.py index 82253fec4..40a76d04e 100644 --- a/tests/test_plotting.py +++ b/tests/test_plotting.py @@ -346,7 +346,7 @@ def test_generate_profit_graph(testdatadir): drawdown = find_trace_in_fig_data(figure.data, "Max drawdown 10.45%") assert isinstance(drawdown, go.Scatter) parallel = find_trace_in_fig_data(figure.data, "Parallel trades") - assert isinstance(parallel, go.Bar) + assert isinstance(parallel, go.Scatter) underwater = find_trace_in_fig_data(figure.data, "Underwater Plot") assert isinstance(underwater, go.Scatter)