Gamestudio Links
Zorro Links
Newest Posts
What are you working on?
by Ayumi
8 minutes 11 seconds ago
Performance report on the imported trades
by OptimusPrime
15 minutes 30 seconds ago
Possible to return character vector from R bridge?
by JamesHH
Today at 18:59
Help with Wine on Linux
by AndrewAMD
Today at 16:59
Stock Splits
by AndrewAMD
Today at 16:23
Linux - Help with setting up with Wine and Zorro
by michaelj
Today at 04:49
How to expand Zorro to work with other broker ( like Tradovate )
by AndrewAMD
Today at 02:12
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online
12 registered (AndrewAMD, Ayumi, JamesHH, ChrstphFr, michaelj, Akow, jenGs, Bill_Lin_Fang, alibaba, 1 invisible), 165 Guests and 8 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
Bill_Lin_Fang, michaelj, ThePituLegend, kankan, Nofip
18207 Registered Users
Topic Options
Rate This Topic
#476839 - 04/11/19 18:42 How to use IB Volume?
AndrewAMD Online

Registered: 02/21/17
Posts: 631
Loc: Chicago

For the IB plugin, the manual says this is the volume policy:

marketVol: Trade volume per minute in historical data; accumulated volume since market open in live data. Only for exchange-traded assets, not for currencies.

Okay, so I can download M1 volume.

Now suppose that:
* I only had the IB plugin.
* I need the M30 volume. (That is, I need all of the volume for one thirty-minute bar.)
* I need this info both in backtests and live.
* I need to use priceRecord() to update volume data live.

Therefore, I must do this:
* Download the M1 data from IB using the IB plugin with script "A".
* Convert the M1 volume to accumulated volume for consistency purposes with script "A".
* Script "B" is a separate trading script. (It must be separate, because the historical data will be modified.)
* The script has BarPeriod = 30 (or BarPeriod * Timeframe == 30).
* Calculate bar volume with my own indicator. (It just determines the difference in accumulated volume between this bar and the last bar, accounting for exceptions/resets.)
* Finally, priceRecord() will continue to add accumulated volume to the historical data.

Is my understanding correct?

#476840 - 04/11/19 19:09 Re: How to use IB Volume? [Re: AndrewAMD]
jcl Online

Chief Engineer

Registered: 07/22/00
Posts: 26839
Loc: Frankfurt
Yes, that looks correct to me. I don't know why the volume is different in live data, but probably the API delivers it so.

#476843 - 04/11/19 19:18 Re: How to use IB Volume? [Re: jcl]
AndrewAMD Online

Registered: 02/21/17
Posts: 631
Loc: Chicago
Thanks for the clarification.

Currently, my Sierra Chart plugin automatically emulates accumulated volume for historical downloads, so that historical and live match. I am considering offering additional options.


Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at)