Detecting Regular and Hidden Divergences Across Seven Indicators
Summary
This indicator toolbox searches for regular and hidden divergences between price and seven technical series: MACD, RSI, MFI, OBV, CCI, a stochastic momentum measure, and PVT. It identifies recent local highs or lows over a lookback window, compares the price extreme with the corresponding indicator extreme, and draws line segments when the divergence conditions are met. The code uses indicator-specific thresholds for some oscillators and assigns distinct colors to each indicator's signals.
The displayed signals are descriptive chart annotations, not a complete entry, exit, or position-sizing system. The excerpt provides no backtest, transaction-cost analysis, or evidence that combining these indicators improves results. Divergence detection depends on how local extrema are defined and can flag conditions before price reverses; the logic may also be sensitive to lookback choices and indicator implementation. The material is a code-oriented example for technical analysis rather than a validated standalone trading strategy.
Key ideas
- The indicator compares price swings with extrema in seven momentum, flow, or volume-related measures.
- Regular divergences are identified when price makes a more extreme high or low while the indicator does not.
- Hidden divergences use related but distinct comparisons between price and indicator extrema.
- The script draws labeled line segments to show detected conditions on a chart.
- No tests or performance evidence establish whether the signals are profitable.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.