For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
Bracket Orders open trades with open prices.
-
i use bracket order to put buy stop(above current price) and sell stop(below current price) orders.
It ignores entry price i pass into it and use open price of bars.brackets = self.buy_bracket(limitprice=tp, price=entry, stopprice=sl) brackets = self.sell_bracket(limitprice=tp, price=entry, stopprice=sl)
one output be like:
1995-08-29, 166, Long at 2.72, TP: 2.975, SL: 2.55 1995-08-30, 167, BUY EXECUTED, Price: 2.68, Cost: 16750.00, Comm 16.75 1995-08-30, 167, Close: 2.63, Open: 2.68
i tired exectype argument with its different values(bt.Order.Limit, bt.Order.Stop) but same result.