Git Product home page Git Product logo

autotrader's Introduction

简介:博客地址:https://www.liujunwu.cn/wordpress/?p=278

因为某些历史原因,加之现在券商并没有全面开放量化接口,存在一定资金门槛,导致很多人没法便利的使用量化接口,但是又存在着自动交易的需求,所以有人就开始研究模拟键鼠操作来交易,虽然比不上接口,但是对很多人来说已经够用了。所谓量化,不一定是说要高频,只是说你的策略能够体现在实际数据上,指标和实时信号能够被量化而已,其实这个项目最早我并不想造轮子,但是现有的轮子:easytraderThstrader因为没有更新的缘故,会出现一些莫名其妙的错误,遂萌生了自己造轮子的想法,于是有了这个项目,当然项目比较粗糙,很多东西依旧不够完善,但是会慢慢改进,在这里也要感谢前面两位大佬源代码提供的思路,需要注意的是,由于我个人使用的是长城证券,所以下载的是长城证券的同花顺客户端,其他券商的我没有实验过,理论上来说,券商版的同花顺应该是通用的,保证同花顺版本一致就行。

思路:

使用pywinauto模块(其实国内也有类似的库,叫uiautomation,我测试下来感觉更高效,但是没有什么资料)操作句柄,tesseract模块识别验证码,如要转载请标明来源

工具:

pycharm
anaconda(虽然有些臃肿,但是我们并不是要成为专业开发者,一切以便利和可复用为导向)
tesseract-ocr-setup-3.05.02-20180621(这是我安装的版本,至于如何添加进环境变量可百度,安装时不要添加多国语言,你会被下载速度弄崩溃的)

环境:

Python3.9.7
pywin32-300(最新版本应该是302,但是会出现找不到模块的错误,最好更换成300或者之前的版本)
pytesseract0.3.9
pillow8.4.0
pywinauto0.6.8 
券商同花顺6.9

环境安装:(如果不会使用anaconda控制台,建议先百度教程看看,后续我也会写anaconda一些简单操作)

conda环境安装:
pip install --upgrade pywin32==300 -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install pytesseract  -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install pillow  -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install pywinauto -i https://pypi.tuna.tsinghua.edu.cn/simple

开源地址:GitHub

autotrader's People

Contributors

please-call-119 avatar

Stargazers

Bruce Wen avatar

Watchers

Bruce Wen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.