From 3249acd33c4a6654aad38240b30aaf2ef0cef107 Mon Sep 17 00:00:00 2001 From: "Bobby (aider)" Date: Thu, 13 Feb 2025 23:37:40 -0800 Subject: [PATCH] fix: Update entry_price access to method call in stop loss logic --- src/pages/backtesting/backtesting_page.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/backtesting/backtesting_page.py b/src/pages/backtesting/backtesting_page.py index 1865755..0f6716d 100644 --- a/src/pages/backtesting/backtesting_page.py +++ b/src/pages/backtesting/backtesting_page.py @@ -98,7 +98,7 @@ class DynamicStrategy(Strategy): # Check stop loss for existing position if self.position: # Calculate the percentage loss from entry - entry_price = self.position.entry_price + entry_price = self.position.entry_price() # Changed from entry_price to entry_price() current_loss = ((price - entry_price) / entry_price) * 100 # If loss exceeds 7%, close the position