TwsActiveX

Quote from syswizard:

Well, I'm not surprised....as the VBA work done by IB for both the DDE and ActiveX workbooks was very poor. As a result, they probably cannot support what was already coded......

I am actually considering creating one to resale to traders who want a low-cost and reliable alternative.

Are you using Excel 2003, 2007 or 2010 ?

why do you say work done by IB regarding both DDE and ActiveX worksheet is very poor? On the contrary, I find that those worksheets provide most of the basic functions that someone needs including passing quotes, orders, account level information etc. etc. It seems possible to build anything on top of the worksheet that they have provided. So, why you think their work is sloppy? Maybe this question reflects my limited understanding regarding their VBA coding in excel. It will be great if you can explain. Thanks.
 
Quote from SteveH:

Here's how I would solve the original poster's problem:

1. Forget the IB integration methods with Excel.

2. Write a C# program to process the 5 min OHLC values interfacing to the TWS with their ActiveX component (TWS.ocx).

3. Send the values to Excel by DDE using the free NDde C# library. You could easily come up with a DDE item naming convention keyed off of the symbol name so the sender (C# program) and the receiver (spreadsheet) inherently know them.

Steve, you are suggesting a round-about approach. Instead of directly using DDE worksheet provided by IB to get data in spreadsheet for further processing, you are suggesting capturing data through a VB/C# program and then streaming it into excel using NDde. I am wondering what benefits does this round about approach has over the one used by IB?

Thanks in advance!
 
Quote from gmst:

Can you please clarify:
1) why is it a better approach to instantiate the ActiveX object using VBA rather than embedding the activex control in the worksheet?
My experience is that it is more reliable as well as acting globally to the entire workbook.

2) what nasty bug are you referring to? Does it exist in office 2010? or has MSFT already released a patch for it?

Thanks.
The Private or Public reference to TWS could become "nothing" from time to time.
You need to place FixTwsRef in all procedures that use the MyTws reference.
Public MyTws as New TWSLIB.Tws

Public Sub FixTwsRef
If MyTws is Nothing then
Set MyTws = New TWSLIB.Tws
End If
End Sub

I don't believe it's ever been fixed.
 
Sys - Thank You Very Much. I am still new with the IB worksheet. Once I become a bit more familiar, I will see if I can connect to TWS using activex instantiated via VBA, rather than calling activex object in each sheet.
 
Quote from gmst:

Steve, you are suggesting a round-about approach. Instead of directly using DDE worksheet provided by IB to get data in spreadsheet for further processing, you are suggesting capturing data through a VB/C# program and then streaming it into excel using NDde. I am wondering what benefits does this round about approach has over the one used by IB?

Thanks in advance!

Steve, I hope you see this. Your PM is disabled. No way to get in touch with you!
 
Back
Top