From 49350f2a8ee6c2c3293325929fd0ffdece01bf15 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 5 Sep 2021 08:36:22 +0200 Subject: [PATCH] Fix backtesting test --- tests/optimize/test_backtesting.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/optimize/test_backtesting.py b/tests/optimize/test_backtesting.py index 3e3b16371..d2ccef9db 100644 --- a/tests/optimize/test_backtesting.py +++ b/tests/optimize/test_backtesting.py @@ -123,7 +123,7 @@ def _trend(signals, buy_value, sell_value): n = len(signals['low']) buy = np.zeros(n) sell = np.zeros(n) - for i in range(0, len(signals['enter_long'])): + for i in range(0, len(signals['date'])): if random.random() > 0.5: # Both buy and sell signals at same timeframe buy[i] = buy_value sell[i] = sell_value