Can you please help me with my below query ?
I need to get the highest high volume out of the last 5 Green/bullish candles and last 5 Red/Bearish Candles
GreenCandle = C > O; RedCandle = O > C; GreenCandleVolume = IIf(GreenCandle , Volume, 0); RedCandleVolume = IIf(RedCandle, Volume, 0);
How do I continue the above code to get me the the Highest High volume on last 5 Green and Red Candles?
I know we need to use HHV function, but how to get those last 5 green candles and red candles volumes because in the above arrays of GreenCandleVolume and RedCandleVolume there will be zeroes in between , so I need to take only the non-zero 5 candles.
Could you please help ?
Thanks in advance