openfund-taker 2.1.3__py3-none-any.whl → 2.1.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {openfund_taker-2.1.3.dist-info → openfund_taker-2.1.5.dist-info}/METADATA +1 -1
- {openfund_taker-2.1.3.dist-info → openfund_taker-2.1.5.dist-info}/RECORD +5 -5
- taker/TrailingSLTaker.py +3 -3
- {openfund_taker-2.1.3.dist-info → openfund_taker-2.1.5.dist-info}/WHEEL +0 -0
- {openfund_taker-2.1.3.dist-info → openfund_taker-2.1.5.dist-info}/entry_points.txt +0 -0
@@ -2,7 +2,7 @@ taker/MultiAssetOldTradingBot.py,sha256=uBh_BxglvcbaHIsWHM7GI9Qa_QjzsxXaXJAAWEOM
|
|
2
2
|
taker/SMCSLAndTPTaker.py,sha256=ad8C94XKiJOdQxZw1vj7RI4iZhjwJ-CWkcpTWx6tRPY,21055
|
3
3
|
taker/ThreeLineTradingTaker.py,sha256=ElD9pKDO4nxw5VKNRrvXqyiU0gkV_1Mg_zk-hftfaPs,20553
|
4
4
|
taker/TrailingSLAndTPTaker.py,sha256=OPD1ZNqyM8jZ7Im-bWm_6Cu4_qfwKmNZ30XpbP6-l00,2746
|
5
|
-
taker/TrailingSLTaker.py,sha256=
|
5
|
+
taker/TrailingSLTaker.py,sha256=Z2rvkuwW2zigAL-KAN3tuhc-56WeCsXr3_UjRnkADpY,47345
|
6
6
|
taker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
7
|
taker/chua_bitget.py,sha256=YY6XK5Bd-wlArsN5BnAfiqE0h1DPkti6i4TEB4F5zDA,12918
|
8
8
|
taker/chua_bn.py,sha256=GnTePWlgDwdHgroBbEp1Ajcsf5_m_Vn_RV63SYzu2jI,10668
|
@@ -11,7 +11,7 @@ taker/chua_ok_all.py,sha256=2XnZM6QdB3juSE1pqQIJyh2x1XuhlTlnBKNA3owlJ9E,15267
|
|
11
11
|
taker/chua_ok_bot.py,sha256=9SW0ujhi6PfN4yR1JZ9NaA37HtnXJ2QAWUfW52NG68w,13109
|
12
12
|
taker/config.py,sha256=YPxghO5i0vgRg9Cja8kGj9O7pgSbbtzOgf3RexqXXwY,1188
|
13
13
|
taker/main.py,sha256=Ulz22BV34Mp8ugh-Dior1mIS8n8si8bMi5RCBit2G4U,2774
|
14
|
-
openfund_taker-2.1.
|
15
|
-
openfund_taker-2.1.
|
16
|
-
openfund_taker-2.1.
|
17
|
-
openfund_taker-2.1.
|
14
|
+
openfund_taker-2.1.5.dist-info/METADATA,sha256=JQDs-eNIZ0ybpDcVe17-MJLnVtJfxkJ_rISHEycZLhw,7527
|
15
|
+
openfund_taker-2.1.5.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
16
|
+
openfund_taker-2.1.5.dist-info/entry_points.txt,sha256=a7mG8F7aOA5-Gk2vPWuAR4537faxaHUgM_jwIDBZoEc,50
|
17
|
+
openfund_taker-2.1.5.dist-info/RECORD,,
|
taker/TrailingSLTaker.py
CHANGED
@@ -662,8 +662,8 @@ class TrailingSLTaker:
|
|
662
662
|
return True
|
663
663
|
|
664
664
|
|
665
|
-
def calculate_sl_price_by_pct(self, symbol,
|
666
|
-
|
665
|
+
def calculate_sl_price_by_pct(self, symbol, position, sl_pct) -> float:
|
666
|
+
side = position['side']
|
667
667
|
if side == 'long':
|
668
668
|
sl_price = position['entryPrice'] * (1 - sl_pct/100)
|
669
669
|
|
@@ -696,7 +696,7 @@ class TrailingSLTaker:
|
|
696
696
|
# 根据持仓方向计算止损价格
|
697
697
|
side = position['side']
|
698
698
|
|
699
|
-
sl_order_price = self.calculate_sl_price_by_pct(symbol,
|
699
|
+
sl_order_price = self.calculate_sl_price_by_pct(symbol, position, stop_loss_pct)
|
700
700
|
# tp_order_price = float(self.round_price_to_tick(symbol, tp_price))
|
701
701
|
|
702
702
|
# 验证止损价格是否合理20250312
|
File without changes
|
File without changes
|