I'd inspired from Renko Chart and make to find Waves.
As you know guys, the candle make Waves and the node of Waves make 3 Points.
With those 3 Points we can find where these candle go. Up? or Down.
With This script you can find easily those 3 Points easily.
Thank you and have a nice day.