passivbot icon indicating copy to clipboard operation
passivbot copied to clipboard

Bybit back test now working

Open riodda opened this issue 3 years ago • 2 comments

I was testing a config and a coin on binance and all worked fine, i did the same on bybit but it's behaving weirdly. The bactester seems to ignore the backtest time frame and just acts on now data but of course the backtest never ends.

python3 backtest.py -u bybit_01 -s XLMUSDT --start_date 2021-12-01T00:00 --end_date 2022-01-01T00:00 ./configs/backtest/test_1.json

using numba
fetching market_specific_settings...
linear perpetual

exchange                bybit
spot                    False
symbol                  XLMUSDT
market_type             futures
starting_balance        1000
start_date              2021-12-01
end_date                2022-01-01
latency_simulation_ms   1000

linear perpetual
2022-01-03T07:43:01  Finding id for start time... 
2022-01-03T07:43:02  fetched trades XLMUSDT 89624619352 2022-01-03T08:42:56 
2022-01-03T07:43:02  Current time span from 1641184964000 to 1641193035000 with earliest trade id 89575751992 estimating distance of 355366 trades

Last line then keeps showin of, showing now time span, looks like there is something broken in the timestamp of the data that is retrived from bybit.

riodda avatar Jan 03 '22 08:01 riodda

bybit uses seconds. Based on your console output, it looks like its trying to use miliseconds.

rayures avatar Jan 03 '22 09:01 rayures

How do i tell backtest/passivbot to use seconds ?

riodda avatar Jan 03 '22 09:01 riodda