OPEN-SOURCE SCRIPT
Updated Intelligent Top & Bottom Finder v9.8 Keyvankh

📈 Intelligent Top & Bottom Finder v9.8 Keyvankh
A next-generation all-in-one trading system for precise tops, bottoms, and reversals across all timeframes.
---
🟢 Overview
This indicator is a powerful and intelligent solution for detecting market tops and bottoms, key reversals, and S/R zones with institutional-grade accuracy. Designed for traders seeking an edge in any market (crypto, forex, stocks), it combines advanced candlestick recognition, multi-indicator confirmation, smart support/resistance clustering, and strict signal filtering into one seamless tool.
---
🔎 How Does It Work?
1. Advanced Support & Resistance Clustering
Automatically detects and draws high-probability support and resistance zones using dynamic ATR-based pivot clustering.
Highlights breakouts and retest (flip) zones in real-time, adapting to changing market structure.
2. Full Candlestick Pattern Recognition
Scans for 15+ classic and advanced patterns: Engulfing, Pin Bar, Doji, Three Bar, Marubozu, Hammer, Shooting Star, Three White Soldiers, Three Black Crows, Tweezer, Morning/Evening Star, Kicker, Belt Hold, and more.
Scores each pattern’s strength based on location (S/R zone, retest, breakout), volume context, and confirmation signals.
3. Multi-Indicator Confirmation Engine**
Integrates and scores confirmation from up to five additional sources:
RSI Games 1.2** (smoothed LTF momentum shifts)
MACD Divergence** (bullish/bearish momentum reversal)
QQE+ v7 Advanced** (dynamic volatility filter)
OBV Trend Filter** (volume-backed trend validation)
Volume Game** (net volume spike and reversal detection)
Each module can be enabled or disabled to fit your personal trading style.
4. Institutional S/R and Retest Logic
Real-time recognition of major trendline breaks, retest zones, and price flips.
Automatic labeling and coloring of S/R zones, retest boxes, and confirmation candles.
5. Smart Buy & Sell Signal Generation**
Combines all scoring modules with strict logical filters and “failsafe override” logic (guaranteeing signal on confirmed hammers, engulfings, etc. even if other filters disagree).
Plots clear “BUY” and “SELL” labels only when a strong, multi-factor signal appears—minimizing noise and maximizing reliability.
Built-in fallback logic (optional) for edge cases.
6. Alerts & Automation Ready
TradingView alerts for all BUY, SELL, or ANY signal conditions—perfect for auto-trading or notification setups.
---
*⚙️ Customizable Inputs
Enable/Disable any module (RSI Games, MACD, OBV, QQE+, Candlestick Scanner, Volume Game)
Minimum Confirmations** required for a signal (1–10)
Pivot/Zone Sensitivity:** ATR multiplier, pivots per cluster, retest bar duration
LTF (Lower Timeframe) Confirmation:** Fully configurable
---
📊 How To Use**
Apply on any timeframe and symbol**—crypto, stocks, forex, indices.
Use as a **standalone reversal/entry tool** or to confirm your own technical setups.
Combine with your favorite momentum, trend, or volume indicators for advanced confluence.
Set up **TradingView alerts** for auto-trading, Telegram/email notifications, or trade journaling.
---
🟢 What Makes This Unique?
All-in-one multi-indicator fusion:** No more juggling a dozen scripts.
Institutional logic:** Goes beyond basic signals with true S/R, retest, and volume logic.
Full transparency:** Source code is clear and commented (if published open-source).
Fast and reliable:** Optimized for minimal lag and maximum accuracy.
---
⚠️ Disclaimer**
This indicator is a tool to assist with trade timing and risk management. **No system is 100% accurate.** Always use in conjunction with your own analysis and risk management practices.
---
📚 Credits & License**
Created by Keyvan Khodakhah.
You may use, modify, or share this script under the [Mozilla Public License 2.0 (MPL-2.0)](mozilla.org/MPL/2.0/).
Please credit the original author if you fork or reuse in public.
---
Questions, feedback, or collaboration? Contact: Keyvankh
---
Precision in technical analysis comes from layers of confluence and discipline. This tool brings that precision to your chart.
A next-generation all-in-one trading system for precise tops, bottoms, and reversals across all timeframes.
---
🟢 Overview
This indicator is a powerful and intelligent solution for detecting market tops and bottoms, key reversals, and S/R zones with institutional-grade accuracy. Designed for traders seeking an edge in any market (crypto, forex, stocks), it combines advanced candlestick recognition, multi-indicator confirmation, smart support/resistance clustering, and strict signal filtering into one seamless tool.
---
🔎 How Does It Work?
1. Advanced Support & Resistance Clustering
Automatically detects and draws high-probability support and resistance zones using dynamic ATR-based pivot clustering.
Highlights breakouts and retest (flip) zones in real-time, adapting to changing market structure.
2. Full Candlestick Pattern Recognition
Scans for 15+ classic and advanced patterns: Engulfing, Pin Bar, Doji, Three Bar, Marubozu, Hammer, Shooting Star, Three White Soldiers, Three Black Crows, Tweezer, Morning/Evening Star, Kicker, Belt Hold, and more.
Scores each pattern’s strength based on location (S/R zone, retest, breakout), volume context, and confirmation signals.
3. Multi-Indicator Confirmation Engine**
Integrates and scores confirmation from up to five additional sources:
RSI Games 1.2** (smoothed LTF momentum shifts)
MACD Divergence** (bullish/bearish momentum reversal)
QQE+ v7 Advanced** (dynamic volatility filter)
OBV Trend Filter** (volume-backed trend validation)
Volume Game** (net volume spike and reversal detection)
Each module can be enabled or disabled to fit your personal trading style.
4. Institutional S/R and Retest Logic
Real-time recognition of major trendline breaks, retest zones, and price flips.
Automatic labeling and coloring of S/R zones, retest boxes, and confirmation candles.
5. Smart Buy & Sell Signal Generation**
Combines all scoring modules with strict logical filters and “failsafe override” logic (guaranteeing signal on confirmed hammers, engulfings, etc. even if other filters disagree).
Plots clear “BUY” and “SELL” labels only when a strong, multi-factor signal appears—minimizing noise and maximizing reliability.
Built-in fallback logic (optional) for edge cases.
6. Alerts & Automation Ready
TradingView alerts for all BUY, SELL, or ANY signal conditions—perfect for auto-trading or notification setups.
---
*⚙️ Customizable Inputs
Enable/Disable any module (RSI Games, MACD, OBV, QQE+, Candlestick Scanner, Volume Game)
Minimum Confirmations** required for a signal (1–10)
Pivot/Zone Sensitivity:** ATR multiplier, pivots per cluster, retest bar duration
LTF (Lower Timeframe) Confirmation:** Fully configurable
---
📊 How To Use**
Apply on any timeframe and symbol**—crypto, stocks, forex, indices.
Use as a **standalone reversal/entry tool** or to confirm your own technical setups.
Combine with your favorite momentum, trend, or volume indicators for advanced confluence.
Set up **TradingView alerts** for auto-trading, Telegram/email notifications, or trade journaling.
---
🟢 What Makes This Unique?
All-in-one multi-indicator fusion:** No more juggling a dozen scripts.
Institutional logic:** Goes beyond basic signals with true S/R, retest, and volume logic.
Full transparency:** Source code is clear and commented (if published open-source).
Fast and reliable:** Optimized for minimal lag and maximum accuracy.
---
⚠️ Disclaimer**
This indicator is a tool to assist with trade timing and risk management. **No system is 100% accurate.** Always use in conjunction with your own analysis and risk management practices.
---
📚 Credits & License**
Created by Keyvan Khodakhah.
You may use, modify, or share this script under the [Mozilla Public License 2.0 (MPL-2.0)](mozilla.org/MPL/2.0/).
Please credit the original author if you fork or reuse in public.
---
Questions, feedback, or collaboration? Contact: Keyvankh
---
Precision in technical analysis comes from layers of confluence and discipline. This tool brings that precision to your chart.
Release Notes
Intelligent Top & Bottom Finder v9.9 Keyvankh – Major Update!
What’s new in v9.9?
🚀 Full Trendline & Channel Detection:
Automatically detects and draws key trendlines and parallel channels using recent price pivots—no more manual drawing!
🔔 Breakout & Retest Logic:
Now detects and marks trendline/channel breakouts and retests in real time. These structural signals are directly integrated into the buy/sell scoring, improving signal quality and accuracy.
💡 Structure-Aware Signals:
Signals are now blocked below strong resistance and filtered above major support, ensuring you only get high-probability entries. Breakout and retest events give an extra boost to the confidence score.
👀 Enhanced Visualization:
Clear visual markers for trend breaks (“TL BREAK”) and retests (“RETEST”), alongside all classic support/resistance zones.
📈 All classic features remain:
All previous confirmation layers (candlestick, RSI Games, MACD, OBV, QQE, volume, debounce, failsafe, etc.) are fully retained and improved with the new structural logic.
This is a significant upgrade for structure-based traders, breakout/pullback lovers, and anyone who wants “pro-level” signals with total transparency.
As always, feedback is welcome! Try it, share your thoughts, and let’s keep improving.
Release Notes
Intelligent Top & Bottom Finder v10.0 Keyvankh
Author: Keyvan Khodakhah
License: Mozilla Public License 2.0 (MPL-2.0)
🚨 Version 10.0 Major Update: Bull & Bear Trap Detection! 🚨
What’s New:
Bull Trap & Bear Trap Detection:
Instantly spots classic bull traps (fake breakouts above resistance) and bear traps (fake breakdowns below support). Bull Traps now appear in orange and Bear Traps in blue directly on your chart for fast visual alerts.
Volume Spike Filtering:
Trap signals only appear when confirmed by strong volume spikes, helping you filter out noise and focus on real traps.
All original buy/sell signal logic, S/R and trendline detection remain unchanged and fully reliable.
If you find this update helpful, please leave your feedback, suggestions, or bug reports in the comments below! Your input helps me keep improving the indicator.
Release Notes
Intelligent Top & Bottom Finder v11.0 – Update Description
v11.0 is here, delivering major upgrades in entry accuracy, adaptive filtering, and cleaner visuals—while fully preserving your institutional-grade pattern detection and trap logic.
What’s New:
Adaptive Debounce Logic: Signals arrive faster in trending markets, slower during chop—automatically tunes to volatility.
Smart Volume Filtering: Signal volume filters now adapt to market conditions—never miss a setup in quiet or high-vol environments.
Enhanced Fallback Logic: Near-miss signals (one point below min threshold) now activate only with added confluence from MACD, OBV, RSI LTF, or candlestick pattern—smarter, safer entries.
Nuanced S/R & Trendline Adjustment: Signals near key resistance, support, or trendlines are no longer harshly blocked if other confirmations are strong. Weak signals are penalized more, but strong setups still get through.
Unified Pattern/Indicator Scoring: Full multi-layer system—candlestick, MACD, QQE+, OBV, RSI Games, cluster-based S/R—now fully integrated with new scoring.
Signal Clustering: Option to show only the strongest buy/sell signal per cluster, reducing chart noise.
Institutional-Grade Trap Detection: No dilution—advanced breakout rejections and volume spike trap logic are all preserved.
Updated Alerts & Visuals: All alerts, labels, and plots are aligned with the new scoring and filter logic.
How it Works:
Faster, smarter signals in real trends—safer filters in chop.
Adapts to both high- and low-volume regimes.
Fallback triggers only when there’s strong multi-indicator confluence.
Won’t miss a great entry just because you’re near a zone—unless the setup is truly weak.
Keeps charts clean by showing only the strongest signal in each cluster.
All trap, pattern, and indicator logic remain best-in-class.
Why Upgrade?
Reacts more intelligently to real market conditions.
Dramatically reduces false signals near critical levels.
Preserves your full institutional pattern/trap edge.
Cleaner charts, improved automation compatibility.
Release Notes
**Intelligent Top & Bottom Finder v11.0 Keyvankh**All-in-One Institutional Signal Engine • Years of R\&D • Not a Mashup
---
**About This Script**
Intelligent Top & Bottom Finder v11.0 Keyvankh is the culmination of years of market research, real trading, and hands-on coding, designed from the ground up for serious traders. This isn’t just a collection of popular indicators—it’s a unified, context-aware system built to solve the real challenges of top/bottom detection, trap avoidance, and actionable chart clarity.
Every part of this engine was hand-built, integrating institutional price action logic, advanced candlestick pattern grading, multi-indicator confluence, and adaptive filters for volume and market regime. If you’re a trend, swing, or intraday trader who wants more than just signals, this tool is for you.
**Why All These Systems, and Why Together?**
No single indicator or pattern is ever enough. Markets are messy—real tops, bottoms, and breakouts require confluence from multiple, independent sources. This script does exactly that by:
* Scoring every buy/sell setup with a blend of momentum, trend reversal, order flow, and candlestick context.
* Adapting S/R clusters and trendlines to changing volatility—never stuck on static lines.
* Weighing pattern quality against location: A bullish engulfing in the middle of nowhere? Ignored. The same pattern on a retest of demand with volume and momentum? That gets a premium score.
* Institutional trap detection—because breakouts and breakdowns are often fakeouts, and the script actively looks for them using volume spikes and reversal context.
The goal: maximize accuracy, minimize false signals, and mirror the logic of professional, orderflow-driven trading.
---
**What’s Under the Hood? (Features & Logic)**
1. **Multi-Layered Signal Scoring**
* RSI Games LTF: Tracks local momentum shifts and exhaustion zones; confirms only when short-term price action agrees with the bigger trend.
* MACD Divergence: Flags true trend reversals and validates “real” tops/bottoms.
* OBV Trend Filter: Only prints signals with institutional order flow behind them.
* QQE+: Trend quality filter—keeps you out of chop.
* Volume Game: Deep orderflow/whale check to avoid signals in dead/manipulated markets.
* Pro Candlestick Scanner: Not just “is this an engulfing?” but *is it where it matters*? Patterns get bonus/penalty scores based on S/R, retest, and liquidity sweep context.
*No single module can trigger a signal alone—only true multi-factor setups print.*
2. **Cluster-Based Support/Resistance & Retest Zones**
* ATR-weighted clusters identify the real S/R zones where price respects.
* Retest boxes help visualize where institutions reload after stops are taken.
* Pattern scores are boosted when a signal forms at one of these premium zones.
* Volume/price traps: Spot “bull trap” or “bear trap” labels when a breakout reverses on high volume.
3. **Adaptive Trendline & Channel Logic**
* Recent pivots auto-clustered into trendlines, which can block, boost, or contextualize signals.
* No hard blocks: Strong enough multi-factor setups will still print, even near a trendline—real markets aren’t black-and-white.
4. **Adaptive Volume & Debounce Filters**
* Volume filter: Signals need above-average volume (SMA-based), but relaxes in low-liquidity phases to avoid missed trades.
* Debounce/trend mode: In strong trends (SMA divergence), minimum wait time between signals shortens—never miss momentum; in ranges, slows down to avoid noise.
5. **Proprietary Candlestick Grading & Failsafes**
* Patterns are scored based on strength, context, and confirmation (e.g., pin bar at support with volume/RSI = much higher score).
* Aggressive/Fallback/Failsafe Modes:
* Aggressive: Allows earlier signals at strong patterns and key zones.
* Fallback: Triggers when nearly all criteria met, but only if extra modules (MACD, OBV, RSI Games) confirm.
* Failsafe: Will force a top/bottom warning at critical zones, even if the score is just below threshold.
6. **Chart Visuals, Signal Clustering, and Alerts**
* Option to only show the strongest signal per side per zone—charts stay clear and readable.
* Color-coded S/R, trendlines, retest boxes—all signals, traps, and alerts matched to real confluence.
* Professional labels/alerts for all signal and trap types.
---
**How to Use**
1. Add to any chart, asset, and timeframe. (Works best 15m–4H for crypto/forex; 1H–1D for stocks.)
2. Wait for labeled signals (“BUY”/“SELL”)—these only print on genuine, high-confluence setups.
3. Trap labels mean caution—avoid new entries or use with experience for countertrades.
4. Best setups: Buy/sell signals at/near S/R clusters, retest zones, or after a trap event.
5. Use the “Show Only Max Per Side” setting to control chart density.
---
**Settings & Adjustment**
* Minimum Confirmations: Default 7 (raise for stricter, lower for faster signals).
* Enable/Disable Indicator Modules: Toggle RSI Games, MACD, OBV, QQE+, Volume Game, Candlestick Scanner.
* Adaptive Debounce (Trend Mode): ON = faster entries in trends.
* Adaptive Volume Filter: ON = smarter volume rules.
* Advanced S/R Settings: Tune pivots, cluster distance, and pivots per cluster for your market.
* Signal Clustering: ON = only strongest per cluster.
* Aggressive/Fallback/Failsafe: Customize strictness for your trading style.
---
**Why This Is Unique (Not a Clone, Not a Mashup)**
This system is fully original—every filter, score, and context rule was built and refined by hand. The logic is not found in any open-source script, nor is it a simple mashup of common codes. All clustering, trap/label, and scoring logic was designed for live trading and reflects real institutional price action and years of research.
---
**Final Notes**
Backtest, tune, and always use with your own trading plan.
If you want to go deeper, ask questions, or provide feedback, reach out directly.
Created and maintained by Keyvan Khodakhah, MBA, Economics, and trading system designer.
Release Notes
...Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Keyvan Khodakhah
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Keyvan Khodakhah
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.