I am working in vb.net 2005 and here is my function to test placing an
order:
Private Sub PlaceOrder()
AxTws1.placeOrder2(0, "BUY", 100, "INTC", "STK", "SMART", "NASDAQ",
"USD", "LMT", _
20, 0, "", "", "", "", "", "")
End Sub
After I execute this to place an order nothing happens, no event raised for
OrderStatus for which I have a handler:
Private Sub Tws1_orderStatus(ByVal eventSender As System.Object, ByVal
eventArgs As AxTWSLib._DTwsEvents_orderStatusEvent) Handles
AxTws1.orderStatus
Dim msg As String
msg = "order status: orderId=" & eventArgs.id & " client id=" &
eventArgs.clientId & " permId=" & eventArgs.permId & " status=" &
eventArgs.status & " filled=" & eventArgs.filled & " remaining=" &
eventArgs.remaining & " avgFillPrice=" & eventArgs.avgFillPrice & "
lastFillPrice=" & eventArgs.lastFillPrice & " parentId=" &
eventArgs.parentId
MsgBox(msg, MsgBoxStyle.Information, "Order Status")
End Sub
I also have an error handler and that event is not raised either. Any ideas
what is wrong? I know I am connected, I get quotes.
Thanks,
Luis C Uribe