Hello
I got an error in backtest with ETH-USDT. All candles for ETH-USDT and BTC-USDT are imported to DB and there isn't any problem with BTC-USDT.
my route :
routes = [
('Binance', 'ETH-USDT', '4h', 'SampleTrendFollowing'),
]
and the error :
`CANDLES |
----------------------+--------------------------
period | 274 days (9.13 months)
starting-ending date | 2020-05-01 => 2021-01-30
exchange | symbol | timeframe | strategy | DNA
------------+----------+-------------+----------------------+-------
Binance | ETH-USDT | 4h | SampleTrendFollowing |
============================== EXCEPTION TRACEBACK:
File "c:\program files\python38\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\program files\python38\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\Ali\AppData\Roaming\Python\Python38\Scripts\jesse.exe__main__.py", line 7, in <module>
sys.exit(cli())
File "C:\Users\Ali\AppData\Roaming\Python\Python38\site-packages\click\core.py", line 829, in call
return self.main(args, **kwargs)
File "C:\Users\Ali\AppData\Roaming\Python\Python38\site-packages\click\core.py", line 782, in main
rv = self.invoke(ctx)
File "C:\Users\Ali\AppData\Roaming\Python\Python38\site-packages\click\core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\Ali\AppData\Roaming\Python\Python38\site-packages\click\core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\Ali\AppData\Roaming\Python\Python38\site-packages\click\core.py", line 610, in invoke
return callback(args, **kwargs)
File "C:\Users\Ali\AppData\Roaming\Python\Python38\site-packages\jesse__init.py", line 328, in backtest
backtest_mode.run(start_date, finish_date, chart=chart, tradingview=tradingview, csv=csv,
File "C:\Users\Ali\AppData\Roaming\Python\Python38\site-packages\jesse\modes\backtest_mode__init.py", line 59, in run
simulator(candles)
File "C:\Users\Ali\AppData\Roaming\Python\Python38\site-packages\jesse\modes\backtest_mode__init.py", line 237, in simulator
_simulate_price_change_effect(short_candle, exchange, symbol)
File "C:\Users\Ali\AppData\Roaming\Python\Python38\site-packages\jesse\modes\backtest_mode__init.py", line 341, in simulate_price_change_effect
order.execute()
File "C:\Users\Ali\AppData\Roaming\Python\Python38\site-packages\jesse\models\Order.py", line 153, in execute
p.on_executed_order(self)
File "C:\Users\Ali\AppData\Roaming\Python\Python38\site-packages\jesse\models\Position.py", line 270, in on_executed_order
self.close(price)
File "C:\Users\Ali\AppData\Roaming\Python\Python38\site-packages\jesse\models\Position.py", line 165, in _close
self.exchange.temp_reduced_amount[jh.base_asset(self.symbol)] += abs(close_qty * close_price)
Uncaught Exception: KeyError: 'ETH'`
how to solve the problem ?