best way to prepare data for real-time auto-trading under IB?

bob111, have u compared the bars you created vs the historical bars from IB API function? How is the difference? I assume their bars are more accurate, so I am reluctant to grab tick prices to create my own. And if you collect prices during live session, when power outrage or network breakdown happens, then what to do? Thanks.
No, I havent. The stuff I use to trade does not require such precision. It doesnt even require intraday bars :)
feel free to do such job yourself. As for outages-big power supply, combined with periodic saving data into something such as binary file (its loading differently, in one shot, not record by record, use google search to find more info). So if some data is lost due any disconnection, outage-you can fill it up quickly those missing bars using ib historical data request method
 
Last edited:
Just have your own database. Backfill it from historical data feed(s), and update from RT data.
I would not use any SQL db, instead would use an in-memory btree or ISAM db, or a set or multiset in C++ STL,
and periodically write it to disk, and at pgm-start load it into memory...
 
botpro, do you think that in C# a list variable can be a good substitute for a database?
I don't know C#, but I think it is similar to C++ and Java.
In C++ I would define a structure with the fields I'm interested in, and create an in-memory database using the collection class called "set".
It can have its own comparator function, so all the records get automatically indexed
after the field(s) you define in the comparator. Internally it uses a kind of B-Tree, I think its called Red-Black-Trees,
it's ultra-fast.
 
Back
Top