From ca0ef488cfa6f91437ef71ff18872986d8ea17af Mon Sep 17 00:00:00 2001 From: Yarik Briukhovetskyi <114298166+yariks5s@users.noreply.github.com> Date: Tue, 2 Sep 2025 00:16:11 +0200 Subject: [PATCH] Revert "better" --- back_tester/strategy.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/back_tester/strategy.py b/back_tester/strategy.py index 3ec7aad..83ac44c 100644 --- a/back_tester/strategy.py +++ b/back_tester/strategy.py @@ -487,9 +487,6 @@ def backtest_strategy( entry_signal = None parent_trade_id = None - # Skip the rest - return - # Update trailing stop if enabled if use_trailing_stop and current_trade and current_price > entry_price: updated_stop = calculate_trailing_stop( @@ -563,18 +560,14 @@ def backtest_strategy( } db.insert_trade(trade_data) - # Reset trade tracking since position is fully closed at stop loss - current_trade = None position = 0 entry_price = None entry_time = None entry_index = None entry_signal = None + current_trade = None parent_trade_id = None - # Skip the rest - return - # Handle new signal if signal in ["Bullish", "Bearish"] and position == 0 and trading_signal: # Market regime filter disabled as it's too restrictive