Previous I'v already writed something about it. I'v updated the detail in comment. In case you guys might not read it. I'm writing this new article
Draw rule 2bar's range break U1=close>=close and close>=close ? 1 : 0 D1=close<=close and close<=close ? 1 : 0 Draw them with the color you like. U1->D1 or d1->u1 1st break. Fill the lower gap under the break to make them looks flat. All these within move which is not belong to break move. Draw them as flat box. just use previous box's price and current close. (This rule is onle suitable for 1st flat box.Next 2nd flat box or more flat box need another rule) (You must understand that after 1st flat box the 2bar range is narrowed. So it's not likely price will stay flat forever) If 3rd bar or even 4 or more bar still don't make 2bar range move. Just use current close with another price which is when price first stop break. So it looks all flat. But another side of box is narrower.
Another version called ghost line which maintaince same colorchange with previous bar. And I'm not faimlar with it.
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.