openfund-taker 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.
- {openfund_taker-2.1.12.dist-info → openfund_taker-2.1.14.dist-info}/METADATA +1 -1
- {openfund_taker-2.1.12.dist-info → openfund_taker-2.1.14.dist-info}/RECORD +6 -6
- taker/SMCSLAndTPTaker.py +1 -12
- taker/TrailingSLTaker.py +14 -3
- {openfund_taker-2.1.12.dist-info → openfund_taker-2.1.14.dist-info}/WHEEL +0 -0
- {openfund_taker-2.1.12.dist-info → openfund_taker-2.1.14.dist-info}/entry_points.txt +0 -0
@@ -1,8 +1,8 @@
|
|
1
1
|
taker/MultiAssetOldTradingBot.py,sha256=uBh_BxglvcbaHIsWHM7GI9Qa_QjzsxXaXJAAWEOMO5c,15315
|
2
|
-
taker/SMCSLAndTPTaker.py,sha256=
|
2
|
+
taker/SMCSLAndTPTaker.py,sha256=7Gfq4v6nnK-zVdXKe1-lhLlzfTg8BOEmhlRJ81vjDLA,20743
|
3
3
|
taker/ThreeLineTradingTaker.py,sha256=ElD9pKDO4nxw5VKNRrvXqyiU0gkV_1Mg_zk-hftfaPs,20553
|
4
4
|
taker/TrailingSLAndTPTaker.py,sha256=OPD1ZNqyM8jZ7Im-bWm_6Cu4_qfwKmNZ30XpbP6-l00,2746
|
5
|
-
taker/TrailingSLTaker.py,sha256=
|
5
|
+
taker/TrailingSLTaker.py,sha256=CIjlYqIM_1h4GTMGnCV67SQnk0QryPDL3u_kXJ3qioc,47853
|
6
6
|
taker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
7
|
taker/chua_bitget.py,sha256=YY6XK5Bd-wlArsN5BnAfiqE0h1DPkti6i4TEB4F5zDA,12918
|
8
8
|
taker/chua_bn.py,sha256=GnTePWlgDwdHgroBbEp1Ajcsf5_m_Vn_RV63SYzu2jI,10668
|
@@ -11,7 +11,7 @@ taker/chua_ok_all.py,sha256=2XnZM6QdB3juSE1pqQIJyh2x1XuhlTlnBKNA3owlJ9E,15267
|
|
11
11
|
taker/chua_ok_bot.py,sha256=9SW0ujhi6PfN4yR1JZ9NaA37HtnXJ2QAWUfW52NG68w,13109
|
12
12
|
taker/config.py,sha256=YPxghO5i0vgRg9Cja8kGj9O7pgSbbtzOgf3RexqXXwY,1188
|
13
13
|
taker/main.py,sha256=-EdrzLG6xK0nauItj3eRC8_xva2PnS9CQdzeFJI-6Wc,2769
|
14
|
-
openfund_taker-2.1.
|
15
|
-
openfund_taker-2.1.
|
16
|
-
openfund_taker-2.1.
|
17
|
-
openfund_taker-2.1.
|
14
|
+
openfund_taker-2.1.14.dist-info/METADATA,sha256=gDxo5iUe4Pl5pNdTwkzpL6iBbq6bxdADoQ2bCbIQDiI,7528
|
15
|
+
openfund_taker-2.1.14.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
16
|
+
openfund_taker-2.1.14.dist-info/entry_points.txt,sha256=a7mG8F7aOA5-Gk2vPWuAR4537faxaHUgM_jwIDBZoEc,50
|
17
|
+
openfund_taker-2.1.14.dist-info/RECORD,,
|
taker/SMCSLAndTPTaker.py
CHANGED
@@ -20,18 +20,7 @@ class SMCSLAndTPTaker(TrailingSLTaker):
|
|
20
20
|
self.logger.debug(f"{symbol}: 检查LTF-Struceture是否市价清仓。")
|
21
21
|
# 根据LTF的Struceture识别
|
22
22
|
|
23
|
-
|
24
|
-
|
25
|
-
"""_summary_
|
26
|
-
格式化K线数据
|
27
|
-
Args:
|
28
|
-
klines (_type_): _description_
|
29
|
-
"""
|
30
|
-
klines_df = pd.DataFrame(klines, columns=['timestamp', 'open', 'high', 'low', 'close', 'volume'])
|
31
|
-
# 转换时间戳为日期时间
|
32
|
-
klines_df['timestamp'] = pd.to_datetime(klines_df['timestamp'], unit='ms').dt.tz_localize('UTC').dt.tz_convert('Asia/Shanghai')
|
33
|
-
|
34
|
-
return klines_df
|
23
|
+
|
35
24
|
|
36
25
|
def build_struct(self, df, prd=20, check_bounds=True, global_extremum=False) :
|
37
26
|
|
taker/TrailingSLTaker.py
CHANGED
@@ -141,6 +141,18 @@ class TrailingSLTaker:
|
|
141
141
|
else:
|
142
142
|
raise ValueError("Unexpected response structure or missing candlestick data")
|
143
143
|
|
144
|
+
def format_klines(self,klines) -> pd.DataFrame:
|
145
|
+
|
146
|
+
"""_summary_
|
147
|
+
格式化K线数据
|
148
|
+
Args:
|
149
|
+
klines (_type_): _description_
|
150
|
+
"""
|
151
|
+
klines_df = pd.DataFrame(klines, columns=['timestamp', 'open', 'high', 'low', 'close', 'volume'])
|
152
|
+
# 转换时间戳为日期时间
|
153
|
+
klines_df['timestamp'] = pd.to_datetime(klines_df['timestamp'], unit='ms').dt.tz_localize('UTC').dt.tz_convert('Asia/Shanghai')
|
154
|
+
|
155
|
+
return klines_df
|
144
156
|
|
145
157
|
def is_pivot_high(self, data, index, period, check_bounds=False):
|
146
158
|
"""
|
@@ -177,9 +189,8 @@ class TrailingSLTaker:
|
|
177
189
|
|
178
190
|
|
179
191
|
def get_last_solated_point(self,symbol,position,kLines ,prd=20):
|
180
|
-
# 将K线数据转换为DataFrame格式
|
181
|
-
df =
|
182
|
-
df['timestamp'] = pd.to_datetime(df['timestamp'], unit='ms')
|
192
|
+
# 将K线数据转换为DataFrame格式
|
193
|
+
df = self.format_klines(kLines)
|
183
194
|
|
184
195
|
# 根据position方向寻找孤立点
|
185
196
|
side = position['side']
|
File without changes
|
File without changes
|