maybeOBV

Pivot-Confirmed Divergence Detection → TradingView Screener → Strategy Calibration

maybeOBV Scanner

Filter Legend
Filters
cap>$2BMarket cap over $2B
USAUS-listed only
1M+Volume > 1M/day
2M+Volume > 2M/day
Signals
D / W / MDaily / Weekly / Monthly
Bullish divergence
Bearish divergence
Div + pattern + vol = highest
Patterns (Finviz)
DB DT MB MT C▲ C▼ W▲ W▼ T▲ T▼ SR
Live Triggers
Signals that fired within the configurable live window (measured in candles per timeframe). When the TradingView indicator detects a new divergence on any ticker in the watchlist, it sends an alert via webhook that appears here. Each card shows the ticker, direction (bull/bear), which timeframes triggered, and the price at trigger time. Cards fade as they age toward the window boundary. Click any card to expand and see each individual signal with its timestamp, price, and timeframe. Multi-timeframe confluence (e.g. D+W both bull) is highlighted — these are the highest-conviction setups.
Detection History
Every divergence ever detected — both from live webhook alerts and from the backlog scan (which runs the same detection algorithm on historical data). Unlike Live Triggers, history has no expiry window — all signals are preserved indefinitely. Each entry shows when the divergence was originally detected (the date the price + OBV diverged) and when it was scanned (when the system found it). Entries marked ALERT came from real-time TradingView webhooks. Entries marked SCAN came from the Python backlog scanner. Use the filters to narrow by direction, timeframe, and per-TF bias. Star tickers you're watching to track them across sessions.
Universe
The full list of tickers being monitored, pulled from Finviz Elite (cap > $2B, US-listed). Each ticker is tagged with volume tier (1M+ or 2M+ average daily volume) and any active chart patterns detected by Finviz (Double Bottom, Channel Up, etc.). Tickers are grouped by sector with a count badge. Use the sector dropdown to jump to a specific sector. The pattern chip filters let you find tickers matching one or more Finviz patterns — these have the highest conviction when combined with an OBV divergence signal. The universe refreshes daily via the Finviz scan.
Universe: Live Triggers: History: Starred:

Live Triggers

Loading triggers...

Detection History

No history

Universe

Loading universe...
How to run manually
python3 src/screener/scan_lite.py [--preset broad|accumulation|unusual_vol]

Cron runs automatically at 6am weekdays. Results appear here on next refresh.

Analytics

Signal Overview

Total Detections
Bull Signals
Bear Signals
Multi-TF Confluence

By Timeframe

Daily
Weekly
Monthly

By Sector

All Signals

Loading analytics...

maybeOBV

maybeOBV

What is this?

A scanner that detects when smart money is quietly buying or selling before the price moves. It watches volume flow (OBV) and compares it to price action. When they disagree — that's a divergence, and it often predicts the next move.

Key Concepts

OBV (On-Balance Volume)
A running total of volume. When price closes up, that bar's volume is added. When price closes down, it's subtracted. The result is a line that shows where money is flowing — up means buyers are in control, down means sellers.
Divergence
When price and OBV disagree. If price makes a lower low but OBV makes a higher low, buyers are accumulating even though price looks weak — that's a bullish signal. The reverse (price higher high, OBV lower high) means distribution — bearish.
Pivot
A confirmed swing point — a low that has higher bars on both sides, or a high with lower bars on both sides. The indicator waits for this confirmation before drawing anything. A pivot length of 2 means it needs 2 bars on each side to confirm.

Detection Layers

Layer 1: Pivot-Confirmed Divergence

The core signal. Finds moments where price is making new lows but volume flow (OBV) is actually rising — meaning institutions are buying into the weakness. Or the reverse: price making new highs while OBV drops — institutions selling into strength.

Only triggers when both price AND OBV have confirmed swing points (pivots). This eliminates noise and false signals.

Layer 2: OBV Trendline Break

Momentum confirmation. When OBV breaks above its recent high or below its recent low, it confirms the direction of money flow. Think of it as OBV "breaking out" before price does.

Layer 3: Effort Candles

Spotting big-player activity. A candle with huge volume but a tiny body means someone moved a lot of money but price barely budged — that's absorption (a wall of buying or selling). A big body + big volume = a sponsored, intentional move.

Layer 4: OBV Slope Divergence

