modification of a histogram indicator

Job ID: 30886630

Budget: $30 – $250 CAD

I have a modification to do on this histogram indicator for which I would need a pro.

It's a basic volume indicator, BetterVolume but modified. We will not touch the climax and churn (Red and Blue for the climax and Green for the churn).

The indicator for the moment will highlight the others candles like this :

Open (0) < Close (0) && vol (0) > vol (1) = blue
Open (0) < Close (0) && vol (0) < vol (1) = lighter blue

Open (0) > Close (0) && vol (0) > vol (1) = tomato
Open (0) > Close (0) && vol (0) < vol (1) = lighter tomato

I would like to modify this function so that it no longer compares* the volume for the candle (0) against the previous candle (1) but for the highest of the bullish candles in a row vs bearish candles in a row and vice versa.

The volume of each bar on the histogram is always that of its candle but the comparison* (color of this candle) is made according to the last wave of candles in the opposite direction (cf screenshot) :

buy volume> sell volume = blue
buy volume <sell volume = light blue

sell volume> buy volume = tomato
sell volume <buy volume = clear tomato

Do not hesitate to ask me questions if it is not clear
* by compare I mean color change
Related categories: Algorithm Metatrader C++ Programming MQL4