ccxt - make backtesting work
This commit is contained in:
parent
eb4ac73b78
commit
85af68d807
@ -35,7 +35,7 @@ def load_tickerdata_file(
|
||||
"""
|
||||
path = make_testdata_path(datadir)
|
||||
file = os.path.join(path, '{pair}-{ticker_interval}.json'.format(
|
||||
pair=pair,
|
||||
pair=pair.replace('/', '_'),
|
||||
ticker_interval=ticker_interval,
|
||||
))
|
||||
gzipfile = file + '.gz'
|
||||
@ -126,7 +126,7 @@ def download_backtesting_testdata(datadir: str, pair: str, interval: int = 5) ->
|
||||
interval
|
||||
)
|
||||
|
||||
filepair = pair.replace("-", "_")
|
||||
filepair = pair.replace("/", "_")
|
||||
filename = os.path.join(path, '{pair}-{interval}.json'.format(
|
||||
pair=filepair,
|
||||
interval=interval,
|
||||
|
@ -53,7 +53,10 @@ class Backtesting(object):
|
||||
self.tickerdata_to_dataframe = self.analyze.tickerdata_to_dataframe
|
||||
self.populate_buy_trend = self.analyze.populate_buy_trend
|
||||
self.populate_sell_trend = self.analyze.populate_sell_trend
|
||||
exchange.init({'key': '', 'secret': ''})
|
||||
# Reest keys for backtesting
|
||||
self.config['exchange']['key'] = ''
|
||||
self.config['exchange']['secret'] = ''
|
||||
exchange.init(self.config)
|
||||
|
||||
@staticmethod
|
||||
def get_timeframe(data: Dict[str, DataFrame]) -> Tuple[arrow.Arrow, arrow.Arrow]:
|
||||
|
Loading…
Reference in New Issue
Block a user