This commit is contained in:
@ -106,6 +106,7 @@ class CryptoTradingStrategy:
|
|||||||
if current_price <= position["entry_price"] * (1 - self.stop_loss):
|
if current_price <= position["entry_price"] * (1 - self.stop_loss):
|
||||||
position["should_exit"] = True
|
position["should_exit"] = True
|
||||||
position["exit_reason"] = "stop_loss"
|
position["exit_reason"] = "stop_loss"
|
||||||
|
print("wegood")
|
||||||
|
|
||||||
# Check take profit
|
# Check take profit
|
||||||
elif current_price >= position["entry_price"] * (1 + self.take_profit):
|
elif current_price >= position["entry_price"] * (1 + self.take_profit):
|
||||||
|
Reference in New Issue
Block a user