Boxline (Consolidation Zones)
Category: market_structure
Identifies and visualizes consolidation zones (boxes) that expand to contain price action until a candle closes outside the established range.
Formula
\text{top}_i = \max(\text{high}_{k \dots i}), \quad \text{bottom}_i = \min(\text{low}_{k \dots i}) \\ \text{Where } k \text{ is the start of the current consolidation box.} \\ \text{Breakout condition: } \text{close}_i > \text{top}_{i-1} \text{ or } \text{close}_i < \text{bottom}_{i-1} \\ \text{middle}_i = \frac{\text{top}_i + \text{bottom}_i}{2}
Inputs
- showBoxes (default: true)
- hcolor (default: clrLightBlue)
- lcolor (default: clrLightPink)
See signal primitives, usage in published strategies and more on WOBR StrategyVerse.