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/

    Accumulation and Order Concurrency In Normal Strategy

    General Discussion
    2
    2
    485
    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.
    • Jacob
      Jacob last edited by

      according to the docs - Strategy with Signals

      This would lead to a continuous generation of orders that would produce 2 situations:

      • Accumulation: even if already in the market, the signals would produce new orders which would increase the possition in the market

      • Concurrency: new orders would be generated without waiting for the execution of other orders

      While dealing with this behavior is applied to signals, I was wondering how can it be applied to a normal strategy?
      not sure how it works in Signals, but what type of logic can one write to accomplish this idea on a strategy level?

      1 Reply Last reply Reply Quote 0
      • B
        backtrader administrators last edited by

        Most basis examples include a sentinel in the code (an attribute in the strategy). If the attribute is not None you have a pending order. If the order is completed or cancelled, you set it to None

        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(); }); }