openfund-maker 2.1.12__py3-none-any.whl → 2.1.14__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.
@@ -103,7 +103,7 @@ class BestFVGStrategyMaker(SMCStrategyMaker):
103
103
  return
104
104
  else:
105
105
  valid_htf_struct = htf_struct
106
- self.logger.debug(f"{symbol} : {htf} 形成新的 {htf_entry_struct} struct。{valid_htf_struct['struct']} prd={htf_prd}。")
106
+ self.logger.debug(f"{symbol} : {htf} 形成新的struct。{valid_htf_struct['struct']} prd={htf_prd}。")
107
107
 
108
108
  # 检查是否已形成有效的结构
109
109
  htf_struct_label = valid_htf_struct["struct"]
maker/SMCStrategyMaker.py CHANGED
@@ -42,8 +42,9 @@ class SMCStrategyMaker(ThreeLineStrategyMaker):
42
42
  """
43
43
  klines_df = pd.DataFrame(klines, columns=['timestamp', 'open', 'high', 'low', 'close', 'volume'])
44
44
  # 转换时间戳为日期时间
45
- klines_df['timestamp'] = pd.to_datetime(klines_df['timestamp'], unit='ms')
46
- klines_df['timestamp'] = klines_df['timestamp'].dt.tz_localize('UTC').dt.tz_convert('Asia/Shanghai')
45
+ klines_df['timestamp'] = pd.to_datetime(klines_df['timestamp'], unit='ms').dt.tz_localize('UTC').dt.tz_convert('Asia/Shanghai')
46
+ # klines_df['timestamp'] = pd.to_datetime(klines_df['timestamp'], unit='ms')
47
+ # klines_df['timestamp'] = klines_df['timestamp'].dt.tz_localize('UTC').dt.tz_convert('Asia/Shanghai')
47
48
 
48
49
  return klines_df
49
50
 
@@ -489,8 +490,8 @@ class SMCStrategyMaker(ThreeLineStrategyMaker):
489
490
  return False
490
491
  current_high = data.at[index, 'high']
491
492
  prev_highs = data['high'].iloc[max(0,index - period):index]
492
- next_highs = data['high'].iloc[index :min(len(data),index + period + 1)]
493
- return all(current_high >= prev_highs) and all(current_high >= next_highs)
493
+ next_highs = data['high'].iloc[index+1 :min(len(data),index + period )+1]
494
+ return all(current_high >= prev_highs) and all(current_high > next_highs)
494
495
 
495
496
 
496
497
  def is_pivot_low(self, data, index, period, check_bounds=False):
@@ -505,7 +506,7 @@ class SMCStrategyMaker(ThreeLineStrategyMaker):
505
506
  return False
506
507
  current_low = data.at[index, 'low']
507
508
  prev_lows = data['low'].iloc[max(0,index - period):index]
508
- next_lows = data['low'].iloc[index :min(len(data),index + period + 1)]
509
+ next_lows = data['low'].iloc[index+1 :min(len(data),index + period)+1]
509
510
  return all(current_low <= prev_lows) and all(current_low <= next_lows)
510
511
 
511
512
  def round_price(self,symbol, price):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: openfund-maker
3
- Version: 2.1.12
3
+ Version: 2.1.14
4
4
  Summary: Openfund-maker.
5
5
  Requires-Python: >=3.9,<4.0
6
6
  Classifier: Programming Language :: Python :: 3
@@ -1,6 +1,6 @@
1
- maker/BestFVGStrategyMaker.py,sha256=oQk3o87AbL86fKWZiKykUJHLgFcfFYYbHl2NreCTKhQ,11701
1
+ maker/BestFVGStrategyMaker.py,sha256=oZafiWLkyIY6Su17eqF27cXeRSYrmLnGWDeEejVLMsU,11681
2
2
  maker/MACDStrategyMaker.py,sha256=iS5HO04piKHFJxUI2e5QmicxzGeK-V1aphJSr2n_4Ac,12651
3
- maker/SMCStrategyMaker.py,sha256=ThXxa-mfbxNavqok86fUg-HstMdVrBVS75TeCJCt2Ck,35087
3
+ maker/SMCStrategyMaker.py,sha256=T3SQIqbH6mMKS_YXLMqnT96McySp8pz0CUCpxTRVItQ,35227
4
4
  maker/ThreeLineStrategyMaker.py,sha256=ArjnHlGECiD3cCFXxO0Ex5scR2agwoxZY-4mKukyKc4,30402
5
5
  maker/WickReversalStrategyMaker.py,sha256=7DqPDVJot4EM0_lSAcFAHrR9rNvkIds9KLMoDOiAHEc,17486
6
6
  maker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -10,7 +10,7 @@ maker/main_m.py,sha256=0PzDTnuBrxfpy5WDfsIHKAzZ_7pkuvuqqeWik0vpWio,15522
10
10
  maker/okxapi.py,sha256=_9G0U_o0ZC8NxaT6PqpiLgxBm9gPobC9PsFHZE1c5w0,553
11
11
  maker/zhen.py.bak,sha256=HNkrQbJts8G9umE9chEFsc0cLQApcM9KOVNMYPpkBXM,10918
12
12
  maker/zhen_2.py,sha256=4IaHVtTCMSlrLGSTZrWpW2q-f7HZsUNRkW_-5QgWv24,10509
13
- openfund_maker-2.1.12.dist-info/METADATA,sha256=FjmIQVq8KXxMzFunIUSKx8lhzVM2f3tz7V1J5bEuYqY,1954
14
- openfund_maker-2.1.12.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
15
- openfund_maker-2.1.12.dist-info/entry_points.txt,sha256=gKMytICEKcMRFQDFkHZLnIpID7UQFoTIM_xcpiiV6Ns,50
16
- openfund_maker-2.1.12.dist-info/RECORD,,
13
+ openfund_maker-2.1.14.dist-info/METADATA,sha256=B7YWAPXh8CxpY0P27rRD7SrZ0YOUQQXwIXMtApghA-w,1954
14
+ openfund_maker-2.1.14.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
15
+ openfund_maker-2.1.14.dist-info/entry_points.txt,sha256=gKMytICEKcMRFQDFkHZLnIpID7UQFoTIM_xcpiiV6Ns,50
16
+ openfund_maker-2.1.14.dist-info/RECORD,,