e.g.
def handle_data(context, data):
if ... some calculation ...
order_target(symbol('AAPL'), 10)
print data[symbol('AAPL')] # e.g. last buy signal: 'close': 113.275126, 'dt': Timestamp('2015-10-21 00:00:00+0000', tz='UTC')
and in analyze
print buys.transactions[buys.index[-1]] # e.g. 'price': 115.03770800000068, 'dt': Timestamp('2015-10-22 00:00:00+0000', tz='UTC')
I noticed, the order is executed at the next bar's close price.
I wonder if there is a way to tell quantopian execute order at
-- current.close_price, or
-- next.open_price?
Is this possible? or any doc?
Thx.