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 abuy()
.
Afterwards I wait innotifyorder()
until thisbuy
was'Completed'
.After it got
'Completed'
, being still innotifyorder()
, I generate a subsequent stoptrail sell order:
self.sell( exectype=bt.Order.StopTrail,trailamount=X)
My question is:
does this sell order initially take theclose
value of the candle A into account or theclose
value of the coming candle A+1?Thanks in advance!