An advanced, multi-layered market analysis tool for TradingView, designed to diagnose market health by moving beyond simple signals into a comprehensive, contextual framework.
- The Philosophy: Beyond Signals, Towards Diagnosis
- Key Features
- Showcase: The Indicator in Action
- The Dashboard: Deconstructing the 7 Layers of Analysis
- Professional Application: The Power of Confluence
- Target Audience & Use Case
- Installation
- Connect with the Author
- Contributing
- Legal Disclaimer
- License
In a world saturated with indicators that measure a single variable—be it momentum, trend, or volume—the Health Market Indicator introduces a paradigm shift. Its core philosophy is not to generate a signal, but to diagnose the market's overall "health" by integrating 7 distinct layers of analysis into one cohesive dashboard.
Think of it as a physician's diagnostic panel. A decision is never based on temperature alone; it requires context from heart rate, blood pressure, and lab results. This indicator provides that panoramic view, from the high-level strategic bias down to the pulse of the current candle.
It is designed to answer critical questions:
- Is the market accumulating energy for a major move?
- Is it expanding with genuine conviction?
- Or is it showing signs of exhaustion, vulnerable to a reversal?
This holistic approach liberates the trader from the noise of conflicting signals, offering a coherent narrative of what the market is doing—and what it's likely to do next.
- 7-Layer Analysis: Integrates strategic, tactical, and velocity metrics into one dashboard.
- Context-Aware: Doesn't just provide signals; it tells you the story behind the price action (e.g., Accumulation, Expansion, Reversal).
- Confluence & Divergence: Empowers traders to identify high-probability setups through layer alignment and spot warnings through divergence.
- Universal Logic: Adapts seamlessly across all markets (Forex, Crypto, Indices, etc.) and timeframes.
- Professional Grade: Built for discretionary traders who require deep, real-time market insights.
The indicator's universal logic allows it to adapt seamlessly across all markets. The /pic directory contains samples for major asset classes, demonstrating its versatility.
It is important to note that these screenshots were captured on Friday, August 15, 2025, around 20:00 UTC—a period of typically low market liquidity. This demonstrates the indicator's clarity and effectiveness even in challenging market conditions.
The dashboard is the heart of the indicator. Each row is a distinct analytical layer, designed to build a complete narrative when read together.
| # | Metric | Technical Breakdown | Practical Significance |
|---|---|---|---|
| 1 | Daily Bias | Strategic Compass: Compares price to the previous day's high (PDH), low (PDL), and equilibrium. Progresses from NO BIAS to MODERATE (post-midday) and CONFIRMED upon a breach of PDH/PDL. |
What's the strategic game plan for today? It aligns you with the dominant daily flow, preventing trades that fight the market's primary intention. |
| 2 | Market State | Contextual Narrative: Identifies the "story" of the price action, such as Accumulation (coiling), Expansion (breakout), Reversal (failed breakout), Retracement (pullback), or Ranging (oscillation). |
Why is the market moving? It qualifies price action, distinguishing a genuine Expansion from a fakeout that becomes a Reversal, providing critical context. |
| 3 | Tactical Bias | Live Pulse [Daily Health] |
[Momentum]:** Daily Health is Close vs. Daily Open. Momentum compares the prior candle's close (Close[1]) to the high/low of the candle before it (High/Low[2]). |
| 4 | Swing Stage | Intraday Story: Analyzes price action within the current day's range. Tracks if the intraday swing is Developing, Expanding to new daily extremes, or Accumulating energy around the intraday equilibrium. |
What is the current session's internal structure? Helps differentiate a major trend continuation from a minor pullback within the established daily range. |
| 5 | Swing Direction | Exhaustion & Reversal Meter: Displays the current micro-swing's direction and its completion progress as a percentage (0% = start, 100% = end). | Is this move running out of steam? A high progress reading (>85%) on a counter-trend move is a powerful exhaustion signal, often preceding a reversal or resumption of the primary trend. |
| 6 | Velocity (Recent) | Historical Power Meter: Measures the current candle's range against the SMA of the last 'n' candles (default 50). It is accompanied by the Average Range in Points for the same period. | How strong is this move compared to recent history? A Very High velocity confirms breakout conviction. Extreme velocity can signal a climatic, exhaustive top or bottom. |
| 7 | Velocity (Intraday) | Session Power Meter: Measures the current candle's range against the average of today's candles only. Also accompanied by the Average Range in Points for just the current session. | Is volatility picking up or fading now? Crucial for adapting to changing session dynamics, like the surge in volume during the London/NY overlap. |
The mastery of this indicator lies in observing the confluence (alignment) or divergence (contradiction) between its layers.
This occurs when multiple layers tell the same powerful story.
Example Scenario:
Daily Bias: BULLISH CONFIRMEDMarket State: ExpansionTactical Bias: Bullish | BullishVelocity (Recent): 180% (Very High)Translation: The strategic direction is up, the market is actively breaking out, immediate momentum is bullish, and it's all happening with immense force. This is a high-conviction long signal.
This occurs when key layers contradict each other, signaling danger or a unique opportunity.
Example Scenario:
Daily Bias: BULLISH CONFIRMEDSwing Direction: Bearish (92%)Velocity (Recent): 210% (Extreme)Translation: While the strategic bias is bullish, a sharp counter-trend move has reached extreme exhaustion (92%) with climactic force. This is not a healthy pullback; it's a potential blow-off top, signaling a reversal is imminent. This is a clear warning to be cautious with longs or even look for a tactical short.
This is not a beginner's tool for simple buy/sell signals. It is a professional-grade instrument designed for:
- Discretionary Day Traders & Scalpers: Who need a deep, real-time understanding of price action quality to make rapid, high-probability decisions.
- Systematic Swing Traders: Who can use the higher-level metrics (
Daily Bias,Market State) as a powerful filter to qualify entries and exits for their strategies.
This indicator was developed using an AI-Assisted Development approach, leveraging the Gemini Pro model as a partner in translating complex trading concepts into functional Pine Script code. My role was that of a Quantitative Designer and Product Manager, focusing on the conceptual framework and the strategic implementation of the analytical layers.
My contributions were centered on the following high-level tasks:
- Concept and Requirements Definition: Identifying the limitations of single-variable indicators and defining the requirements for a comprehensive Diagnostic Tool. The core concept was to create a multi-layered dashboard that provides a holistic view of "Market Health" rather than just isolated signals.
- Architectural Design: Structuring the indicator's Pine Script code to function as an integrated Dashboard. Each of the 7 analytical layers was designed as a distinct computational module, which was then unified into a single, cohesive visual interface.
- Prompt Engineering: Crafting highly specific prompts for the AI to translate abstract trading concepts (e.g., Daily Bias, Market State, Swing Exhaustion) into effective and optimized Pine Script logic, with a strong emphasis on creating a clear and intuitive visual presentation.
- Review, Testing, and Validation: Testing the indicator extensively across a wide range of markets and timeframes (Forex, Commodities, Crypto, Indices) to ensure the logic is universally applicable. Validation included ensuring the dashboard provided clear, actionable insights even in challenging market conditions, such as periods of low liquidity.
- Full Documentation: Creating professional, product-page-style documentation that not only explains the installation but also details the deep philosophy behind the indicator. This included deconstructing each of the 7 analytical layers and providing practical examples of how to use confluence and divergence to identify high-probability setups.
This project exemplifies how AI can be directed to build sophisticated, professional-grade analytical tools that empower discretionary traders with deep, contextual market insights.
- Open TradingView and navigate to the Pine Editor tab.
- Clear any existing code.
- Copy the entire code from the
.pinescript file in this repository. - Paste the code into your Pine Editor.
- Click "Save" and then "Add to Chart".
Connect with Eng. Alhassan Ali Mubarak Bahbah for feedback, questions, or collaboration.
Contributions are welcome! If you have ideas for improvements or bug fixes, please open an issue or submit a pull request.
Please read carefully before using this tool.
This indicator is provided as a Decision-Support Tool only. Under no circumstances should any part of this indicator or its content be construed as financial advice, an investment recommendation, or a solicitation to buy or sell any financial asset.
Your use of this indicator is a personal choice and is done at your own and absolute risk. The author and any contributors to this project expressly disclaim any and all liability for any kind of loss or damage, whether financial or otherwise, direct or indirect, that may arise as a result of:
- Reliance on the data or signals generated by the indicator.
- Misuse or misinterpretation of the indicator's output.
- Any trading or investment decision made based on this tool.
Trading in financial markets involves a substantial degree of risk and may not be suitable for all investors, as it can lead to the loss of part or all of your invested capital. Never trade with money you cannot afford to lose.
It is strongly recommended that you seek advice from a qualified and independent financial advisor before making any investment decisions. By using this indicator, you acknowledge that you have read, understood, and agree to be bound by the terms of this disclaimer in full.
This project is licensed under the MIT License. See the LICENSE file for details.





