Git Product home page Git Product logo

Comments (1)

wh1100717 avatar wh1100717 commented on June 22, 2024

@handsomu 这个属于RQAlpha enhancement 的内容,重新在RQAlpha 项目上开一个issue~

我想了一下,有两种方案:

维持现有的API 不变,增加 buy_close_todysell_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)

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.