add backtesting
This commit is contained in:
parent
5a15d50a8d
commit
8480f53730
@ -105,6 +105,10 @@ def backtest(stake_amount: float, processed: Dict[str, DataFrame],
|
||||
|
||||
# calculate win/lose forwards from buy point
|
||||
for row2 in ticker[row.Index + 1:].itertuples(index=True):
|
||||
|
||||
# Update statistic values for trailing stoploss
|
||||
trade.update_stats(row2.close, backtest=True)
|
||||
|
||||
if max_open_trades > 0:
|
||||
# Increase trade_count_lock for every iteration
|
||||
trade_count_lock[row2.date] = trade_count_lock.get(row2.date, 0) + 1
|
||||
|
Loading…
Reference in New Issue
Block a user