Hello,

I would like to get an estimate of Forex volume data and have read various posts on the forum explaining how to do that using FxcmVolume and a downloader, but that require to run a local version of Lean which I would rather avoid.

Instead, I was thinking of using tick data to get a rough estimate. Ideally, I would like to do it by counting the number of ticks that have come in during a given period, as initially suggested by Douglas Stridsberg. Would it be a way to do that efficiently?

Alternatively, I was thinking of adding a TickQuoteBarConsolidator to my algorithm that would aggregate a given number of ticks (e.g. 1000) and then look at the difference between the ending time and the starting time of the consolidated bar and use the time it takes to consolidated 1000 ticks as a proxy for volume (the lower the time, the higher the volume).

The idea would then be to send this info into a custom indicator that could compare the current value or short term average to a longer term average.

I have tried to go with the latest option but got stuck very quickly as I could not even manage to make the TickQuoteBarConsolidator work and retrieve the start and end time (see backtest attached, the code related to that is commented to avoid the error and be able to share the algo).

Please note that I would like the rest of the algo to work with custom QuoteBarConsolidator based on Hour resolution as I am afraid performance will really deteriorate if I move everything to tick. Trying to have both running in parallel is probably part of the issue I have.

I would greatly appreciate some help. Thanks!