Is there a possibility of including Tick Volume in Quote Bars for resolutions other than Tick?  The QuantConnect database already has a total count of all of the ticks and can add on a field to Quote Bars for the number of ticks per Quote Bar, which is a generally-recognized approximation for volume in the Forex market.

Perhaps the next time the entire data set is processed and aggregated into the larger resolutions it can be added in.

There is an immense performance penalty incurred by manually calculating the Tick Volume, and it is even more egregious if Hourly or Daily data can be used in the algorithm instead of Second or Minute. 


I am currently subscribing to Tick data and then processing each tick (counting them as well as using a Consolidator to create larger bars), but the only use I have for tick resolution is to calculate Tick Volume. If the Quote Bars included a Count/Tick Volume field, then I could subscribe to Minute (or even Hourly) data instead for my algorithm. While doing it this way is working, it is dramatically slower than just using Minute Quote Bars.

My algorithm is similar to the one presented here: , although I tried to make it simpler for the purposes of attaching a concise backtest here.

I have attached a backtests running with Tick Resolution, and one line can be changed to switch to Minute or other Resolution.  Obviously the Minute test processes far fewer data points, but it still shows the huge penalty just trying to extract Tick Volume.

For 1 year (2020) and 1 pair (EURUSD):

Tick test: completed in 560.96 seconds at 47k data points per second. Processing total of 26,318,609 data points.

Minute test: completed in 8.83 seconds at 43k data points per second. Processing total of 376,063 data points.

Hour test: completed in 0.51 seconds at 16k data points per second. Processing total of 8,021 data points.


If Tick Volume were included in Quote Bars like the OHLC Bid Ask data, then conceivably the algorithm could run at the much faster speed of Minute or longer Resolution and still have access to the Tick Volume.  Just because multiplication is fun, including Tick Volume in Quote Bars would be 63 times faster than using Tick Resolution (and Hourly would be 1,158 times faster!).  While 9 minutes or so isn't bad for the Tick test, it becomes much worse when a longer timeframe or more pairs are added.

There have been other mentions of Tick Volume on the forum in the past, but those have involved offline or custom data access.


This is more of a feature request than algorithm help, but I am certainly open for any tips on how to make the tick counting more efficient. 

In my actual algorithm, I run the tick data through a Minute Quote Bar Consolidator (Warmup and also subscribed to the data) and then whenever the Consolidator fires I take that bar and combine it with the accumulated ticks thus far so that I have a hybrid Minute Quote Bar with Tick Volume stored in a Rolling Window that then has other calculations run on it.