From 79b9eb229de36ae9bc17fd73ff7064743370b2ea Mon Sep 17 00:00:00 2001 From: Gert Wohlgemuth Date: Mon, 7 May 2018 13:25:01 -0700 Subject: [PATCH] fixed some minor bugs --- scripts/plot_dataframe.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/plot_dataframe.py b/scripts/plot_dataframe.py index f6c1f2649..d9153f7e0 100755 --- a/scripts/plot_dataframe.py +++ b/scripts/plot_dataframe.py @@ -124,8 +124,11 @@ def plot_cci_dataframe(data, fig, args, plotnumber): :param args: :return: """ - chart = go.Scattergl(x=data['date'], y=data[args.plotcci], name=args.plotcci) - fig.append_trace(chart, plotnumber, 1) + if args.plotcci: + for x in args.plotcci: + chart = go.Scattergl(x=data['date'], y=data[x], name=x) + fig.append_trace(chart, plotnumber, 1) + def plot_stop_loss_trade(df_sell, fig, analyze, args): @@ -202,6 +205,7 @@ def find_profits(data): # find all previous buys df_sell = data[data['sell'] == 1] + df_sell['profit'] = 0 df_buys = data[data['buy'] == 1] lastDate = data['date'].iloc[0]