have backtesting use fee_open and fee_close
This commit is contained in:
parent
06d230279c
commit
ce90ee4ac2
@ -114,12 +114,14 @@ class Backtesting(object):
|
|||||||
|
|
||||||
stake_amount = args['stake_amount']
|
stake_amount = args['stake_amount']
|
||||||
max_open_trades = args.get('max_open_trades', 0)
|
max_open_trades = args.get('max_open_trades', 0)
|
||||||
|
fee = exchange.get_fee()
|
||||||
trade = Trade(
|
trade = Trade(
|
||||||
open_rate=buy_row.close,
|
open_rate=buy_row.close,
|
||||||
open_date=buy_row.date,
|
open_date=buy_row.date,
|
||||||
stake_amount=stake_amount,
|
stake_amount=stake_amount,
|
||||||
amount=stake_amount / buy_row.open,
|
amount=stake_amount / buy_row.open,
|
||||||
fee=exchange.get_fee()
|
fee_open=fee,
|
||||||
|
fee_close=fee
|
||||||
)
|
)
|
||||||
|
|
||||||
# calculate win/lose forwards from buy point
|
# calculate win/lose forwards from buy point
|
||||||
|
Loading…
Reference in New Issue
Block a user