backtesting - use exchange from config - use maker fee
This commit is contained in:
parent
a90e90f577
commit
31381b2603
@ -73,7 +73,7 @@ def get_sell_trade_entry(pair, row, buy_subset, ticker, trade_count_lock, args):
|
||||
open_date=row.date,
|
||||
stake_amount=stake_amount,
|
||||
amount=stake_amount / row.open,
|
||||
fee=exchange.get_fee()
|
||||
fee=exchange.get_fee_taker()
|
||||
)
|
||||
|
||||
# calculate win/lose forwards from buy point
|
||||
@ -113,7 +113,6 @@ def backtest(args) -> DataFrame:
|
||||
records = []
|
||||
trades = []
|
||||
trade_count_lock: dict = {}
|
||||
exchange._API = Bittrex({'key': '', 'secret': ''})
|
||||
for pair, pair_data in processed.items():
|
||||
pair_data['buy'], pair_data['sell'] = 0, 0
|
||||
ticker = populate_sell_trend(populate_buy_trend(pair_data))
|
||||
@ -164,13 +163,14 @@ def start(args):
|
||||
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
|
||||
)
|
||||
|
||||
exchange._API = Bittrex({'key': '', 'secret': ''})
|
||||
|
||||
logger.info('Using config: %s ...', args.config)
|
||||
config = misc.load_config(args.config)
|
||||
ticker_interval = config.get('ticker_interval', args.ticker_interval)
|
||||
logger.info('Using ticker_interval: %s ...', ticker_interval)
|
||||
|
||||
# patch config to no key
|
||||
config['key'] = ''
|
||||
config['secret'] = ''
|
||||
exchange.init(config)
|
||||
data = {}
|
||||
pairs = config['exchange']['pair_whitelist']
|
||||
if args.live:
|
||||
|
Loading…
Reference in New Issue
Block a user