fix: Correct entry_price property usage in DynamicStrategy stop loss
This commit is contained in:
parent
3249acd33c
commit
17e9024a3f
@ -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() # Changed from entry_price to 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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user