fix test_backtest__enter_trade_futures row data error

This commit is contained in:
adriance 2022-03-14 17:55:42 +08:00
parent 26a74220fd
commit 1d4eeacc6d

View File

@ -581,14 +581,18 @@ def test_backtest__enter_trade_futures(default_conf_usdt, fee, mocker) -> None:
backtesting._set_strategy(backtesting.strategylist[0]) backtesting._set_strategy(backtesting.strategylist[0])
pair = 'UNITTEST/USDT:USDT' pair = 'UNITTEST/USDT:USDT'
row = [ row = [
pd.Timestamp(year=2020, month=1, day=1, hour=5, minute=0), pd.Timestamp(year=2020, month=1, day=1, hour=5, minute=0),
1, # Buy 0.001, # Open
0.001, # Open 0.0012, # High
0.0011, # Close 0.00099, # Low
0, # Sell 0.0011, # Close
0.00099, # Low 1, # enter_long
0.0012, # High 0, # exit_long
'', # Buy Signal Name 1, # enter_short
0, # exit_hsort
'',# Long Signal Name
'', # Short Signal Name
'', # Exit Signal Name
] ]
backtesting.strategy.leverage = MagicMock(return_value=5.0) backtesting.strategy.leverage = MagicMock(return_value=5.0)