Pass Quotes & other data (Historical + Realtime) from IB's TWS/GW API to AFL

Hi,

The reason to post this query, is because a lot has been discussed, however, not specific to my requirements. Or may be I am unable to comprehend the vastness. A lot can be achieved with MFC, IPC, API, DLL, however, my needs are not that advanced. Your specific guidance will help!

It has been a steep curve for me. Although, I am beginning to understand the AB's ADK but still a long way to go. Since several weeks now, I am able to kind of mock the IB.dll (the Data Plugin).

At this point in time IBController is very massive for me to understand and comprehend. So, going one-step at a time.

  1. Is the source code of IB.dll (the Data Plugin) openly available somewhere? I am yet to completely understand all the aspects of "Quotes Tracker" Plugin example. Was wondering how things are achieved specifically for IB?

  2. In the "Quotes Plus" Plugin example, you have shown on how to communicate fundamental data via GetExtraData(). My question might sound very naive to you. Please give a direction on how do I pass other data streams from TWS APIs to AmiBroker beyond the default OHLC, V, OI, Aux1/Aux2 arrays. My Data Plugin is going to fill these with the Quotes received from API. I wish to capture other APIs directly into AFL for Plotting and other calculations, for instance, Option Greek APIs.

I doubt whether a Data Plugin can do that! Or can a Data Plugin DLL pass onto a AFL Plugin DLL which in turn will receive the Data-stream (both historical and real-time) from the API to a Custom-Function, and that function can then be called locally in form of an Array from AFL in order to Plot the same on charts in AmiBroker?

Or, let the IB.dll take care of OHLCVOI quotes by default. Then, create a light console-based Data Server (on the same system) which will receive data from IB's API (TWS/GW running on same system) then send data to AB (on same system). It's again an egg-first or chicken-first situation! Because I don't know how to pass those APIs to AFL arrays?

What are my best options?

Thank you

1 Like