Comments (1)
@handsomu 这个属于RQAlpha enhancement 的内容,重新在RQAlpha 项目上开一个issue~
我想了一下,有两种方案:
维持现有的API 不变,增加 buy_close_tody
和 sell_close_today
API 来区分平今还是平昨,用户自行处理自己到底需要发的是什么单,因为像上期这种对今仓和昨仓做了区分的,用户也有选择自己要平什么仓位的业务场景。
第二种是增加一个只能开平的API,区别于现有 buy_open
/ buy_close
/ sell_open
/ sell_close
,比如 order(side, quantity, price=None, position_effect=None)
当不设置 price
就是 market_order
, 不设置 position_effect
就自动判断开平及昨仓今仓。
至于具体的方案,可能还需要讨论一下
from rqalpha-mod-vnpy.
Related Issues (20)
- vnpy在onRtnDepthMarketData的问题 HOT 4
- 脱离 vtGateway HOT 2
- 数据和交易解耦
- 加入 RPC 模式
- 运行vnpy mod报错,详细信息如下: HOT 2
- 在vnpy mod里如何做vnpy的交易呢 ? HOT 27
- 在vnpy mod里,如何获得vnpy的交易数据呢 ? HOT 3
- 如何通过代码运行 rqalpha-mod-vnpy? HOT 3
- CTP中午休市账户断线重连之后系统报错 HOT 6
- 测试发单时候系统报错退出 HOT 2
- 获取当前持仓的市场行情出错 HOT 2
- 9:26启动策略报 signed integer greater than maximum错误 HOT 2
- 初始化时获取重复获取open orders,仓位回复时候昨仓有误 HOT 1
- 最新版本rqalpha 出错 ImportError: No module named account HOT 4
- 这用的ctp接口是64位还是32位的?
- ImportError: No module named account HOT 1
- 启动恢复仓位时出现空仓key error HOT 1
- 适配 vnpy 新版本 HOT 2
- 程序初始化时获取不到某些合约的last_price导致portfolio有关计算出错 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rqalpha-mod-vnpy.