diff --git a/src/pages/backtesting/backtesting_page.py b/src/pages/backtesting/backtesting_page.py index d1eb987..6794e5e 100644 --- a/src/pages/backtesting/backtesting_page.py +++ b/src/pages/backtesting/backtesting_page.py @@ -103,7 +103,7 @@ class DynamicStrategy(Strategy): if self.position and self.position.size > 0: # Make sure we have an active position try: # Calculate the percentage loss from entry - entry_price = self.position.entry_price # Changed from entry to entry_price + entry_price = self.position.entry # Changed from entry_price to entry current_loss = ((price - entry_price) / entry_price) * 100 # If loss exceeds 7%, close the position