I'm working on integrating Norgate EOD with realtime data. I was first looking to use IB for realtime, but as I've seen others point out the volume seems to be wrong. I believe this is an IB issue, not an Amibroker issue, but not sure. For example, here is a screenshot of a SPY 5 minute chart from Trader Workstation (top), and Ami using IB realtime (bottom).
This makes the realtime data useless, for me, as I use volume to some extent. In any case, I just wanted to check if maybe I missed some way to correct this before discarding IB for realtime and looking elsewhere. Thanks.
IB definitely reports volume differently than Norgate. Generally 100x difference because of IB reports in 100's. But Norgate also reports volume and price on certain futures in a legacy format, using old contract specifications that don't agree with the current day contract specs for silver and copper, which makes no sense at all (they should revise the legacy data to correspond with the current specs).
Anyway, the volume difference in the screenshots you posted could easily be the 100x volume multiplier (because TWS can show volume differently than the real-time data feed that they send!), but perhaps you also have different intervals. You didn't include the time axis or anything that would show me that you're using the same time frame for each chart.
In order solve the 100x challenge, I now use a naming convention for by AB DBs. I include the data source in the filename. I use two functions: one tells me the data source, and the other multiplies the volume by 100 if the source is IB or MetaStock. Of course this assumes you have only one data provider per DB. If you mix them this code won't work properly.
// Returns a string with the data provider. Assumes that the DB filename includes the quoted text below.
DatabaseName = GetDatabaseName();
if( StrFind( DatabaseName, "IBKR" ) ) Output = "IBKR";
else if( StrFind( DatabaseName, "Norgate" ) ) Output = "Norgate";
else if( StrFind( DatabaseName, "Yahoo" ) ) Output = "Yahoo";
else if( StrFind( DatabaseName, "IQFeed" ) ) Output = "IQFeed";
else if( StrFind( DatabaseName, "Polygon" ) ) Output = "Polygon";
else if( StrFind( DatabaseName, "MetaStock" ) ) Output = "MetaStock";
else Output = "";
// Volume multiplier may be needed because some data sources report volume that needs to be multiplied by 100.
switch( DB() )
Output = V * 100;
Output = V;
@PeterD You are right, it is close to 100x. For whatever reason it does not match exactly with the charts from IB, but close.
I also noticed that the total Volume presented in the Realtime Quote window is higher than the sum of all bar volume for the day. The realtime quote total volume seems to be more accurate than the volume on the chart. My understanding is that the data plugin provides this field separately, explaining why it can be different. As I type this the total day volume for tesla, after multiplying by 100x is off by 500K on the chart, but spot on in the Realtime Quote window.
Unfortunately, as far as I'm aware the realtime info is not available to AFL.