You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defmain():
# Define exchange as KeylessExchangeexchange=blankly.KeylessExchange(
price_reader=blankly.data.data_reader.PriceReader("./XBTUSDT_1D.csv", "BTC-USD")
)
# Use our strategy helper on Binancestrategy=blankly.Strategy(exchange)
# Run the price event function every time we check for a new price - by default that is 15 secondsstrategy.add_price_event(price_event, symbol='BTC-USD', resolution='1d', init=init)
#strategy.start()strategy.backtest(initial_values={'USD': 10000})
if__name__=="__main__":
main()
ie when no to = "1y" argument is passed
raises
backtest-run_trading-1 | File "/usr/local/lib/python3.11/site-packages/blankly/exchanges/interfaces/paper_trade/backtest_controller.py", line 384, in sync_prices
backtest-run_trading-1 | end_time = self.__user_added_times[i][self.PriceIdentifiers.epoch_stop] - resolution
backtest-run_trading-1 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
backtest-run_trading-1 | TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'
Ideally in such a case backtest should use as much data as it can and define start_time and end_time automatically from data
If there is several PriceReader start_time should be max of start_time accross PriceReaders.
and end_time should be min of end_time to consider that a backtest can be done only for overlapping data.
Kind regards
The text was updated successfully, but these errors were encountered:
Hi,
Running RSI example with
ie when no
to = "1y"
argument is passedraises
Ideally in such a case backtest should use as much data as it can and define start_time and end_time automatically from data
If there is several PriceReader start_time should be max of start_time accross PriceReaders.
and end_time should be min of end_time to consider that a backtest can be done only for overlapping data.
Kind regards
The text was updated successfully, but these errors were encountered: