How to draw rectangle EVERYTIME buy and sell candlestick happen

How to draw rectangle EVERYTIME buy and sell candlestick happen.

More information would make the question clearer.
I assume you want to draw a rectangle around the candlestick bar…buy and sell?
All bars are up or down and this could mean buy or sell. I don’t think this is what you mean, as that would be a rectangle around every bar.

Are you meaning a pair of bars where one it up and the other down?