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
* 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?