Speed comparison. Measures how fast OBV is changing vs how fast price is changing. When OBV is moving faster than price (leading), it hints at what's coming next. Green background = OBV leading up. Red = OBV leading down.

Layer 5: Range Pattern Detection

Context awareness. Automatically detects when price is stuck in a range (double bottom, wedge, triangle, channel). Divergences inside a range are the highest-conviction setups because the range is about to break.

Labels: DB = Double Bottom, DT = Double Top, T▲ = Ascending Triangle, W▼ = Descending Wedge, SR = Support/Resistance

Layer 6: Context Readiness Score (0-100)

Setup quality meter. Scores how "ready" a setup is based on 5 factors: Is volume declining? (institutions accumulating quietly) Is the range tightening? Does OBV disagree with price? Is the weekly trend aligned? Are there absorption candles? Higher score = higher conviction.

MTF: Multi-Timeframe

See the big picture. When you're on a 4-hour chart, the indicator still shows you Daily, Weekly, and Monthly divergences as overlay lines. A divergence on a higher timeframe is a stronger signal than one on a lower timeframe.

Inputs Reference

Input Default Range What it does
Pivot Length (D/H4) 2 1-20 How many bars on each side to confirm a swing point on Daily/H4. Lower = faster but noisier.
Pivot Length (W/M) 5 2-20 Same but for Weekly/Monthly. Higher because weekly data is already smoother.
Min Span (D/H4) 5 2-30 Minimum bars between two pivots for a valid divergence. Filters out tiny, meaningless swings.
Min Span (W/M) 15 3-50 Same for Weekly/Monthly. Wider because weekly divergences develop over months.
Max Lookback 100 20-300 How far back to look for the previous pivot. If two pivots are 100+ bars apart, they're probably unrelated.
OBV Break Window 30 10-60 How many bars to check when looking for an OBV breakout above/below its range.
Slope Period 20 5-50 Window for comparing OBV speed vs price speed. 20 = about 1 month on daily.
Slope Diverge % 15% 1-50% How different OBV and price slopes need to be before highlighting. 15% = meaningful gap.
Effort Vol x 2.5 1-10 How much higher than average volume a candle needs to qualify as an "effort" candle. 2.5x = significant.
Max Body % 0.5 0.1-0.8 Max candle body size (vs total range) for absorption detection. 0.5 = body is less than half the range.
Range Lookback 30 10-80 How many bars to analyze when detecting range patterns (wedges, triangles, etc.).
ATR Tolerance 0.5 0.2-2.0 How close a price needs to get to a level to count as "touching" support/resistance. In ATR units.
Vol Short 20 5+ Recent volume average (20 bars). Compared to Vol Long to detect volume decline — a setup precondition.
Vol Long 50 10+ Baseline volume average (50 bars). If Vol Short < Vol Long, volume is declining — institutions may be accumulating.

How the Math Works

OBV Formula
Each bar: if price closed higher than yesterday, add today's volume to the running total. If lower, subtract it. If unchanged, do nothing. The result is a cumulative line showing net buying vs selling pressure over time.
Pivot Confirmation
A swing low is confirmed when it has N higher bars on the left AND N higher bars on the right (where N = pivot length). This means the signal is always N bars late — but it's real, not noise. On Daily with pivot=2, you're 2 trading days late.
Nearest-Pivot Matching
When a price pivot is found, the indicator searches the last 30 OBV pivots for the closest one within 3x the pivot length. This ensures the OBV divergence line connects to an actual OBV swing point — not a random spot on the line. This is what prevents the divergence line from "cutting through" the OBV.
The Divergence Rule
BULL: Price makes a lower low (things look bad) BUT OBV makes a higher low (smart money is actually buying). The disagreement = upcoming reversal up.

BEAR: Price makes a higher high (things look great) BUT OBV makes a lower high (smart money is actually selling). The disagreement = upcoming reversal down.

Display Options

Option Default What it shows
Divergence ON The main signal lines connecting pivots. Always keep this on.
Ranges ON Boxes around detected patterns (DB, DT, wedges). Helpful for context.
Table ON Stats panel showing score, OBV slope, volume, signals.
OBV ON The white OBV line in the bottom panel. Always keep on.
EMA OFF 20-period moving average of OBV. Smooths the line but adds clutter.
Breaks OFF Triangle markers when OBV breaks its range. Noisy on most charts.
Effort OFF Dots/arrows for absorption and sponsored candles. Useful for analysis, clutters for scanning.

