Git Product home page Git Product logo

Comments (6)

wh1100717 avatar wh1100717 commented on June 22, 2024

@handsomu @Cuizi7 broker 在初始化的 account 的时候 已经初始化了对应的 backward_trade_set 触发trade event 的时候 应该判断一下 trade_id 是否在backward_trade_set 中 如果在的话 就不再触发该event。 不过这么来说,order怎么处理.... 😂😂😂

from rqalpha-mod-vnpy.

Cuizi7 avatar Cuizi7 commented on June 22, 2024

这块的 order 打算这么处理:

  • 维护一个订单对象的缓存
  • 发单的时候将订单对象缓存在上述缓存中
  • 收到订单回报的时候:
    • 若缓存中无该订单对象则创建并缓存之,若存在则读取之
    • 若订单对象的 order_status 为 pending_new (即首次收到该订单的回报)则发布 ORDER_PENDING_NEW 事件
    • 若订单回报中的 order_status 为订单对象的前置状态,则忽略该回报
    • 若订单回报中的 order_status 为订单对象的后置状态,则修改订单状态并发布对应事件

from rqalpha-mod-vnpy.

Cuizi7 avatar Cuizi7 commented on June 22, 2024

已尝试修复,明天交易时间我继续测试。

from rqalpha-mod-vnpy.

hzliu avatar hzliu commented on June 22, 2024

from rqalpha-mod-vnpy.

Cuizi7 avatar Cuizi7 commented on June 22, 2024

@hzliu 现在在初始化阶段和账户短线重连的时候都是用的我自己写的类似 fast_forward 的逻辑,因为最早写这段逻辑的时候 rqalpha 还没有现在的 fast_forward,纯属历史原因。

from rqalpha-mod-vnpy.

Cuizi7 avatar Cuizi7 commented on June 22, 2024

master 分支已修复。

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.