OPEN-SOURCE SCRIPT
업데이트됨 Confined Range Candle Finder

This indicator finds candlesticks which are confined within the range of a previous candlestick. This indicates volatility contraction which often leads to volatility expansion, i.e. large price movements.
While every confined range will contain at least 1 inside bar, this indicator differs from the Inside Bar Finder which only finds consecutive inside bars.
This indicator includes options such as:
- The minimum number of candlesticks confined within the range of a previous candlestick to trigger the indicator
- Labels to indicate the number of confined candles
- Signal lines to indicate the high and low of the containing candlestick
Try out this indicator with different options on different timeframes to see if confined ranges increase the probability of identifying the direction of price movements. Breaks or closes outside signal lines can be used to trigger trade signals.
While every confined range will contain at least 1 inside bar, this indicator differs from the Inside Bar Finder which only finds consecutive inside bars.
This indicator includes options such as:
- The minimum number of candlesticks confined within the range of a previous candlestick to trigger the indicator
- Labels to indicate the number of confined candles
- Signal lines to indicate the high and low of the containing candlestick
Try out this indicator with different options on different timeframes to see if confined ranges increase the probability of identifying the direction of price movements. Breaks or closes outside signal lines can be used to trigger trade signals.
릴리즈 노트
v2 Release NotesEnhancements:
1. Added a % Tolerance so extremely small violations of the high/low can be ignored
2. Added a background fill color for the confined range
3. "Include Wicks" checkbox replaced by a "Range Boundary" dropdown: Wicks or Candle Bodies
4. Once found, a range is tracked until it breaks, with no length limit and a much faster calculation
5. Upgraded to Pine Script v6
Fixes:
1. Fixed range detection when wicks are excluded (now "Candle Bodies" mode)
2. Each confined range is now drawn once: the box, signal lines and count label extend with the range instead of stacking duplicates
3. Fixed the time calculation for assets that don't trade 24/7, so ranges anchor correctly across weekend/holiday gaps
4. Ranges longer than 50 candles are no longer cut off or re-drawn as overlapping boxes
5. Fixed false ranges on the first bars of chart history
6. Count label text is now readable (white text on the signal line color)
릴리즈 노트
v3 Release NotesFixes:
1. Reduced default opacity
릴리즈 노트
v4 Release NotesEnhancements:
1. Added a "Containing Candle Direction" filter (Any/Up/Down) to only find ranges whose containing candle closed up (close >= open) or down
Fixes:
1. Count label text now switches between black and white automatically for contrast, so it stays readable with light signal line colors such as white
릴리즈 노트
v5 Release NotesEnhancements:
1. Added multi-timeframe support: a new "Timeframe" input finds confined ranges on the chart's timeframe or any higher timeframe
2. Added "Signal Mode": Confirmed (default, non-repainting, ranges appear after the candle closes) or Live (updates with the forming candle and may repaint)
3. Inputs are organized into Range Detection, Display, and Timeframe groups
4. Added a separate "Background" checkbox, so the range fill and lines can be shown independently
Changes:
1. Renamed "Show Signal Lines" to "Lines" and "Confined Range Fill Color" to "Background". Each now has its color on the same row. Any customized settings for these inputs will reset to the defaults
2. On the live bar, ranges now appear when the candle closes (Confirmed mode). Select "Live" to keep the previous behavior
릴리즈 노트
v6 Release NotesEnhancements:
1. Added a "Midline" option: a dotted line halfway between the range boundaries, with its own color (off by default)
Changes:
1. Renamed "Lines" to "Boundary Lines". If you customized this setting, it will reset to the default (on)
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
Technical analysis should be made as simple as possible, but no simpler. --Albert Einstein
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
Technical analysis should be made as simple as possible, but no simpler. --Albert Einstein
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.