For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
Set order.executed.price to always fill at specified buy/sell order price
-
Hello,
Is there a way for orders to always execute at the price specified? I've tried using a narrowStopLimit
but this won't always fill:
self.order = self.buy(price=self.upbound[-1], exectype=backtrader.Order.StopLimit)
Thanks in advance.
-
StopLimit
order requiresprice
andplimit
prices to be defined. If these prices fall within the OHLC range, than the order will be executed at the desired price.IIRC I've used the same price for both
price
andplimit
and orders were executed at this price.