hello again Blue, I tried using the get_order() function which, I believe would have been the easiest choice unfortunately, there's nothing in there that tells me how much I paid for a stock on a specific order:
Event({'stop_reached': False, 'limit': None, 'created': Timestamp('2012-01-05 21:00:00+0000', tz='UTC'), 'reason': None, 'sid': Equity(26, symbol='AAPL', asset_name='', exchange='YAHOO', start_date=Timestamp('2007-09-17 00:00:00+0000', tz='UTC'), end_date=Timestamp('2017-01-24 00:00:00+0000', tz='UTC'), first_traded=None, auto_close_date=Timestamp('2017-01-25 00:00:00+0000', tz='UTC'), exchange_full='YAHOO'), 'commission': 0, 'id': '554bec1ff3d74f618f2d06bc0c71b9df', 'limit_reached': False, 'filled': 0, 'dt': Timestamp('2012-01-05 21:00:00+0000', tz='UTC'), 'stop': None, 'amount': -267, 'status': 0})
My goal here is to buy a stock (multiple times a different point in time) and sell parts of my entire position once I make a certain profit on a specific trade. For example:
Day 1: Buy AAPL, 100 shares @ $500/share
Day 200: Buy AAPL, 100 shares @ $600/share
Day 300: Sell AAPL, 100 shares @ $700/share to secure my $200 profit on my order from day 1
Day 400: Sell AAPL, 100 shares @ $800/share to secure my $200 profit on my order from day 2
Of course, this example is over simplified but I think this gives you a good idea of what I want to accomplish.
P.S. I don't know if its because Im using zipline on my own machine but I would have been under the impression that I would get the same result in quantopian