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/

    Does new stoptrail order in notify_order() refer to the previous or the coming candle?

    General Code/Help
    1
    1
    13
    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.
    • NewestTrader
      NewestTrader last edited by

      Hi,

      I am presently looking at the stoptrail functionality.

      In my next() method, at time A I generate a buy().
      Afterwards I wait in notifyorder() until this buy was 'Completed'.

      After it got 'Completed', being still in notifyorder(), I generate a subsequent stoptrail sell order:
      self.sell( exectype=bt.Order.StopTrail,trailamount=X)

      My question is:
      does this sell order initially take the close value of the candle A into account or the close value of the coming candle A+1?

      Thanks in advance!

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