Hello, comparing SNDK 30-second bars 5/22 last trading moments between TWS and WL. TWS A/D drop is about 150K. While WL is from 16.7 M to 16.3M - 400K. Both are the same 30-second bar interval/timeframe. This is just an example, seeing this with other tickers.



Rename
Streaming? Historical?
Did you export the chart data?
Did you export the chart data?
I did it just now with IB Historical and the drop was approx -122465. The calculation is correct (and probably hasn't changed in 25 years).
The difference is in the IB conflated streaming data. It's not a bug. For all ticks and volume for streaming, you'll need a different provider.
Another way is to use IB Streaming Bars in the Strategy Monitor - although you're limited to 1-minute intervals that. Streaming Bars essentially gives you the historical bars so that you don't see issues like this.
Explained:
All About WealthLab Intraday and Realtime Data Providers
The difference is in the IB conflated streaming data. It's not a bug. For all ticks and volume for streaming, you'll need a different provider.
Another way is to use IB Streaming Bars in the Strategy Monitor - although you're limited to 1-minute intervals that. Streaming Bars essentially gives you the historical bars so that you don't see issues like this.
Explained:
All About WealthLab Intraday and Realtime Data Providers
Also, you can play around with these settings, which will affect how volume is reported:

I just noticed that there's an additional selection that wasn't there previously. Compare to image on the Interactive Brokers details page. In fact, since IB is "Not recommending" the old selection for dual-mode API clients, try deselecting it and try with the next one.
I just noticed that there's an additional selection that wasn't there previously. Compare to image on the Interactive Brokers details page. In fact, since IB is "Not recommending" the old selection for dual-mode API clients, try deselecting it and try with the next one.
All historical, taken on Sunday, not stream.
Took screenshot, deleted 1-min SNDK from disk, unchecked the not recommended API setting, restarted WL and reloaded 1-min SNDK (historical). Now it's in the Billions..


Took screenshot, deleted 1-min SNDK from disk, unchecked the not recommended API setting, restarted WL and reloaded 1-min SNDK (historical). Now it's in the Billions..
Using 3rd party chart, which uses IBAPI, I can see the ~ 150K volume change.
It was 122,465 for me. Change your settings. The Provider has to assume 1 configuration for everyone.
Already changed the "not recommended" API, which resulted in billions. Which setting?
Leave it checked. Those are my settings.
To clarify, that setting was set in the first place. I tried with and without it. Note above.
Either way, the results did not come close to ~ 150K.
Either way, the results did not come close to ~ 150K.
Here is another example - this time, instead of billions, it's in the hundreds of thousands. I changed the data from last 4 years to last 300 bars.
Note in the screenshot above that the scales were in the millions and Billions. I suspect that the length of data (how many bars to fetch) distorts A/D calculation.
The chart below was created as follows:
. Enabled "Set market Data in lots for..."
. Closed WL
. Deleted 1-min SNDK from disk
. Started WL
. F12 > data > last 300 bars
. New chart with A/D
Note in the screenshot above that the scales were in the millions and Billions. I suspect that the length of data (how many bars to fetch) distorts A/D calculation.
The chart below was created as follows:
. Enabled "Set market Data in lots for..."
. Closed WL
. Deleted 1-min SNDK from disk
. Started WL
. F12 > data > last 300 bars
. New chart with A/D
QUOTE:Of course the A/D data is different for 300 bars vs any other range. There is no period parameter. The changes bar-to-bar, however, will be the same.
I suspect that the length of data (how many bars to fetch) distorts A/D calculation.
The calculation is correct and standard. The difference is in the data - the settings affect how volume is received.
I'm not getting the same result as you are, so the difference must be in the settings. Show me a picture of your settings, all of them.
Here's my result of your 300-bar test.
Hello Cone,
I think we are drifting away from the original matter. Please review your own two notes. The first one from 5/24 you indicated: "I did it just now with IB Historical and the drop was approx -122465" and your 2nd note: "It was 122,465 for me.". However, in your last screenshot from today, 5/25 I see a drop in the millions in the last few minutes. While mine shows in the 100K's range.
This inconsistency is the issue.
Since you also seem to have this issue, I don't think my settings are of any value.
To refocus the matter, you and I should see a similar delta drop - probably close to what TWS is showing - between 122K to 150K.
Regarding my statement that the length of data distorts A/D - I meant in this context, that it should not impact the last few minutes volume drop scale in such a large number. The delta drop should be consistent, no matter how far back data is fetched.
I think we are drifting away from the original matter. Please review your own two notes. The first one from 5/24 you indicated: "I did it just now with IB Historical and the drop was approx -122465" and your 2nd note: "It was 122,465 for me.". However, in your last screenshot from today, 5/25 I see a drop in the millions in the last few minutes. While mine shows in the 100K's range.
This inconsistency is the issue.
Since you also seem to have this issue, I don't think my settings are of any value.
To refocus the matter, you and I should see a similar delta drop - probably close to what TWS is showing - between 122K to 150K.
Regarding my statement that the length of data distorts A/D - I meant in this context, that it should not impact the last few minutes volume drop scale in such a large number. The delta drop should be consistent, no matter how far back data is fetched.
The thread above suggests that we were looking at 30 second bars at first, but then switched to 1 minute bars for your 300 bar test.
Let's do this... what's wrong with the calculation?
CODE:
public override void Populate() { BarHistory source = Parameters[0].AsBarHistory; DateTimes = source.DateTimes; double runningAD = 0; for (int n = 0; n < source.Count; n++) { double h = source.High[n]; double l = source.Low[n]; if (h != l) { double c = source.Close[n]; runningAD += (((c - l) - (h - c)) / (h - l)) * source.Volume[n]; } Values[n] = runningAD; } }
We're still ignoring the elephant in the room.
Compare your last 1-minute chart to mine. Note - the scale of volume at the end - mine is in the 100's of thousands, yours is in the 10's of millions.
The per-minute volume should be identical. The A/D delta should be as well.
Compare your last 1-minute chart to mine. Note - the scale of volume at the end - mine is in the 100's of thousands, yours is in the 10's of millions.
The per-minute volume should be identical. The A/D delta should be as well.
I did not ignore it. I asked for your settings. The settings determine how volume is interpreted by the IB Provider.
Though I really think my settings are beside the point..

I just bounced my results against another intraday provider, and yes, my settings are causing excessive volume - they're multiplied by 100. Probably I need to disable the "Not Recommended" one. I'll check it now!
Actually, I forgot that I had disabled it after mentioning it before. Disabling it caused excessive volume, that's why I indicated in the IB set up that it should be enabled (before it was not "Not Recommend").
The IB Provider assumes STK types are reported in lots, so we multiply the lot volume reported by IB by 100.
The 1-minute chart changes to this with the "Not Recommended" setting enabled (same as yours of course, when using the same settings) -

Interestingly, the IB volume is still more than double what it should be. For example, the 16:00 bar -
IB: 566,500
IQFeed: 227,890
I'm not sure what else we can do to control that number, but I'll check around.
The IB Provider assumes STK types are reported in lots, so we multiply the lot volume reported by IB by 100.
The 1-minute chart changes to this with the "Not Recommended" setting enabled (same as yours of course, when using the same settings) -
Interestingly, the IB volume is still more than double what it should be. For example, the 16:00 bar -
IB: 566,500
IQFeed: 227,890
I'm not sure what else we can do to control that number, but I'll check around.
A note that will help focus the direction - I'm using another app, which uses IBAPI/TWS as well. It gives the same results as TWS.
I have the solution.
1. Disable the former setting that is "Not Recommended" .
2. Keep the next "Send volumes in lots" enabled.
3. IB Provider build 82 is required to adapt.
This setup should result in values that will match our "RT Trade Volume" in streaming charts.
Here's the result:
1. Disable the former setting that is "Not Recommended" .
2. Keep the next "Send volumes in lots" enabled.
3. IB Provider build 82 is required to adapt.
This setup should result in values that will match our "RT Trade Volume" in streaming charts.
Here's the result:
I see that IB 82 is still not available. I'll hold on this ticket until then.
It's Memorial Day.
Give me a couple more days on this. I think we've got the historical volume fixed with this change, but streaming volume needs some work as it appears to me that the volume tallied up during streaming is approximately double what it should be. (It should be simple, but the IB TWS API is unnecessarily complicated when it comes to this data.)
Hi Cone,
Sounds good. Thank you.
Sounds good. Thank you.
Hi, just installed new IB 82, wiped cached folders completely, turned off the API option. Yet still see volume discrepancy. MXL 5-minute volume bars.
WL on left, TWS on right.
Update - on 2nd look, the delta looks close. Will continue to observe...
WL on left, TWS on right.
Update - on 2nd look, the delta looks close. Will continue to observe...
Your Response
Post
Edit Post
Login is required