openfund-maker 2.1.9__py3-none-any.whl → 2.1.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/BestFVGStrategyMaker.py +9 -1
- maker/SMCStrategyMaker.py +11 -1
- {openfund_maker-2.1.9.dist-info → openfund_maker-2.1.10.dist-info}/METADATA +1 -1
- {openfund_maker-2.1.9.dist-info → openfund_maker-2.1.10.dist-info}/RECORD +6 -6
- {openfund_maker-2.1.9.dist-info → openfund_maker-2.1.10.dist-info}/WHEEL +0 -0
- {openfund_maker-2.1.9.dist-info → openfund_maker-2.1.10.dist-info}/entry_points.txt +0 -0
maker/BestFVGStrategyMaker.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
import traceback
|
3
|
+
from typing import override
|
3
4
|
import pandas as pd
|
4
5
|
|
5
6
|
from maker.SMCStrategyMaker import SMCStrategyMaker
|
@@ -8,7 +9,7 @@ from maker.SMCStrategyMaker import SMCStrategyMaker
|
|
8
9
|
class BestFVGStrategyMaker(SMCStrategyMaker):
|
9
10
|
def __init__(self, config, platform_config, feishu_webhook=None,logger=None):
|
10
11
|
super().__init__(config, platform_config, feishu_webhook, logger)
|
11
|
-
|
12
|
+
|
12
13
|
self.htf_last_CHoCH = {} #记录HTF的CHoCH struct
|
13
14
|
|
14
15
|
def check_price_in_fvg(self, df, side, fvg):
|
@@ -37,6 +38,13 @@ class BestFVGStrategyMaker(SMCStrategyMaker):
|
|
37
38
|
max_price = max(df['high'].iloc[fvg_index+2:])
|
38
39
|
return fvg_bot <= max_price
|
39
40
|
|
41
|
+
@override
|
42
|
+
def reset_all_cache(self, symbol):
|
43
|
+
"""
|
44
|
+
重置所有缓存
|
45
|
+
"""
|
46
|
+
super().reset_all_cache(symbol)
|
47
|
+
self.htf_last_CHoCH[symbol] = {}
|
40
48
|
|
41
49
|
def process_pair(self,symbol,pair_config):
|
42
50
|
self.logger.info("=" * 60)
|
maker/SMCStrategyMaker.py
CHANGED
@@ -516,6 +516,15 @@ class SMCStrategyMaker(ThreeLineStrategyMaker):
|
|
516
516
|
ce = (pivot_high + pivot_low) / 2
|
517
517
|
return float(self.round_price(symbol, ce))
|
518
518
|
|
519
|
+
def calculate_pe(self,symbol,pivot_high, pivot_low) -> float:
|
520
|
+
pe = (pivot_high + pivot_low) / 2
|
521
|
+
return float(self.round_price(symbol, pe))
|
522
|
+
|
523
|
+
def reset_all_cache(self, symbol):
|
524
|
+
"""_summary_
|
525
|
+
重置所有缓存数据
|
526
|
+
"""
|
527
|
+
self.place_order_prices[symbol] = {}
|
519
528
|
|
520
529
|
def process_pair(self,symbol,pair_config):
|
521
530
|
self.logger.info("=" * 60)
|
@@ -531,7 +540,8 @@ class SMCStrategyMaker(ThreeLineStrategyMaker):
|
|
531
540
|
if self.check_position(symbol=symbol) :
|
532
541
|
self.logger.info(f"{symbol} : 有持仓合约,不进行下单。")
|
533
542
|
if symbol in self.place_order_prices:
|
534
|
-
self.
|
543
|
+
self.reset_all_cache(symbol)
|
544
|
+
|
535
545
|
return
|
536
546
|
|
537
547
|
|
@@ -1,6 +1,6 @@
|
|
1
|
-
maker/BestFVGStrategyMaker.py,sha256=
|
1
|
+
maker/BestFVGStrategyMaker.py,sha256=KnrqOaWEJSoba549CiOzSjoC6oQk42YVxa5e_pZJhSg,11532
|
2
2
|
maker/MACDStrategyMaker.py,sha256=iS5HO04piKHFJxUI2e5QmicxzGeK-V1aphJSr2n_4Ac,12651
|
3
|
-
maker/SMCStrategyMaker.py,sha256=
|
3
|
+
maker/SMCStrategyMaker.py,sha256=w1ARnwVAkbm1R5ZeI_XX3dMevz5-lQGvtWqoEFHNVRA,35026
|
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.
|
14
|
-
openfund_maker-2.1.
|
15
|
-
openfund_maker-2.1.
|
16
|
-
openfund_maker-2.1.
|
13
|
+
openfund_maker-2.1.10.dist-info/METADATA,sha256=OjXDHNmAz3AJNRy7tav1RuJhBicfPvbhmHCFJaWYX20,1954
|
14
|
+
openfund_maker-2.1.10.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
15
|
+
openfund_maker-2.1.10.dist-info/entry_points.txt,sha256=gKMytICEKcMRFQDFkHZLnIpID7UQFoTIM_xcpiiV6Ns,50
|
16
|
+
openfund_maker-2.1.10.dist-info/RECORD,,
|
File without changes
|
File without changes
|