I'm new to Quantopian and am having problems with the syntax on how to get the most recent order direction. I am getting the error message...
c.order = order(symbol('AAPL'), shares)
c.order_info = get_order(c.order)
if c.order.direction > 0 :
LongPos = True
elif c.order.direction < 0 :
ShortPos = True
**The debugger results are...
c.order
e2a0ee74234540f8bbef0e0970fbc185
c.order.direction
AttributeError: 'str' object has no attribute 'direction'**
According to the Quantopian API...
The order object has the following properties: amount (float), direction (1 for buy, -1 for sell), sid (int), stop and limit (float), and stop_reached and limit_reached (boolean).
So, what's the problem with the Quantopian order object, or what is the correct 'direction' syntax?
Thanks,
Mark