Fix the fee calculation

This commit is contained in:
Gerald Lonlas
2017-12-17 13:07:56 -08:00
parent 642422d5c4
commit 7541bf8c65
9 changed files with 343 additions and 82 deletions

View File

@@ -109,7 +109,7 @@ def backtest(config: Dict, processed: Dict[str, DataFrame],
trade_count_lock[row2.date] = trade_count_lock.get(row2.date, 0) + 1
if min_roi_reached(trade, row2.close, row2.date) or row2.sell == 1:
current_profit = trade.calc_profit(row2.close)
current_profit = trade.calc_profit_percent(row2.close)
lock_pair_until = row2.Index
trades.append((pair, current_profit, row2.Index - row.Index))