From 348513c1514311894035642591d046d035c73df3 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 30 Jun 2019 09:47:07 +0200 Subject: [PATCH] Improve formatting of plotting.py --- freqtrade/plot/plotting.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/freqtrade/plot/plotting.py b/freqtrade/plot/plotting.py index 8ac4800bb..2fe15d320 100644 --- a/freqtrade/plot/plotting.py +++ b/freqtrade/plot/plotting.py @@ -84,7 +84,7 @@ def add_indicators(fig, row, indicators: List[str], data: pd.DataFrame) -> tools def plot_trades(fig, trades: pd.DataFrame): """ - Plot trades to "fig" + Add trades to "fig" """ # Trades can be empty if trades is not None and len(trades) > 0: @@ -124,13 +124,9 @@ def plot_trades(fig, trades: pd.DataFrame): return fig -def generate_candlestick_graph( - pair: str, - data: pd.DataFrame, - trades: pd.DataFrame = None, - indicators1: List[str] = [], - indicators2: List[str] = [], -) -> go.Figure: +def generate_candlestick_graph(pair: str, data: pd.DataFrame, trades: pd.DataFrame = None, + indicators1: List[str] = [], + indicators2: List[str] = [],) -> go.Figure: """ Generate the graph from the data generated by Backtesting or from DB Volume will always be ploted in row2, so Row 1 and 3 are to our disposal for custom indicators @@ -243,6 +239,9 @@ def generate_candlestick_graph( def generate_plot_filename(pair, ticker_interval) -> str: + """ + Generate filenames per pair/ticker_interval to be used for storing plots + """ pair_name = pair.replace("/", "_") file_name = 'freqtrade-plot-' + pair_name + '-' + ticker_interval + '.html'