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/

    both buy and sell orders executed on same bar

    General Discussion
    2
    2
    61
    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.
    • J T
      J T last edited by

      Hi Guys,
      I like some advice from more experienced guys. Trying to see how to avoid this.

      Testing a breakout strategy.
      at min 10, I place a stop order to buy at 2.00, place a stoploss at A
      at min 15 I place a stop order to sell at 1.50, place a stoploss at B
      at min 17, both stop orders got triggered on the same bar (when the price movement is this big) and they close out the position.

      Earlier, I experienced both orders triggered, but on different bar. I am able to
      add code in if order.status in [order completed], if I have gone into 1 position, I just cancel the other pending. But happening on the same bar left me scratching my head.

      Any ideas or suggestions to workaround this?

      1 Reply Last reply Reply Quote 0
      • A
        ab_trader last edited by

        buy orders - are they both executed or only one of them executed?

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