OPEN-SOURCE SCRIPT

Top Finder & Dip Hunter [BackQuant]

247
Top Finder & Dip Hunter [BackQuant]

A practical tool to map where price is statistically most likely to exhaust or mean-revert. It builds objective support for dips and resistance for tops from multiple methodologies, then filters raw touches with volume, momentum, trend, and price-action context to surface higher-quality reversal opportunities.

What this does
  • Draws a Dip Support line and a Top Resistance line using the method you select, or a blended hybrid.
  • Evaluates each touch/penetration against Quality Filters and assigns a 0–100 composite score.
  • Prints clean DIP and TOP signals only when depth/extension and quality pass your thresholds.
  • Optionally annotates the chart with the computed quality score at signal time.


Why it’s useful
  • Objectivity: Converts vague “looks extended” into rules, reduces discretion creep.
  • Signal hygiene: Filters raw touches using trend, volume, momentum, and candle structure to avoid obvious traps.
  • Adaptable regimes: Switch methods, sensitivity, and lookbacks to match choppy vs trending conditions.


How support and resistance are built
Pick one per side, or use “Hybrid.”
  • Dynamic: Anchors to the extreme of a lookback window, padded by recent ATR, so buffers expand in volatile periods and contract when calm.
  • Fibonacci: Uses the 0.618/0.786 retracement pair inside the current swing window to target common reaction zones.
  • Volatility: Uses a moving-average basis with standard-deviation bands to capture statistically stretched moves.
  • Volume-Weighted: Centers off VWAP and penalizes deviations using dispersion of price around VWAP, helpful on intraday instruments.
  • Hybrid: A weighted average of the above to smooth out single-method biases.


When a touch becomes a signal
  • Depth/extension test:Dips must penetrate their support by at least Min Dip Depth %.
    Tops must extend above resistance by at least Min Top Rise %.
  • Quality Score gate: The composite must clear Min Quality Score. Components:
    • Trend alignment: Favor dips in bullish regimes and tops in bearish regimes using EMAs and RSI.
    • Volume confirmation: Reward expansion or spikes versus a 20-period baseline.
    • RSI context: Prefer oversold for dips, overbought for tops.
    • Momentum shift: Look for short-term momentum turning in the expected direction.
    • Candle structure: Reward hammer/shooting-star style responses at the level.


How to use it
  1. Pick your regime:Range/chop, small caps, mean-revert intraday → Volatility or Volume Weighted.
    Cleaner swings/trends → Dynamic or Fibonacci.
    Unsure or mixed conditions → Hybrid.
  2. Set windows: Start with Lookback = 50 for both sides. Increase in higher timeframes or slow assets, decrease for fast scalps.
  3. Tune sensitivity: Raise Dip/Top Sensitivity to widen buffers and reduce noise. Lower to be more aggressive.
  4. Gate with quality: Begin with Min Quality Score = 60. Push to 70–80 for cleaner swing entries, relax to 50–60 for scalps.
  5. Act on first prints: The script only fires on new qualified events. Use the score label to prioritize A-setups.


Typical workflows
  • Intraday futures/crypto: Volume-Weighted or Volatility methods for both sides, higher Sensitivity, require Volume Filter and Momentum Filter on. Look for DIP during opening drive exhaustion and TOP near late-session fatigue.
  • Swing equities/FX: Dynamic or Fibonacci with moderate sensitivity. Keep Trend Filter on to only take dips above the 200-EMA and tops below it.
  • Countertrend scouts: Lower Min Dip Depth %/Min Top Rise % slightly, but raise Min Quality Score to compensate.


Reading the chart
  • Lines: “Dip Support” and “Top Resistance” are the current actionable rails, lightly smoothed to reduce flicker.
  • Signals: “DIP” prints below bars when a qualified dip appears, “TOP” prints above for qualified tops.
  • Scores: Optional labels show the composite at signal time. Favor higher numbers, especially when aligned with higher-timeframe trend.
  • Background hints: Light highlights mark raw touches meeting depth/extension, even if they fail quality. Treat these as early warnings.


Tuning tips
  • If you get too many false DIP signals in downtrends, raise Min Dip Depth % and keep Trend Filter on.
  • If tops appear late in squeezes, lower Top Sensitivity slightly or switch top side to Fibonacci.
  • On assets with erratic volume, prefer Volatility or Dynamic methods and down-weight the Volume Filter.
  • For strict systems, increase Min Quality Score and require both Volume and Momentum filters.


What this is not
  • It is not a blind reversal signal. It’s a structured context tool. Combine with your risk plan and higher-timeframe map.
  • It is not a guarantee of mean reversion. In strong trends, expect fewer, higher-score opportunities and respect invalidation quickly.


Suggested presets
  • Scalp preset: Lookback 30–40, Sensitivity 1.2–1.5, Quality ≥ 55, Volume & Momentum filters ON.
  • Swing preset: Lookback 75–100, Sensitivity 1.0–1.2, Quality ≥ 70, Trend & Volume filters ON.
  • Chop preset: Volatility/Volume-Weighted methods, Quality ≥ 60, Momentum filter ON, RSI emphasis.


Input quick reference
  • Dip/Top Method: Choose the model for each side or “Hybrid” to blend.
  • Lookback: Swing window the levels are built from.
  • Sensitivity: Scales volatility padding around levels.
  • Min Dip Depth % / Min Top Rise %: Minimum breach/extension to qualify.
  • Quality Filters: Trend, Volume, Momentum toggles, plus Min Quality Score gate.
  • Visuals: Colors and whether to print score labels.


Best practices
  • Map higher-timeframe trend first, then act on lower-timeframe DIP/TOP in the trend’s favor.
  • Use the score as triage. Skip mediocre prints into news or at session open unless score is exceptional.
  • Pre-define stop placement relative to the level you used. If a DIP fails, exit on loss of structure rather than waiting for the next print.


Bottom line: Top Finder & Dip Hunter codifies where reversals are most defensible and only flags the ones with supportive context. Tune the method and filters to your market, then let the score keep your playbook disciplined.

Pernyataan Penyangkalan

Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.