openfund-maker 2.3.2__py3-none-any.whl → 2.3.3__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 BestTopDownStrategyMaker(StrategyMaker):
103
103
  step = "1.4"
104
104
  # 计算支撑位和阻力位之间的利润空间百分比
105
105
  htf_profit_percent = abs((htf_resistance_price - htf_support_price) / htf_support_price * 100)
106
- min_profit_percent = pair_config.get('min_profit_percent', 4) # 默认最小利润空间为0.5%
106
+ min_profit_percent = top_down_strategy.get('min_profit_percent', 4) # 默认最小利润空间为0.5%
107
107
 
108
108
  if htf_profit_percent < min_profit_percent:
109
109
  self.logger.info(f"{symbol} : {step}. HTF {htf} 支撑位={htf_support_price:.{precision}f} 与阻力位={htf_resistance_price:.{precision}f} 之间利润空间{htf_profit_percent:.2f}% < {min_profit_percent}%,等待...")
@@ -209,32 +209,34 @@ class BestTopDownStrategyMaker(StrategyMaker):
209
209
  step = "2.5"
210
210
  # if "CHOCH" in atf_struct[self.STRUCT_COL] or "BOS" in atf_struct[self.STRUCT_COL]:
211
211
  # 2.5.1. Equal Lows & Equal Highs
212
- end_idx = atf_latest_struct[self.STRUCT_HIGH_INDEX_COL] if atf_side == self.BUY_SIDE else atf_latest_struct[self.STRUCT_LOW_INDEX_COL]
213
- last_EQ = self.find_EQH_EQL(symbol=symbol, data=atf_df, trend=atf_trend, end_idx=end_idx, pair_config=pair_config)
214
- if last_EQ and last_EQ[self.HAS_EQ_KEY]:
215
- price_eq = last_EQ[self.EQUAL_HIGH_COL] if atf_side == self.BUY_SIDE else last_EQ[self.EQUAL_LOW_COL]
216
- self.logger.info(f"{symbol} : {step}.1 ATF {atf} {atf_side} find EQ {price_eq}")
217
- # 检查是否Liquidity Sweeps
218
- if (atf_side == self.BUY_SIDE and atf_latest_struct[self.STRUCT_HIGH_COL] > price_eq) \
219
- or (atf_side == self.SELL_SIDE and atf_latest_struct[self.STRUCT_LOW_COL] < price_eq):
220
-
221
- atf_side = self.SELL_SIDE if atf_side == self.BUY_SIDE else self.BUY_SIDE
222
- self.logger.info(f"{symbol} : {step}.1 ATF {atf} Liquidity Sweeps , Reverse the ATF {atf} {atf_side} side。")
223
- else:
224
- self.logger.info(f"{symbol} : {step}.1 ATF {atf} is not found Liquidity Sweeps .")
225
- else:
226
- self.logger.info(f"{symbol} : {step}.1 ATF {atf} is not found EQ .")
212
+ if top_down_strategy.get('open_check_liquidity_areas', True):
213
+ end_idx = atf_latest_struct[self.STRUCT_HIGH_INDEX_COL] if atf_side == self.BUY_SIDE else atf_latest_struct[self.STRUCT_LOW_INDEX_COL]
214
+ last_EQ = self.find_EQH_EQL(symbol=symbol, data=atf_df, trend=atf_trend, end_idx=end_idx, pair_config=pair_config)
215
+ if last_EQ and last_EQ[self.HAS_EQ_KEY]:
216
+ price_eq = last_EQ[self.EQUAL_HIGH_COL] if atf_side == self.BUY_SIDE else last_EQ[self.EQUAL_LOW_COL]
217
+ self.logger.info(f"{symbol} : {step}.1 ATF {atf} {atf_side} find EQ {price_eq}")
218
+ # 检查是否Liquidity Sweeps
219
+ if (atf_side == self.BUY_SIDE and atf_latest_struct[self.STRUCT_HIGH_COL] > price_eq) \
220
+ or (atf_side == self.SELL_SIDE and atf_latest_struct[self.STRUCT_LOW_COL] < price_eq):
221
+
222
+ atf_side = self.SELL_SIDE if atf_side == self.BUY_SIDE else self.BUY_SIDE
223
+ self.logger.info(f"{symbol} : {step}.1 ATF {atf} Liquidity Sweeps , Reverse the ATF {atf} {atf_side} side。")
224
+ else:
225
+ self.logger.info(f"{symbol} : {step}.1 ATF {atf} is not found Liquidity Sweeps .")
226
+ else:
227
+ self.logger.info(f"{symbol} : {step}.1 ATF {atf} is not found EQ .")
227
228
 
228
229
  # FIXME 2.5.2. Dynamic Trendlines and Channels
