Streak conditions for rectangle box formation in candle stick

I want conditions for rectangle box formation in scanner Like below.

image

Highly appreciate your support

Hey @Trade_lose_repeat

You can refer to the below scanner for the conditions as per my understanding of your requirements-

https://scanners.streak.tech/scanner/rectangle-pattern

You can also refer to the below blog to understand the logic behind the above conditions, to make the changes as per your requirements-