Translate the belt hold shape into measurable rules
CandleScanner describes a long opening marubozu with a short closing-side shadow, after a decline for bullish belt hold or a rise for bearish belt hold. It explicitly treats its shadow cutoff as an implementation choice. The following custom specification uses ordinary OHLC candles; it is not a TradingView default or a reproduction of another scanner.
- O, H, L and C are open, high, low and close. R = H - L and B = abs(C - O). The 20-bar mean uses only completed bars before the candidate, excluding the candidate itself.
- Strict mode sets tolerance to zero. Near-extreme mode sets it to the smaller of one minimum tick and 2% of R. Both limits must pass; a large range must not permit a large opening wick.
- Reject missing prices, H <= L, an open or close outside the high-low range, insufficient prior history, or a zero prior mean body. Do not divide by a zero range or silently replace missing history.
- The 20%, 75%, 1.5 multiplier and three-close trend filter are illustrative research settings, not optimized thresholds. With a 2% opening cap and 20% closing cap, the body is already at least 78%; the 75% body test becomes relevant if the shadow settings are widened.
| Test | Bullish candidate | Bearish candidate |
|---|---|---|
| Direction | C > O | C < O |
| Opening-side shadow | O - L <= tolerance | H - O <= tolerance |
| Closing-side shadow | (H - C) / R <= 20% | (C - L) / R <= 20% |
| Body share | B / R >= 75% | B / R >= 75% |
| Relative body length | B >= 1.5 × prior 20-bar mean body | Same requirement |
| Prior trend | Three preceding closes strictly decreasing | Three preceding closes strictly increasing |