Re: twsapi: Re: Timing of events
Abandon the thought of computing volume from IB's data.
You will only get a small fraction of all ticks from IB. Okay for
some things, but not anywhere near a full data feed.
Richard
} Thanks
By
Richard Foulk <richard@...>
·
#132
·
|
Re: twsapi: Timing of events
When I started working with TWS ActiveX with VB I explored tickPrice and tickSize first.
My observation was that either event occurred once a second and only if a number changed.
You could build a set
By
Robert Carey <rcarey1@...>
·
#131
·
|
Re: twsapi: Re: Timing of events
Thanks Scott, this is as I understand it.
So there is no way to detect various trades at the same price and size?
This could be a very bad issue because it is important (at least for me, and
I think
By
Michel <migurull@...>
·
#130
·
|
Re: Timing of events
Both tickPrice and tickSize are autonamous of one another. Further
they only fire when there is a change.
An example would be 10 trades going off at the same price at
different volumes would fire
By
marinindextrader <marinindextrader@...>
·
#129
·
|
Timing of events
Hello,
I'm evaluating TWS ActiveX component in Visual Basic and I have some
questions/problems regarding 'tickPrice' and 'tickSize' events (I'm
using the web based Demo system for this
By
migurull <migurull@...>
·
#128
·
|
C# .NET + TWS ActiveX = 'Catastrophic failure' exception?
I have connected fine using Java and C++ API to TWS, however using
Visual Studio.NET and C#,
I get
'An unhandled exception of type:
System.Runtime.InteropServices.COMException
occured in
By
pjslim99 <trader@...>
·
#127
·
|
Re: twsapi: Java API
There are basically two methods to do this:
1. wait() / notifyAll() communication
In your main program use wait() to go to sleep without polling.
Catch the interruptedException and go on.
In the
By
gu6526 <gernot.ullrich@...>
·
#126
·
|
Re: twsapi: Java API
I need to get info on n tickers, so this is what I do at the moment:
tws.connect();
for(i=0; i<n; i++){
tws.requestdata(...)
}
tws.wait_trans(); // to make sure all the prices have
By
usernew <no_reply@...>
·
#124
·
|
Re: twsapi: Java API
usernew,
maybe i do not know what you want or misunderstand TWS control but you need to send requestData() only once - you can do it before the session.
David
By
David <kotomo@...>
·
#123
·
|
Re: twsapi: Java API
You should look at EClientSocket.java:
It spawns an asynchronous thread with
tm_reader = new EReader( this, dis);
The wrapper functions are called from this thread whenever a message
is
By
gu6526 <gernot.ullrich@...>
·
#122
·
|
Re: twsapi: Java API
yep, I am pretty sure that all that requestData() does
is read data that has arrived from TWS, and call the
appropriate EWrapper member function for tickPrice
etc.
If it was async, there would be no
By
Todd Turner <todd_a_turner@...>
·
#121
·
|
AW: twsapi: Java API
You should look at EClientSocket.java:
It spawns an asynchronous thread with
tm_reader = new EReader( this, dis);
The wrapper functions are called from this thread whenever a message is
received
by
By
gernot.ullrich@...
·
#125
·
|
Re: twsapi: Java API
So you are saying tickPrice, tickSize etc. are guaranteed to happen
by the time requestData() returns ? I thought tickPrice etc. were
completely asynchronous.
By
usernew <no_reply@...>
·
#120
·
|
Re: twsapi: Java API
btw,
Have you been able to call connect, and then call
disconnect and then call connect again? The second
call to connect always seems to cause an exception
inside the API, for me anyway.
--- Todd
By
Todd Turner <todd_a_turner@...>
·
#119
·
|
Re: twsapi: Java API
I believe that the callbacks only occur during a call
to requestData().
In my initial testing I used Sleep with no problem. I
now have Windows sending a WM_TIMER message to my apps
message queue
By
Todd Turner <todd_a_turner@...>
·
#118
·
|
Re: twsapi: Java API
Yeah, I tried that and got exceptions. The problem might be that when
you sleep the whole thread is put to sleep, so the event tickprice
etc. callbacks can't happen. So, a regular sleep might not
By
usernew <no_reply@...>
·
#117
·
|
Re: updateExtended(), extended properties, etc, etc
Mick,
I havn't gotten to that point in my work, but perhaps ultimately OCA
is not server sided? In other words the TWS manages internally a
marker...that ostensibly is sent back and forth, but all
By
marinindextrader <marinindextrader@...>
·
#116
·
|
Re: updateExtended(), extended properties, etc, etc
OCA.
include
does
Once Again. Use the ActiveX properties to set OCA, TIF and Transmit.
The ActiveX is written in C++ and uses then WinSocket API. Look at
the C++ API for more information.
By
bee_jay_61 <no_reply@...>
·
#115
·
|
Re: updateExtended(), extended properties, etc, etc
Thanks Elliot,
However, I have read the TWS docs and understand the purpose of OCA.
That was never the question. The placeOrder() method doesn't include
in its declaration a variable for sending an
By
mickjenks <no_reply@...>
·
#114
·
|
Re: twsapi: Java API
I am not familiar with Java, but you need some sort of
system call Sleep(int timeout_msecs), so that the
process blocks until the timeout occurs. This
functionality is provided by the OS.
---
By
Todd Turner <todd_a_turner@...>
·
#113
·
|