Because it is not possible to get the bid/ask volumes into an usual timeframe (such as the 1 minute one for example), I had the idea to use the “tick by tick chart” to get them. In this kind of chart, each price movement is x ticks received.
Each time the price is higher than the previous received one, the code count the Volumes received as a positive one, same goes for a lower price received, counting as a negative Volumes.
These Volumes counts are accumulated and plotted as green and red histograms. Then a “Cumulative Delta”, which is the difference of the 2 histograms is plotted as a black line.
When the Cumulative Delta is crossing below the zero line, the bearish pressure is real, while the bullish one exist when the Delta is crossing above zero level.
I add a setting to reset the Cumulative Delta to zero each X minutes with the “minutes” parameter. So it is possible to stack many Cumulative Delta on the same chart with different “minutes” settings to get the large picture and smaller one(s).
Note: This indicator is only compatible on a ‘Tick by Tick’ chart with instruments which have Volumes.
//PRC_CumulativeDeltaWithPeriods | indicator
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
// --- settings
iminutes = 4 // in minutes quantity
// --- end of settings
newperiod = minute<>minute
if newperiod then
if count=iminutes then
if volume>0 then
if close>last then
volp = volp+volume
elsif close<last then
volm = volm+volume
delta = volp-volm
return volp coloured(0,200,0,50) style(histogram) as "Positive volumes", -volm coloured(200,0,0,50) style(histogram) as "Negative volumes", delta as "Volume delta"
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.ProRealTime ITF files and other attachments :