position usage after submitting an order

idaganiidagani Posts: 11
edited March 2017 in Under The Hood

Hi,

Assume there is a position on symbol XYZ with 1 share,
and the following code :

order.algo_sell( order_symbol, voodooGuid, 'decrease', order_quantity=1,...)

if account[md.symbol].position.shares == 0:
print "position is closed"

Does the simulator execute the code in a serial manner (single threaded), so that
in the case above, account[md.symbol].position.shares will be 0 ?

B est,
Itay

Comments

Sign In or Register to comment.