This is purely programming question. Can you please let me know what happens when I call EnterLong(100) from OnBarUpdate, Thre are two options:
1. EnterLong creates another thread that handles the execution, in this case the code progresses to a next command without waiting for order to be filled.
or
2. Code progresses to the next command only when order triggered by EnterLong is filled?
In order words, how do I know that order was executed and at what price?
A few more questions:
Is it the same for limit and exit orders?
How can I check my current profit/loss?

Comment