How to tell a submitted order is pending or in position

 

After submitting a limit or stop order, how do you know when it is executed? Would OrderOpenTime() gives an invalid datetime if it was pending?

Thanks in advance.

 
OrderType . . .
 
RaptorUK:
OrderType . . .

Do you mean that a limit order, when executed, will become a market order? Thanks.
 
linx:

Do you mean that a limit order, when executed, will become a market order? Thanks.
Yup . . . for example, OP_BUYLIMIT or OP_BUYSTOP ---> OP_BUY
 
RaptorUK:
Yup . . . for example, OP_BUYLIMIT or OP_BUYSTOP ---> OP_BUY

Thanks.
Reason: