I wrote this code to plot the real cumulative volume using BID and ASK transactions no the close of the candle, please take a look and let me know what do you think.
it works only for 15 min charts other wise you must change the aggregation period within the code. doesn't work with tick charts.
input displace = 0;
def ASK = tick_count(priceType = PriceType.ASK , period = AggregationPeriod.FIFTEEN_MIN);
def BID = tick_count(priceType = PriceType.BID , period = AggregationPeriod.FIFTEEN_MIN);
def MARK = tick_count(priceType = PriceType.MARK , period = AggregationPeriod.FIFTEEN_MIN);
def LAST = tick_count(priceType = PriceType.LAST , period = AggregationPeriod.FIFTEEN_MIN);
def ba = BID - ASK;
plot data = Sum(ba-displace, 100);