for i,stock in enumerate(context.stocks):
order_target_percent(stock,allocation[i])
The first order is a sell and the second is a buy.
When I run this, the first stock is filled a market order. Then before it's executed, the second stock was rejected for not having enough cash since the first order hasn't been executed. How can I file the second order after the first is executed?
Thanks