Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
reference price of filled orders?

How can I reference the filled price of a previous order to use in an if>elif statement?

2 responses

This may help:

context.portfolio.positions[stock].cost_basis  

Thanks Vladimir. Wouldn’t that just track the overall average cost? Is there a way to track a specific trade through an order_id? How would you reference a specific order_id?