From ad3039136a61094ee00ae65a1b2dcd548461aafc Mon Sep 17 00:00:00 2001 From: m5l14i11 Date: Sat, 14 Sep 2024 22:18:17 +0300 Subject: [PATCH] upd --- core/models/position_risk.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/models/position_risk.py b/core/models/position_risk.py index c1cad5c7..f14d520b 100644 --- a/core/models/position_risk.py +++ b/core/models/position_risk.py @@ -415,7 +415,7 @@ def sl_ats(self, side: PositionSide, ta: TechAnalysis, sl: float) -> "float": ) if side == PositionSide.LONG: - l_constr = low_smooth[-1] - volatility_smooth[-1] + l_constr = low_smooth[-1] adjusted_sl = ( min(l_constr, np.max(ats)) if bullish else min(l_constr, ats[-1]) ) @@ -423,7 +423,7 @@ def sl_ats(self, side: PositionSide, ta: TechAnalysis, sl: float) -> "float": return max(sl, adjusted_sl) if side == PositionSide.SHORT: - h_constr = high_smooth[-1] + volatility_smooth[-1] + h_constr = high_smooth[-1] adjusted_sl = ( max(h_constr, np.min(ats)) if bearish else max(h_constr, ats[-1]) )