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?



  • 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!


Log in to reply
 

});