Skip to content

Commit

Permalink
bug fixes for shorts
Browse files Browse the repository at this point in the history
  • Loading branch information
enarjord committed Dec 4, 2021
1 parent 67cfb40 commit 054d583
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ def dump_plots(result: dict, fdf: pd.DataFrame, sdf: pd.DataFrame, df: pd.DataFr
if result['shrt']['enabled']:
table.add_row([' ', ' '])
table.add_row(['Short', result['shrt']['enabled']])
table.add_row(["No. initial entries", len(shrts[shrts.type.str.contains('ientry')])])
table.add_row(["No. inital entries", len(shrts[shrts.type.str.contains('ientry')])])
table.add_row(["No. reentries", len(shrts[shrts.type.str.contains('rentry')])])
table.add_row(["No. normal closes", len(shrts[shrts.type.str.contains('nclose')])])
table.add_row(['Mean hours between fills (short)', round_dynamic(result['result']['mean_hrs_between_fills_shrt'], 6)])
table.add_row(['Max hours no fills (short)', round_dynamic(result['result']['max_hrs_no_fills_shrt'], 6)])
table.add_row(['Mean hours stuck (shrt)', round_dynamic(result['result']['hrs_stuck_avg_shrt'], 6)])
table.add_row(['Max hours stuck (shrt)', round_dynamic(result['result']['hrs_stuck_max_shrt'], 6)])
profit_color = Fore.RED if shrts.pnl.sum() < 0 else Fore.RESET
table.add_row(["PNL sum", f"{profit_color}{shrts.pnl.sum()}{Fore.RESET}"])

Expand Down

0 comments on commit 054d583

Please sign in to comment.