229
- # atf_pre_struct = atf_struct[atf_struct[self.STRUCT_DIRECTION_COL].notna()].iloc[-2] # 看前一个结构是否为动态趋势
230
- # atf_start_index = min(atf_pre_struct[self.STRUCT_LOW_INDEX_COL] ,atf_pre_struct[self.STRUCT_HIGH_INDEX_COL])
231
- # atf_end_index = max(atf_latest_struct[self.STRUCT_LOW_INDEX_COL] ,atf_latest_struct[self.STRUCT_HIGH_INDEX_COL])
230
+ if top_down_strategy.get('open_check_dynamic_trendlines_and_channels', True):
231
+ atf_pre_struct = atf_struct[atf_struct[self.STRUCT_DIRECTION_COL].notna()].iloc[-2] # 看前一个结构是否为动态趋势
232
+ atf_start_index = min(atf_pre_struct[self.STRUCT_LOW_INDEX_COL] ,atf_pre_struct[self.STRUCT_HIGH_INDEX_COL])
233
+ atf_end_index = max(atf_latest_struct[self.STRUCT_LOW_INDEX_COL] ,atf_latest_struct[self.STRUCT_HIGH_INDEX_COL])
232
234
 
233
- # is_dynamic_trendlines = self.identify_dynamic_trendlines(symbol=symbol, data=atf_struct, trend=atf_trend, start_idx=atf_start_index, end_idx=atf_end_index)
234
- # if is_dynamic_trendlines :
235
- # self.logger.info(f"{symbol} : {step}.2 ATF {atf} {atf_trend} find Dynamic Trendlines .")
236
- # else:
237
- # self.logger.info(f"{symbol} : {step}.2 ATF {atf} {atf_trend} not find Dynamic Trendlines .")
235
+ is_dynamic_trendlines = self.identify_dynamic_trendlines(symbol=symbol, data=atf_struct, trend=atf_trend, start_idx=atf_start_index, end_idx=atf_end_index)
236
+ if is_dynamic_trendlines :
237
+ self.logger.info(f"{symbol} : {step}.2 ATF {atf} {atf_trend} find Dynamic Trendlines .")
238
+ else:
239
+ self.logger.info(f"{symbol} : {step}.2 ATF {atf} {atf_trend} not find Dynamic Trendlines .")
238
240
 
239
241
 
240
242
  # 2.6. 在HTF供需区范围,找ATF的PDArray,FVG和OB,供需区,计算监测下单区域范围。
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: openfund-maker
3
- Version: 2.3.2
3
+ Version: 2.3.3
4
4
  Summary: Openfund-maker.
5
5
  Requires-Python: >=3.9,<4.0
6
6
  Classifier: Programming Language :: Python :: 3
@@ -1,5 +1,5 @@
1
1
  maker/BestFVGStrategyMaker.py,sha256=a9UfClrfzkgX6jXL2FODzANtawrmGeZ_PVeO1-tweDc,12532
2
- maker/BestTopDownStrategyMaker.py,sha256=-cyoxGn6ZKFJ4neFKnHHJ84ZvODMR-a_agitHz6VNXI,23735
2
+ maker/BestTopDownStrategyMaker.py,sha256=HGG4883WTDBc3PPHNtWAAR4cjtg6r7a7QNv-JLBVOU0,23981
3
3
  maker/MACDStrategyMaker.py,sha256=WX8wqpF9h5W4WclN1NjZ_Bur7KFi_aMTvacfLyHzEcI,12681
4
4
  maker/SMCStrategyMaker.py,sha256=hkDqymWnuyYDo1gTYY_uyO4H4yOwCw8NBTM9RcfLRPc,28780
5
5
  maker/StrategyMaker.py,sha256=iJa-9MxuUwPDOZot2YJmT-sdYHnPZbgPsdCaKvw3Sis,18821
@@ -11,7 +11,7 @@ maker/history_code/okxapi.py,sha256=_9G0U_o0ZC8NxaT6PqpiLgxBm9gPobC9PsFHZE1c5w0,
11
11
  maker/history_code/zhen.py.bak,sha256=HNkrQbJts8G9umE9chEFsc0cLQApcM9KOVNMYPpkBXM,10918
12
12
  maker/history_code/zhen_2.py,sha256=4IaHVtTCMSlrLGSTZrWpW2q-f7HZsUNRkW_-5QgWv24,10509
13
13
  maker/main.py,sha256=PRCP2qCUiUFPQyi1YbvnmW9KqeCZcc0zGjy9OBvMWbM,3723
14
- openfund_maker-2.3.2.dist-info/METADATA,sha256=V93SlcoCwKl4tYklrw4SMY_t2LqVZyFB9ZsF2OhOSD4,2001
15
- openfund_maker-2.3.2.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
16
- openfund_maker-2.3.2.dist-info/entry_points.txt,sha256=gKMytICEKcMRFQDFkHZLnIpID7UQFoTIM_xcpiiV6Ns,50
17
- openfund_maker-2.3.2.dist-info/RECORD,,
14
+ openfund_maker-2.3.3.dist-info/METADATA,sha256=0ZvMTnyUA47auoEj2OmQ4gDGOWDk1PbQEQJ2Wp17XNs,2001
15
+ openfund_maker-2.3.3.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
16
+ openfund_maker-2.3.3.dist-info/entry_points.txt,sha256=gKMytICEKcMRFQDFkHZLnIpID7UQFoTIM_xcpiiV6Ns,50
17
+ openfund_maker-2.3.3.dist-info/RECORD,,