openfund-maker 1.2.4__py3-none-any.whl → 1.2.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.
maker/MACDOrderBot.py CHANGED
@@ -63,7 +63,7 @@ class MACDOrdergBot(ThreeLineOrdergBot):
63
63
  break
64
64
 
65
65
  self.logger.debug(f"{symbol} : \n- 所有cross {all_cross} \n- 零轴之上cross {last_up_crosses} \n- 零轴之下cross {last_down_crosses} \n- 其他corss {other_crosses}。")
66
- valid_klines = pair_config.get('valid_klines', 3)
66
+ valid_klines = pair_config.get('valid_klines', 5)
67
67
  # 如果最新的交叉是金叉,且又是零轴上方的金叉
68
68
  if len(last_up_crosses) > 0 and all_cross[0][0] == 'golden' and all_cross[0][1] == last_up_crosses[0][1] and len(macd) - all_cross[0][1] <= valid_klines:
69
69
  order_side = 'buy'
@@ -79,7 +79,9 @@ class MACDOrdergBot(ThreeLineOrdergBot):
79
79
  # 零轴之上的死叉-金叉-死叉模式
80
80
  if (last_up_crosses[0][0] == 'death' and
81
81
  last_up_crosses[1][0] == 'golden' and
82
- last_up_crosses[2][0] == 'death'):
82
+ last_up_crosses[2][0] == 'death' and
83
+ len(macd) - last_up_crosses[0][1] <= valid_klines
84
+ ):
83
85
  order_side = 'sell'
84
86
  self.logger.debug(f"{symbol} : 零轴之上的死叉-金叉-死叉模式 {order_side}。")
85
87
 
@@ -87,7 +89,9 @@ class MACDOrdergBot(ThreeLineOrdergBot):
87
89
  # 零轴之下的金叉-死叉-金叉模式
88
90
  if (last_down_crosses[0][0] == 'golden' and
89
91
  last_down_crosses[1][0] == 'death' and
90
- last_down_crosses[2][0] == 'golden'):
92
+ last_down_crosses[2][0] == 'golden' and
93
+ len(macd) - last_down_crosses[0][1] <= valid_klines
94
+ ):
91
95
  order_side = 'buy'
92
96
  self.logger.debug(f"{symbol} : 零轴之下的金叉-死叉-金叉模式 {order_side}。")
93
97
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: openfund-maker
3
- Version: 1.2.4
3
+ Version: 1.2.5
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/MACDOrderBot.py,sha256=EG-9rxnUBcd6Fh0sUPHDeoXs0l9TKIotI-rL5DqUoOM,8782
1
+ maker/MACDOrderBot.py,sha256=XA-eZBMJ3zYFrpafMiH8YDmT_IKNQMDVr0pq4xMPRiQ,8962
2
2
  maker/ThreeLineOrderBot.py,sha256=I-Y-bMUfBKUB00rNF1UtTc08T5IND1LEBVjHUzG89vU,29064
3
3
  maker/WickReversalOrderBot.py,sha256=Oc6wChdWu39lfWh3NRHM8BqvaRIYDNZiDR6PDnE9XUM,17374
4
4
  maker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -8,7 +8,7 @@ maker/main_m.py,sha256=0PzDTnuBrxfpy5WDfsIHKAzZ_7pkuvuqqeWik0vpWio,15522
8
8
  maker/okxapi.py,sha256=_9G0U_o0ZC8NxaT6PqpiLgxBm9gPobC9PsFHZE1c5w0,553
9
9
  maker/zhen.py.bak,sha256=HNkrQbJts8G9umE9chEFsc0cLQApcM9KOVNMYPpkBXM,10918
10
10
  maker/zhen_2.py,sha256=4IaHVtTCMSlrLGSTZrWpW2q-f7HZsUNRkW_-5QgWv24,10509
11
- openfund_maker-1.2.4.dist-info/METADATA,sha256=0aL-mU5WI3B9e723DRJt0tDlKhjnyXBRA3r_mWPSBCo,1965
12
- openfund_maker-1.2.4.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
13
- openfund_maker-1.2.4.dist-info/entry_points.txt,sha256=gKMytICEKcMRFQDFkHZLnIpID7UQFoTIM_xcpiiV6Ns,50
14
- openfund_maker-1.2.4.dist-info/RECORD,,
11
+ openfund_maker-1.2.5.dist-info/METADATA,sha256=rWWARTIvhux8zmS795-yK0GTtXEe1dJDuugl4bzTTVc,1965
12
+ openfund_maker-1.2.5.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
13
+ openfund_maker-1.2.5.dist-info/entry_points.txt,sha256=gKMytICEKcMRFQDFkHZLnIpID7UQFoTIM_xcpiiV6Ns,50
14
+ openfund_maker-1.2.5.dist-info/RECORD,,