使用pystock,不需要编写python代码。
该功能用到的模块中,talib的安装较为特殊。我参考了这篇:学习记录654@搞定python安装TA-Lib第三方库_教练 我想学编程的博客-CSDN博客
用这种方法,就不需要下载安装 Microsoft Visual C++ 14.0 or greater 了。
但是需要根据自己python版本和操作系统位数下载对应的whl文件到scripts文件中中。
- Shapely‑1.8.2‑pp38‑pypy38_pp73‑win_amd64.whl
- Shapely‑1.8.2‑cp311‑cp311‑win_amd64.whl
- Shapely‑1.8.2‑cp311‑cp311‑win32.whl
- Shapely‑1.8.2‑cp310‑cp310‑win_amd64.whl
- Shapely‑1.8.2‑cp310‑cp310‑win32.whl
- Shapely‑1.8.2‑cp39‑cp39‑win_amd64.whl
- Shapely‑1.8.2‑cp39‑cp39‑win32.whl
- Shapely‑1.8.2‑cp38‑cp38‑win_amd64.whl
- Shapely‑1.8.2‑cp38‑cp38‑win32.whl
- Shapely‑1.8.1.post1‑cp37‑cp37m‑win_amd64.whl
- Shapely‑1.8.1.post1‑cp37‑cp37m‑win32.whl
- Shapely‑1.7.1‑cp36‑cp36m‑win_amd64.whl
- Shapely‑1.7.1‑cp36‑cp36m‑win32.whl
- Shapely‑1.6.4.post2‑cp35‑cp35m‑win_amd64.whl
安装命令:python -m pip install dlls/Scripts/TA_Lib-0.4.24-cp310-cp310-win_amd64.whl
pystock中我已经安装了。
Package Version
--------------- -------
et-xmlfile 1.1.0
feather-format 0.4.1
numpy 1.23.3
openpyxl 3.0.10
pandas 1.5.0
pip 22.2.2
pyarrow 9.0.0
python-dateutil 2.8.2
pytz 2022.4
setuptools 65.4.1
six 1.16.0
TA-Lib 0.4.24
wheel 0.37.1
安装完成后,先把通达信文件格式转换为本地feather格式:
然后切换到“形态搜索”页签,刷新列表,选中一个股票代码,点“搜索2只乌鸦”按钮,完成后在右侧显示结果。