Navigation

    Backtrader Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/

    the status of order with valid given is never set to "expired" in live trading

    General Code/Help
    1
    1
    17
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      shchen last edited by

      Hi community,
      I'm tying to build my trade system with backtrader and btoandav20.

      And I find that the order with valid is never set to "expired", I'm not sure this situation is causes by backtrader or btoandav20.

      After tracing code, I think the problem is caused by the self.data.datetime[0] is nan when the "expired event" comes and the oandastore.py calls self.broker._expire(oref).

      It makes the expression self.data.datetime[0] > self.valid of expire in order.py always returns false.

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      • First post
        Last post
      Copyright © 2016, 2017, 2018 NodeBB Forums | Contributors
      $(document).ready(function () { app.coldLoad(); }); }