openfund-taker 2.1.8__py3-none-any.whl → 2.1.10__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.8.dist-info → openfund_taker-2.1.10.dist-info}/METADATA +1 -1
- {openfund_taker-2.1.8.dist-info → openfund_taker-2.1.10.dist-info}/RECORD +5 -5
- taker/SMCSLAndTPTaker.py +4 -3
- {openfund_taker-2.1.8.dist-info → openfund_taker-2.1.10.dist-info}/WHEEL +0 -0
- {openfund_taker-2.1.8.dist-info → openfund_taker-2.1.10.dist-info}/entry_points.txt +0 -0
@@ -1,5 +1,5 @@
|
|
1
1
|
taker/MultiAssetOldTradingBot.py,sha256=uBh_BxglvcbaHIsWHM7GI9Qa_QjzsxXaXJAAWEOMO5c,15315
|
2
|
-
taker/SMCSLAndTPTaker.py,sha256=
|
2
|
+
taker/SMCSLAndTPTaker.py,sha256=MILrlvaQUje9Xnczi2rXszhk2XFUzeowJ_YBP4S9gNA,21241
|
3
3
|
taker/ThreeLineTradingTaker.py,sha256=ElD9pKDO4nxw5VKNRrvXqyiU0gkV_1Mg_zk-hftfaPs,20553
|
4
4
|
taker/TrailingSLAndTPTaker.py,sha256=OPD1ZNqyM8jZ7Im-bWm_6Cu4_qfwKmNZ30XpbP6-l00,2746
|
5
5
|
taker/TrailingSLTaker.py,sha256=dvKZ9x-uIq3hWuV_K_gpeDhdtoA99gk15X6z2xaPmbQ,47386
|
@@ -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.10.dist-info/METADATA,sha256=WvZ6UByU-e9v82fpFUWKFWxr4XZE8LsRf0T44i306ik,7528
|
15
|
+
openfund_taker-2.1.10.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
16
|
+
openfund_taker-2.1.10.dist-info/entry_points.txt,sha256=a7mG8F7aOA5-Gk2vPWuAR4537faxaHUgM_jwIDBZoEc,50
|
17
|
+
openfund_taker-2.1.10.dist-info/RECORD,,
|
taker/SMCSLAndTPTaker.py
CHANGED
@@ -10,6 +10,7 @@ class SMCSLAndTPTaker(TrailingSLTaker):
|
|
10
10
|
self.global_symbol_take_profit_price = {} # 记录每个symbol的止盈价格
|
11
11
|
self.htf_liquidities = {}
|
12
12
|
self.all_TP_SL_ratio = float(platform_config.get("all_TP_SL_ratio",1.5)) #The profit-loss ratio 盈亏比
|
13
|
+
self.open_trail_profit = bool(platform_config.get("open_trail_profit",True)) # 开仓是否设置止盈
|
13
14
|
|
14
15
|
@override
|
15
16
|
def check_reverse_position(self,symbol,position,pair_config):
|
@@ -219,13 +220,13 @@ class SMCSLAndTPTaker(TrailingSLTaker):
|
|
219
220
|
current_tier = '无'
|
220
221
|
# 各档止盈逻辑
|
221
222
|
# 确定当前盈利档位
|
222
|
-
if total_profit >= self.second_trail_profit_threshold:
|
223
|
+
if self.open_trail_profit and total_profit >= self.second_trail_profit_threshold:
|
223
224
|
current_tier = "高档"
|
224
225
|
|
225
|
-
elif total_profit>= self.first_trail_profit_threshold:
|
226
|
+
elif self.open_trail_profit and total_profit>= self.first_trail_profit_threshold:
|
226
227
|
current_tier = "中档"
|
227
228
|
|
228
|
-
elif total_profit >= self.low_trail_profit_threshold:
|
229
|
+
elif self.open_trail_profit and total_profit >= self.low_trail_profit_threshold:
|
229
230
|
current_tier = "低档"
|
230
231
|
|
231
232
|
# 根据不同档位设置止损价格,没有单独为交易对设置,用全局参数代替
|
File without changes
|
File without changes
|