OPEN-SOURCE SCRIPT
Updated

Gap Detector (Body and Candle)

160
Finds/Detects gaps between candles and candle bodies for any chart/timeframe with O(n+delta) performance.

Candle Gaps (between wicks) act as strong support or resistance. They are drawn as solid boxes.
Body Gaps (ignores wicks) act as mild support or resistance. They are depicted with lines.

Adjust the settings for candle/body gap width, smaller the time frame, smaller the gap.
Adjust max historical bars to fine tune performance on your system/setup. The more historical bars the script scans, more time required to load the chart. At times based on system configuration, TradingView may timeout the script due to too many bars. Reducing the max bars helps in this scenario.

This is a revamped version of "Body Gap Detector".
Happy charting !
Release Notes
Updating chart

Disclaimer

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.