I have been using Quantconnect for about a year and am really pleased with its functionality. I am trying to calculate market buy volume minus market sell volume (i.e., cumulative delta – buy volume being considered buying at ask, and sell volume being considered selling at bid), and am wondering if this is currently possible using Quantconnect? This usage would be intraday for equities on a minimum of 1-second to 1-minute timeframe. I have looked through past posts and it seemed like some order book data is available, but I am not sure exactly if cumulative delta can be calculated using currently available data. I used to day trade manually and would use L2 data a little bit but do not really consider myself very well-versed with it, and especially within the context of data that is available in Quantconnect some guidance on whether calculating this indicator is feasible would be appreciated.

Sort of a separate topic, but currently I am just counting “buy” and “sell” volume whenever an OHLC candle is green or red and summing these values (similar to On-balance volume), which I imagine is better than nothing but definitely not the same thing, and probably not as effective, as tracking true market orders. Alternately I was thinking of taking this “buy” and “sell” volume, and multiplying it by the size of the candle, the implication being that market orders will move price more compared to limit orders, although this is still sort of a hacky solution compared to simply taking the actual volume of market orders. I would also be curious if anyone has ideas about the utility of these indicators, especially if cumulative delta cannot be calculated currently using Quantconnect.

Thanks.