openfund-maker 1.0.8__py3-none-any.whl → 1.0.9__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.
@@ -368,9 +368,8 @@ class ThreeLineOrdergBot:
368
368
  # 计算斜率,【正】表示两线距离扩张,【负】表示两线距离收缩
369
369
  df['slope'] = df['diff'].abs().diff().round(6)
370
370
 
371
- #
372
- return df['slope'].iloc[-1] < 0
373
- # df['statu'] = df['slope']
371
+ # 检查最后两个斜率是否都为负
372
+ return all(slope < 0 for slope in df['slope'].tail(2))
374
373
 
375
374
 
376
375
  def calculate_range_diff(self,prices:pd.Series) -> float:
@@ -462,17 +461,17 @@ class ThreeLineOrdergBot:
462
461
  if is_apex :
463
462
  self.logger.debug(f"{symbol} 金叉:{last_cross_direction},周期见顶 {is_apex},不开单!!")
464
463
  is_bullish_trend = False
465
- return
464
+
466
465
  elif last_cross_direction and last_cross_direction['cross'] == 0 : # 死叉
467
466
  self.logger.debug(f"{symbol} 死叉:{last_cross_direction},清理多单,挂空单!!")
468
467
  is_bullish_trend = False
469
468
  if is_apex :
470
469
  self.logger.debug(f"{symbol} 死叉:{last_cross_direction},周期见顶 {is_apex},不开单!!")
471
470
  is_bearish_trend = False
472
- return
471
+
473
472
  else:
474
473
  self.logger.debug(f"{symbol} 当前没有金叉死叉,以快线趋势为准。!")
475
- return
474
+
476
475
 
477
476
  if not is_bullish_trend and not is_bearish_trend :
478
477
  self.logger.info(f"{symbol} 当前是震荡趋势(平),不挂单!!")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: openfund-maker
3
- Version: 1.0.8
3
+ Version: 1.0.9
4
4
  Summary: Openfund-maker.
5
5
  Requires-Python: >=3.9,<4.0
6
6
  Classifier: Programming Language :: Python :: 3
@@ -1,4 +1,4 @@
1
- maker/ThreeLineOrderBot.py,sha256=bqJj17SQw4XVGXtgDvY-uNCIG4NAwalRjWr5OT_SQG4,23838
1
+ maker/ThreeLineOrderBot.py,sha256=9kj-84oqBlgsfTDm1LdFn3Y4JJ5UmhAVGHMCwY0VIdg,23846
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.8.dist-info/METADATA,sha256=jlncVj8iDI2oWPC2YL6Ox30K71pOUP85HIhWSB9rAws,1965
11
- openfund_maker-1.0.8.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
12
- openfund_maker-1.0.8.dist-info/entry_points.txt,sha256=gKMytICEKcMRFQDFkHZLnIpID7UQFoTIM_xcpiiV6Ns,50
13
- openfund_maker-1.0.8.dist-info/RECORD,,
10
+ openfund_maker-1.0.9.dist-info/METADATA,sha256=2H8RDwdZY6LHayvt139dSj4YoMuz00a5NhnkU6lb5Fw,1965
11
+ openfund_maker-1.0.9.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
12
+ openfund_maker-1.0.9.dist-info/entry_points.txt,sha256=gKMytICEKcMRFQDFkHZLnIpID7UQFoTIM_xcpiiV6Ns,50
13
+ openfund_maker-1.0.9.dist-info/RECORD,,