Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
pass correct index for shorts
  • Loading branch information
enarjord committed Aug 19, 2021
1 parent 92c4246 commit d1f3b4f
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions njit_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1159,19 +1159,19 @@ def njit_backtest(ticks: np.ndarray,
min_qty,
min_cost,
c_mult,
pbr_stop_loss[0],
pbr_limit[0],
iqty_const[0],
iprc_const[0],
rqty_const[0],
rprc_const[0],
markup_const[0],
iqty_MAr_coeffs[0],
iprc_MAr_coeffs[0],
rprc_PBr_coeffs[0],
rqty_MAr_coeffs[0],
rprc_MAr_coeffs[0],
markup_MAr_coeffs[0])
pbr_stop_loss[1],
pbr_limit[1],
iqty_const[1],
iprc_const[1],
rqty_const[1],
rprc_const[1],
markup_const[1],
iqty_MAr_coeffs[1],
iprc_MAr_coeffs[1],
rprc_PBr_coeffs[1],
rqty_MAr_coeffs[1],
rprc_MAr_coeffs[1],
markup_MAr_coeffs[1])
if long_psize != 0.0 and long_close[0] != 0.0 and prices[k] > long_close[1]:
if qtys[k] < -long_close[0]:
partial_fill = True
Expand Down

0 comments on commit d1f3b4f

Please sign in to comment.