Skip to content

Commit

Permalink
fixes for scalp
Browse files Browse the repository at this point in the history
  • Loading branch information
enarjord committed Aug 23, 2021
1 parent 0aba86c commit b2a76eb
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ def dump_plots(result: dict, fdf: pd.DataFrame, df: pd.DataFrame):
if result['long']['enabled']:
table.add_row([' ', ' '])
table.add_row(['Long', result['long']['enabled']])
table.add_row(["No. inital entries", len(longs[longs.type.str.contains('long_ientry')])])
table.add_row(["No. reentries", len(longs[longs.type.str.contains('long_rentry')])])
table.add_row(["No. normal closes", len(longs[longs.type.str.contains('long_nclose')])])
table.add_row(["No. stoploss closes", len(longs[longs.type.str.contains('long_sclose')])])
table.add_row(["No. inital entries", len(longs[longs.type.str.contains('ientry')])])
table.add_row(["No. reentries", len(longs[longs.type.str.contains('rentry')])])
table.add_row(["No. normal closes", len(longs[longs.type.str.contains('nclose')])])
table.add_row(["No. stoploss closes", len(longs[longs.type.str.contains('sclose')])])
table.add_row(["No. partial fills", len(longs[longs.type.str.contains('partial')])])
table.add_row(['Mean hours between fills (long)', round_dynamic(result['result']['mean_hrs_between_fills_long'], 6)])
table.add_row(['Max hours no fills (long)', round_dynamic(result['result']['max_hrs_no_fills_long'], 6)])
Expand All @@ -73,10 +73,10 @@ def dump_plots(result: dict, fdf: pd.DataFrame, df: pd.DataFrame):
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('shrt_ientry')])])
table.add_row(["No. reentries", len(shrts[shrts.type.str.contains('shrt_rentry')])])
table.add_row(["No. normal closes", len(shrts[shrts.type.str.contains('shrt_nclose')])])
table.add_row(["No. stoploss closes", len(shrts[shrts.type.str.contains('shrt_sclose')])])
table.add_row(["No. initial 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(["No. stoploss closes", len(shrts[shrts.type.str.contains('sclose')])])
table.add_row(["No. partial fills", len(shrts[shrts.type.str.contains('partial')])])
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)])
Expand Down

0 comments on commit b2a76eb

Please sign in to comment.