¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

My order does not get through


 

Luis

If your ActiveX control's name is AxTws1, then your event handlers should be
called AxTws1_orderStatus, AxTws1_errorMsg, etc.

You seem to have called them Tws1_orderStatus, etc - they are never going to
be called!

Richard

-----Original Message-----
From: TWSAPI@... [mailto:TWSAPI@...]On Behalf Of
Luis C. Uribe
Sent: 21 April 2006 00:03
To: TWSAPI@...
Subject: [TWS API] My order does not get through


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











_____

YAHOO! GROUPS LINKS



* Visit your group " TWSAPI" on the web.

* To unsubscribe from this group, send an email to:
TWSAPI-unsubscribe@...

* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


_____