Darvas Boxes (Multi-Mode)
Category: market_structure, trend
A multi-mode Darvas Box implementation that identifies price consolidation ranges using pivots and signals breakouts. Supports classic (bull-only) and modern (bi-directional) Darvas methodologies.
Formula
BoxTop = H_{pivot} \text{ where } H_{pivot} = \max(H_{i \dots i+N}) \text{ and } H_{t} < H_{pivot} \text{ for } t \in [i-N, i); \\ BoxBottom = L_{pivot} \text{ identified after } BoxTop \text{ while } Price \leq BoxTop.
Inputs
- DarvasMode (default: 3)
- PivotStrength (default: 3)
- RollingPeriod (default: 1)
- BoxesMode (default: 0)
- ChannelMode (default: 1)
- PivotsMode (default: 0)
- GhostBoxesMode (default: 0)
- SignalMode (default: 0)
See signal primitives, usage in published strategies and more on WOBR StrategyVerse.