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/

    Order management with Calendar day?

    General Discussion
    2
    2
    568
    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.
    • H
      hobart-liu last edited by

      https://www.backtrader.com/docu/order-creation-execution/order-creation-execution.html,

      Execution Type: Limit with validity
      
      To not wait forever on a limit order which may only execute when the price is moving against the “buy” order, the order will only be valid 4 (calendar) days.
      

      May I know why we use calendar day to define validity of order? When I check the result, I usually count number of bars (valid trade days).

      P 1 Reply Last reply Reply Quote 0
      • P
        Paska Houso @hobart-liu last edited by Paska Houso

        The right question here would be not "how you count it" but how brokers (usually) count it. My personal experience with different brokers is that there is no "bar based" system.

        Bars can have many different durations (1-min, 5-min, 2-days), you would have to 1st define the actual bar duration and then the length. You would also have to take into account that during thin trading sessions, several 1-min bars will be missing (no negotiation took place). Should they count because your expected timeframe is 1-min or shall the broker be counting only those with executed volume?

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