Hi,

Working with the IBrokers packages, I've come across a difficult situation.

The eWrapper function is called by the library every time a new piece of data streams in. (This is a "good thing")  The problem is that there is no simple variable persistence between calls to eWrapper().

There IS a method to assign and get variables to the eWrapper environment.  However, this seems like it would get very slow and awkward for any data beyond a few.

For example, I'm very interested in a 15 minute bar.  You can't request a bar that large via the API, so I'm forced to accumulate and calculate it myself.  That means for every tick that comes in, I have to store a bunch of accumulators, (Open, high, low close, mean, median, volume, start time, tick count, etc.).  That involves a get and assign for each variable for each tick.  Now, if I want to calculate a few technical indicators as well, that entails getting and assigning several more variables.  In a production system, I could easy see having to manage 50+ variable this way with every call to eWrapper at every tick.  Then, if I'm watching more than one equity, it could easy be several hundred variables at each iteration.

This seems like it could get slow.

Does anyone have any experience with this, or any suggestions on how to best handle this?

Thanks!


--
Noah Silverman
UCLA Department of Statistics
8117 Math Sciences Building #8208
Los Angeles, CA 90095


	[[alternative HTML version deleted]]