Changelog

v3: Pivot-confirmed divergence, per-TF pivot lengths (D=2, W/M=5), 2-layer min span (D: 8/10, W: 10/25, M: 10/15), MTF detection, OBV radius=5, range pattern shortcodes, StoiQ-inspired hub.

v2: Basic divergence + context filters. No pivot confirmation, no MTF.


Calibration & Backtest

Calibration Results (74 tickers, 2,240-combo sweep, walk-forward validated)

768
Daily Signals
50.1%
Daily WR@25
209
Weekly Signals
45.4%
Weekly WR@25
110
Monthly Signals
50.5%
Monthly WR@25
Detection rules: Price sweep (actual lows/highs) + most-extreme OBV pivot within radius 5 + pivot_len D=2, W/M=5. 2-layer min span per TF: D (8/10), W (10/25), M (10/15). Dotted lines = Layer 1 (developing), Solid = Layer 2 (established). Bull signals significantly outperform bear across all timeframes.

Key Findings (2,240-combo autoresearch sweep)

  1. Bull >> Bear: Bull WR 56-79% vs bear 25-44%. The edge is almost entirely in bull divergences.
  2. Monthly Bull = Strongest Signal: 78.6% bull WR@25 months. Walk-forward holds at 1.09x.
  3. Sideways Regime Best: 66.7% WR@25 in sideways markets, 53.7% in bear, 47.8% in bull.
  4. Best Sectors: Utilities (65%), Consumer Cyclical (59%), Basic Materials (59%). Worst: Consumer Defensive (36%), Real Estate (36%).
  5. 3ATR Stops: Consistent 1.1-1.5x reward:risk across all windows.
  6. Friction Survives: 0.15% round-trip cost drops WR by only ~0.5%.
  7. Walk-Forward: WFE 0.90-1.09x — no overfitting detected.

Parameter Table (per timeframe)

TF Pivot Len Layer 1 (dotted) Layer 2 (solid) Signals WR@25 Bull WR Bear WR
D 2 8 10 768 50.1% 56.3% 44.4%
W 5 10 25 209 45.4% 68.1% 25.2%
M 5 10 15 110 50.5% 78.6% 29.8%

Forward Return Windows

WindowWRNet WRPFMAEMFEBull WRBear WR
10 bars52.7%51.7%1.39x-8.5%14.0%61.5%45.2%
25 bars51.4%50.9%1.05x-12.4%25.3%61.5%42.8%
50 bars46.2%45.8%1.12x-16.2%43.1%60.5%34.2%
100 bars47.7%47.2%0.75x-20.6%72.6%63.3%34.5%

Production Filters (Recommended)

Prioritize Bull Signals: Bull WR 56-79% vs bear 25-44%. Bear signals are below coin flip on W/M.
Best Sectors: Utilities, Consumer Cyclical, Basic Materials. Avoid Consumer Defensive, Real Estate.
Regime Check: Sideways markets (SPY near 200 SMA) produce best results. Bull markets dilute the signal.
3ATR Stop: Use 3x ATR stop-loss for 1.1-1.5x reward:risk ratio.
Solid > Dotted: Solid lines (wider span) are more established setups. Dotted lines are developing — check manually.

TradingView Strategy Tester

The strategy file (obv_strategy_v3.pine) replicates the Python backtest in Pine Script:

# To use in TradingView:
1. Copy obv_strategy_v3.pine code
2. Pine Editor → New Script → Paste
3. Save → Add to chart
4. Strategy Tester → Run → Review results
5. Compare hold period columns (should match Python ~54-55% WR)

Recalibration Guide

When to Recalibrate

Quarterly: Run full backtest sweep every 3 months to detect regime drift.

After Major Macro Events: Fed pivot, yield curve inversion, sector rotation.

After 50-Signal Sample: If new data shows WR dropping >3%, investigate.

What to Tune

Pivot Length: Increase if too many false signals; decrease if missing setups.

Lookback: Narrow to 50-80 bars if in choppy regime; expand to 120+ in trending markets.

Context Score Threshold: Raise from 65 to 75 if false signals increase.

How to Run Backtest

# Python backtest (if available in your project):
python3 src/analysis/pivot_length_comparison.py

# TradingView backtest:
1. Add strategy to chart
2. Right-click → Strategy Tester → Run
3. Review WR% and Profit Factor across hold periods
4. Export results → compare to previous quarter