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/

    BracketOrder: stopamount and limitamount instead of stop|limitprice in the bracket order

    General Discussion
    1
    1
    510
    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.
    • X
      xnox last edited by

      I'm using CFD/FX brokers and most of them accept what is known as the bracket order in backtrader. However, they often offer to specify stopamount and limitamount, rather than stopprice and limitprice. E.g. instead of specifying a buy bracket of 2400, stopprice 2350, limitprice 2500. One can specify buy bracket 2400, -50, +100. The advantage of using amounts instead of the price, is that when the buy order is executed at 2400.1 (due to slippage / spread) the oco that are opened are adjusted accordingly and become 2350.1 and 2500.1 respectively.

      Would it be possible to implement stopamount / limitamount for the bracket orders, and make sure that the bracket sides are adjusted +/- relative to the (first or average weighted) executed price of the initial order?

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