openfund-maker 1.0.9__py3-none-any.whl → 1.0.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.
- maker/ThreeLineOrderBot.py +4 -2
- {openfund_maker-1.0.9.dist-info → openfund_maker-1.0.10.dist-info}/METADATA +1 -1
- {openfund_maker-1.0.9.dist-info → openfund_maker-1.0.10.dist-info}/RECORD +5 -5
- {openfund_maker-1.0.9.dist-info → openfund_maker-1.0.10.dist-info}/WHEEL +0 -0
- {openfund_maker-1.0.9.dist-info → openfund_maker-1.0.10.dist-info}/entry_points.txt +0 -0
maker/ThreeLineOrderBot.py
CHANGED
@@ -359,7 +359,7 @@ class ThreeLineOrdergBot:
|
|
359
359
|
'index': None
|
360
360
|
}
|
361
361
|
|
362
|
-
def judge_ma_apex(self,fastklines,slowklines) -> bool:
|
362
|
+
def judge_ma_apex(self,symbol, fastklines,slowklines) -> bool:
|
363
363
|
df = pd.DataFrame()
|
364
364
|
df['ema'] = fastklines
|
365
365
|
df['sma'] = slowklines
|
@@ -368,6 +368,7 @@ class ThreeLineOrdergBot:
|
|
368
368
|
# 计算斜率,【正】表示两线距离扩张,【负】表示两线距离收缩
|
369
369
|
df['slope'] = df['diff'].abs().diff().round(6)
|
370
370
|
|
371
|
+
self.logger.debug(f"{symbol}: slopes = {df['slope'].tail(5)} ")
|
371
372
|
# 检查最后两个斜率是否都为负
|
372
373
|
return all(slope < 0 for slope in df['slope'].tail(2))
|
373
374
|
|
@@ -453,7 +454,7 @@ class ThreeLineOrdergBot:
|
|
453
454
|
is_bearish_trend = True
|
454
455
|
|
455
456
|
# 结合金叉死叉判断是否是周期顶部和底部
|
456
|
-
is_apex = self.judge_ma_apex(fastklines=fastk,slowklines=slowk)
|
457
|
+
is_apex = self.judge_ma_apex(symbol=symbol,fastklines=fastk,slowklines=slowk)
|
457
458
|
# 金叉死叉逻辑
|
458
459
|
if last_cross_direction and last_cross_direction['cross'] == 1 : # 金叉
|
459
460
|
self.logger.debug(f"{symbol} 金叉:{last_cross_direction},清理空单,挂多单!!")
|
@@ -545,6 +546,7 @@ class ThreeLineOrdergBot:
|
|
545
546
|
symbols = list(self.trading_pairs_config.keys()) # 获取所有币对的ID
|
546
547
|
batch_size = 5 # 每批处理的数量
|
547
548
|
while True:
|
549
|
+
|
548
550
|
for i in range(0, len(symbols), batch_size):
|
549
551
|
batch = symbols[i:i + batch_size]
|
550
552
|
with ThreadPoolExecutor(max_workers=batch_size) as executor:
|
@@ -1,4 +1,4 @@
|
|
1
|
-
maker/ThreeLineOrderBot.py,sha256=
|
1
|
+
maker/ThreeLineOrderBot.py,sha256=pnJ8qQvsP1cksFs2FCKaenjwkhwx4ODyO2JWvhvFEqA,23941
|
2
2
|
maker/WickReversalOrderBot.py,sha256=Oc6wChdWu39lfWh3NRHM8BqvaRIYDNZiDR6PDnE9XUM,17374
|
3
3
|
maker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
4
|
maker/config.py,sha256=YPxghO5i0vgRg9Cja8kGj9O7pgSbbtzOgf3RexqXXwY,1188
|
@@ -7,7 +7,7 @@ maker/main_m.py,sha256=0PzDTnuBrxfpy5WDfsIHKAzZ_7pkuvuqqeWik0vpWio,15522
|
|
7
7
|
maker/okxapi.py,sha256=_9G0U_o0ZC8NxaT6PqpiLgxBm9gPobC9PsFHZE1c5w0,553
|
8
8
|
maker/zhen.py.bak,sha256=HNkrQbJts8G9umE9chEFsc0cLQApcM9KOVNMYPpkBXM,10918
|
9
9
|
maker/zhen_2.py,sha256=4IaHVtTCMSlrLGSTZrWpW2q-f7HZsUNRkW_-5QgWv24,10509
|
10
|
-
openfund_maker-1.0.
|
11
|
-
openfund_maker-1.0.
|
12
|
-
openfund_maker-1.0.
|
13
|
-
openfund_maker-1.0.
|
10
|
+
openfund_maker-1.0.10.dist-info/METADATA,sha256=9mOPJj5EQMbRwfvF8akyHekrt8f6RoHkFrEZgqqFXSI,1966
|
11
|
+
openfund_maker-1.0.10.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
12
|
+
openfund_maker-1.0.10.dist-info/entry_points.txt,sha256=gKMytICEKcMRFQDFkHZLnIpID7UQFoTIM_xcpiiV6Ns,50
|
13
|
+
openfund_maker-1.0.10.dist-info/RECORD,,
|
File without changes
|
File without changes
|