BOS_CHoCH_Detector
Category: market_structure, trend
Detects and visualizes Break of Structure (BOS) and Change of Character (CHoCH) using a state-machine approach and pivot point identification.
Formula
BOS_{bullish} = price > max(high, range_{formation}) \\ CHoCH_{bearish} = price < min(low, range_{BOS\_swing}) \\ Swing\% = \frac{|BOS_{level} - CHoCH_{level}|}{(BOS_{level} + CHoCH_{level})/2} \times 100 > threshold
Inputs
- Initial direction window (default: 3)
- Hunt mode (default: wick)
- Include BOS hunt candle in initial CHoCH range (default: true)
- Minimum swing percent (default: 0.0)
- Bullish BOS color (default: color.lime)
- Bearish BOS color (default: color.red)
See signal primitives and every published strategy that uses BOS_CHoCH_Detector on WOBR StrategyVerse.