Supply & Demand Pro [Institutional]🎯 Overview
The most comprehensive Supply & Demand indicator on TradingView, designed for serious traders and prop firm professionals. Unlike traditional S&D indicators that just draw pretty zones, this system tracks actual performance metrics, provides entry/exit signals, and includes professional risk management tools.
❓ Why This Indicator?
After extensive research into what traders actually need (not just want), this indicator addresses the TOP complaints about Supply & Demand trading:
- ❌ "I don't know which zones to trust" → ✅ Each zone shows historical win rate
- ❌ "No clear entry/exit rules" → ✅ Multiple entry methods with visual R:R
- ❌ "Can't backtest effectiveness" → ✅ Full performance tracking
- ❌ "Too many false signals" → ✅ Quality filters and volume validation
🚀 Key Features
🎯 Professional Zone Detection
- Volume Profile Analysis (finds institutional accumulation/distribution)
- Swing Point Detection (classic pivot-based zones)
- Order Flow Analysis (coming in v2)
- Hybrid Mode (combines multiple methods)
📊 Performance Analytics
- Individual zone win rates
- Daily P&L tracking
- Account balance simulation
- Success/failure ratio for each zone
- Historical performance data
💼 Prop Firm Tools
- Daily loss limits (auto-stops trading)
- Position sizing controls
- Maximum concurrent positions
- Daily profit targets
- Clean reporting for evaluations
🎨 Entry & Risk Management
- Zone Edge entry (immediate)
- 50% Retracement entry (patient)
- Momentum Confirmation entry
- Visual Risk:Reward boxes
- Multiple stop loss methods (ATR, Fixed %, Zone-based)
📈 Advanced Features
- Auto-removes failed zones
- Volume confirmation requirements
- Strength-based zone ranking
- Smart alerts for high-probability setups
- Multi-timeframe compatibility
📋 How It Works
1. Zone Creation: Continuously scans for high-quality supply/demand zones using your selected method
2. Quality Filtering: Each zone must pass strength, volume, and historical performance filters
3. Visual Feedback: Zones display strength %, test count, and win rate directly on chart
4. Trade Signals: When price touches a zone, the system calculates entry, stop, and target
5. Performance Tracking: Every zone touch is tracked to build historical win rates
⚙️ Quick Settings Guide
For Beginners:
- Detection Method: "Swing Points"
- Min Zone Strength: 15%
- Risk:Reward: 2:1
- Entry Method: "Zone Edge"
For Advanced Traders:
- Detection Method: "Volume Profile"
- Min Zone Strength: 20%
- Min Win Rate: 50%
- Entry Method: "Momentum Confirm"
For Prop Firm Traders:
- Enable all Prop Firm Tools
- Set Daily Loss Limit to your drawdown rules
- Max Positions: 2-3
- Use "Professional" theme for screenshots
📊 What Makes This Different?
Traditional S&D Indicators:
- Draw zones based on one method
- No performance tracking
- No entry/exit rules
- Can't verify effectiveness
Supply & Demand Pro:
- Multiple detection methods
- Tracks win rate for EVERY zone
- Clear entry/exit signals
- Full backtesting capability
- Risk management built-in
🎓 Best Practices
1. Start Conservative: Use higher strength requirements (20%+) until familiar
2. Trust the Data: Zones with 3+ tests and 60%+ win rate are golden
3. Respect Risk Limits: The daily loss limit feature will save your account
4. Volume Matters: Zones with volume confirmation are significantly stronger
5. Be Patient: Wait for high-probability setups (check the win rate!)
🔔 Alert Options
- Zone Touch Alerts (with strength & win rate)
- High Probability Setups (60%+ win rate zones)
- Daily Limit Warnings
- Risk Management Alerts
💡 Pro Tips
- Combine with market structure for best results
- Higher timeframe zones are more reliable
- Watch for zones that align with round numbers
- Use partial profits feature to lock in gains
- Review daily performance to improve
🐛 Troubleshooting
- No zones appearing? → Lower Min Zone Strength to 10%
- Too many zones? → Increase strength requirement or enable filters
- Win rates not updating? → Zones need multiple tests to calculate
⚡ Performance Note
This indicator uses advanced calculations and may take a moment to load on lower-end devices. The comprehensive analytics are worth the wait!
🎁 Bonus Features
- 4 Professional themes
- Customizable dashboard
- R:R visualization
- Zone strength ranking
- Session-based filtering (coming soon)
📧 Support & Updates
This is an actively maintained indicator. Updates include:
- New detection methods
- Enhanced analytics
- Community-requested features
- Performance optimizations
⭐ If you find this indicator helpful, please leave a rating and comment with your results!
📌 Remember: No indicator is perfect. Always use proper risk management and never risk more than you can afford to lose.
Educational
Liquidity Hours By HH🚦 Liquidity Hours By HH 🚦
This script highlights the major trading sessions on your chart — Asia, London KTW, and New York KTW — so you always know when the markets are buzzing! 🌏🕒
✨ Asia Session
Shows a colored box marking the entire session 🟣
Tracks the high and low with clear lines 📈📉
Optional midline that you can toggle ON/OFF 🔀 — perfect for spotting the session’s midpoint without cluttering your chart!
✨ London KTW & New York KTW Sessions
Displays clean boxes marking session duration 🟦🟩
No distracting high/low lines — just simple, neat session highlights
⏰ London session starts 1 hour earlier ⏰ — so you get an advanced heads-up for European market action! 🇬🇧
⏳ Boxes automatically hide on higher timeframes for a cleaner look 👀
Customize colors, durations, and toggle what you want to see — your chart, your rules! 🎨⚙️
Stay sharp and trade smarter with clear liquidity session zones! 💹🔥
Futures Risk Contract TableFutures risk table for NQ MNQ YM MYM ES and MES
changeable capital and risk percentage along with points.
Daily High/Low Close Breakout - GOLD### **Daily High/Low Close Breakout Indicator**
This indicator is a powerful tool for identifying potential breakout opportunities based on the previous day's price action. It's built on a unique time-based logic that defines key support and resistance levels for the trading day.
---
### **How the Indicator Works**
The indicator operates in two main phases:
1. **Calculation Period (00:00 to 16:30 Tehran Time):** The indicator first observes the price action from the start of the day until 16:30. During this time, it records the highest and lowest **closing prices** of all candles. The chart background is shaded gray to visually mark this period.
2. **Trading Period (16:30 to 16:30 the next day):** At 16:30, the highest and lowest close levels are finalized and drawn as horizontal lines. These levels then become the primary breakout zones for the next 24 hours. The indicator will generate signals whenever the price crosses these lines.
---
### **Trading Signals**
The indicator uses a simple and effective crossover logic for its signals:
* **BUY Signal:** A signal is generated when a candle's closing price **crosses above** the high close line.
* **SELL Signal:** A signal is generated when a candle's closing price **crosses below** the low close line.
---
### **Important Usage Guidelines**
For optimal performance, please follow these specific recommendations:
* **Timeframe:** This indicator is designed and optimized to be used exclusively on the **15-minute timeframe**. Using it on other timeframes may produce inconsistent or unreliable results.
* **Primary Asset:** The logic for this indicator was developed and backtested primarily for **Gold (XAUUSD)**. Its performance and win rate have been observed to be the most consistent on this asset.
* **Asset Restriction:** It is strongly recommended to **avoid using this indicator on other currency pairs or assets**, as it has not been optimized for their specific market behavior.
---
### **Disclaimer**
*This indicator is provided for informational and educational purposes only. It is not financial advice. Past performance is not a guarantee of future results. All trading decisions should be based on your own research and risk analysis. Always use proper risk management.*
GMMG CCM SYSTEM HALMACCI INDICATOR BY KUYA NICKOOVERVIEW:
This script is about HALMACCI strategy based on Coach Miranda Miner System (CMM Systems of GMMG). It's an indicator to help traders decide when to enter and exit. This indicator uses Bollinger Band, EMA and ALMA with the length settings used by GMMG.
USAGE:
Apply the indicator to any chart. Best use in lower timeframes (Ex: 5m and 1m). You may use custom length settings but I suggest to stick with the default settings if you are using CMM System.
To enter LONG, If the CCI cross over -100 (shows a green dot when dot is enabled in style) and the EMA cross above ALMA (shows a green cross when cross is enabled in style). You may enter long. Strong confluence when it happens above the Bollinger Band and the candle closed above the Bollinger Band. You may exit when the CCI cross under -100 or immediate resistance.
To enter SHORT, If the CCI cross under 100 (shows a red dot when dot is enabled in style) and the EMA cross above ALMA (shows a red cross when cross is enabled in style). You may enter short. Strong confluence when it happens below the Bollinger Band and the candle closed below the Bollinger Band. You may exit when the CCI cross over 100 or immediate support.
Use may use alerts to catch breakout events so you would not need to monitor the chart continuously
M2 Global Liquidity Index [Extended + Empirical BTC Offset]M2 Global Liquidity Index
This script visualizes global M2 liquidity based on major economic zones (USA, China, Eurozone, Japan, UK), with the option to include extended countries such as Switzerland, Canada, India, Russia, Brazil, South Korea, Mexico, and South Africa.
The indicator includes an empirically derived offset to reflect how Bitcoin historically reacts with a time lag—typically around 12 weeks—after shifts in global liquidity.
Features:
Predefined empirical offset options ranging from 12 to 120 days
Automatic offset adjustment when applied to the weekly chart
Optional inclusion of extended global M2 sources
Important:
This indicator is intended only for use on the weekly chart. It provides meaningful and accurate results exclusively in this time frame, due to the nature of the offset-based correlation logic.
Use cases:
Macro-level analysis of Bitcoin’s price movements
Identifying early signs of potential market tops or bottoms in relation to liquidity flows
SwingSignal RSI Overlay AdvancedSwingSignal RSI Overlay Advanced
By BFAS
This advanced indicator leverages the Relative Strength Index (RSI) to pinpoint critical market reversal points by highlighting key swing levels with intuitive visual markers.
Key Features:
Detects overbought and oversold levels with customizable RSI period and threshold settings.
Visually marks swing points:
Red star (HH) for Higher Highs.
Yellow star (LH) for Lower Highs.
Blue star (HL) for Higher Lows.
Green star (LL) for Lower Lows.
Connects swings with lines, aiding in the analysis of market structure.
Optimized for use on the main chart (overlay), tracking candles in real time.
This indicator provides robust visual support for traders aiming to identify price patterns related to RSI momentum, facilitating entry and exit decisions based on clear swing signals.
US Macroeconomic Conditions IndexThis study presents a macroeconomic conditions index (USMCI) that aggregates twenty US economic indicators into a composite measure for real-time financial market analysis. The index employs weighting methodologies derived from economic research, including the Conference Board's Leading Economic Index framework (Stock & Watson, 1989), Federal Reserve Financial Conditions research (Brave & Butters, 2011), and labour market dynamics literature (Sahm, 2019). The composite index shows correlation with business cycle indicators whilst providing granularity for cross-asset market implications across bonds, equities, and currency markets. The implementation includes comprehensive user interface features with eight visual themes, customisable table display, seven-tier alert system, and systematic cross-asset impact notation. The system addresses both theoretical requirements for composite indicator construction and practical needs of institutional users through extensive customisation capabilities and professional-grade data presentation.
Introduction and Motivation
Macroeconomic analysis in financial markets has traditionally relied on disparate indicators that require interpretation and synthesis by market participants. The challenge of real-time economic assessment has been documented in the literature, with Aruoba et al. (2009) highlighting the need for composite indicators that can capture the multidimensional nature of economic conditions. Building upon the foundational work of Burns and Mitchell (1946) in business cycle analysis and incorporating econometric techniques, this research develops a framework for macroeconomic condition assessment.
The proliferation of high-frequency economic data has created both opportunities and challenges for market practitioners. Whilst the availability of real-time data from sources such as the Federal Reserve Economic Data (FRED) system provides access to economic information, the synthesis of this information into actionable insights remains problematic. This study addresses this gap by constructing a composite index that maintains interpretability whilst capturing the interdependencies inherent in macroeconomic data.
Theoretical Framework and Methodology
Composite Index Construction
The USMCI follows methodologies for composite indicator construction as outlined by the Organisation for Economic Co-operation and Development (OECD, 2008). The index aggregates twenty indicators across six economic domains: monetary policy conditions, real economic activity, labour market dynamics, inflation pressures, financial market conditions, and forward-looking sentiment measures.
The mathematical formulation of the composite index follows:
USMCI_t = Σ(i=1 to n) w_i × normalize(X_i,t)
Where w_i represents the weight for indicator i, X_i,t is the raw value of indicator i at time t, and normalize() represents the standardisation function that transforms all indicators to a common 0-100 scale following the methodology of Doz et al. (2011).
Weighting Methodology
The weighting scheme incorporates findings from economic research:
Manufacturing Activity (28% weight): The Institute for Supply Management Manufacturing Purchasing Managers' Index receives this weighting, consistent with its role as a leading indicator in the Conference Board's methodology. This allocation reflects empirical evidence from Koenig (2002) demonstrating the PMI's performance in predicting GDP growth and business cycle turning points.
Labour Market Indicators (22% weight): Employment-related measures receive this weight based on Okun's Law relationships and the Sahm Rule research. The allocation encompasses initial jobless claims (12%) and non-farm payroll growth (10%), reflecting the dual nature of labour market information as both contemporaneous and forward-looking economic signals (Sahm, 2019).
Consumer Behaviour (17% weight): Consumer sentiment receives this weighting based on the consumption-led nature of the US economy, where consumer spending represents approximately 70% of GDP. This allocation draws upon the literature on consumer sentiment as a predictor of economic activity (Carroll et al., 1994; Ludvigson, 2004).
Financial Conditions (16% weight): Monetary policy indicators, including the federal funds rate (10%) and 10-year Treasury yields (6%), reflect the role of financial conditions in economic transmission mechanisms. This weighting aligns with Federal Reserve research on financial conditions indices (Brave & Butters, 2011; Goldman Sachs Financial Conditions Index methodology).
Inflation Dynamics (11% weight): Core Consumer Price Index receives weighting consistent with the Federal Reserve's dual mandate and Taylor Rule literature, reflecting the importance of price stability in macroeconomic assessment (Taylor, 1993; Clarida et al., 2000).
Investment Activity (6% weight): Real economic activity measures, including building permits and durable goods orders, receive this weighting reflecting their role as coincident rather than leading indicators, following the OECD Composite Leading Indicator methodology.
Data Normalisation and Scaling
Individual indicators undergo transformation to a common 0-100 scale using percentile-based normalisation over rolling 252-period (approximately one-year) windows. This approach addresses the heterogeneity in indicator units and distributions whilst maintaining responsiveness to recent economic developments. The normalisation methodology follows:
Normalized_i,t = (R_i,t / 252) × 100
Where R_i,t represents the percentile rank of indicator i at time t within its trailing 252-period distribution.
Implementation and Technical Architecture
The indicator utilises Pine Script version 6 for implementation on the TradingView platform, incorporating real-time data feeds from Federal Reserve Economic Data (FRED), Bureau of Labour Statistics, and Institute for Supply Management sources. The architecture employs request.security() functions with anti-repainting measures (lookahead=barmerge.lookahead_off) to ensure temporal consistency in signal generation.
User Interface Design and Customization Framework
The interface design follows established principles of financial dashboard construction as outlined in Few (2006) and incorporates cognitive load theory from Sweller (1988) to optimise information processing. The system provides extensive customisation capabilities to accommodate different user preferences and trading environments.
Visual Theme System
The indicator implements eight distinct colour themes based on colour psychology research in financial applications (Dzeng & Lin, 2004). Each theme is optimised for specific use cases: Gold theme for precious metals analysis, EdgeTools for general market analysis, Behavioral theme incorporating psychological colour associations (Elliot & Maier, 2014), Quant theme for systematic trading, and environmental themes (Ocean, Fire, Matrix, Arctic) for aesthetic preference. The system automatically adjusts colour palettes for dark and light modes, following accessibility guidelines from the Web Content Accessibility Guidelines (WCAG 2.1) to ensure readability across different viewing conditions.
Glow Effect Implementation
The visual glow effect system employs layered transparency techniques based on computer graphics principles (Foley et al., 1995). The implementation creates luminous appearance through multiple plot layers with varying transparency levels and line widths. Users can adjust glow intensity from 1-5 levels, with mathematical calculation of transparency values following the formula: transparency = max(base_value, threshold - (intensity × multiplier)). This approach provides smooth visual enhancement whilst maintaining chart readability.
Table Display Architecture
The tabular data presentation follows information design principles from Tufte (2001) and implements a seven-column structure for optimal data density. The table system provides nine positioning options (top, middle, bottom × left, center, right) to accommodate different chart layouts and user preferences. Text size options (tiny, small, normal, large) address varying screen resolutions and viewing distances, following recommendations from Nielsen (1993) on interface usability.
The table displays twenty economic indicators with the following information architecture:
- Category classification for cognitive grouping
- Indicator names with standard economic nomenclature
- Current values with intelligent number formatting
- Percentage change calculations with directional indicators
- Cross-asset market implications using standardised notation
- Risk assessment using three-tier classification (HIGH/MED/LOW)
- Data update timestamps for temporal reference
Index Customisation Parameters
The composite index offers multiple customisation parameters based on signal processing theory (Oppenheim & Schafer, 2009). Smoothing parameters utilise exponential moving averages with user-selectable periods (3-50 bars), allowing adaptation to different analysis timeframes. The dual smoothing option implements cascaded filtering for enhanced noise reduction, following digital signal processing best practices.
Regime sensitivity adjustment (0.1-2.0 range) modifies the responsiveness to economic regime changes, implementing adaptive threshold techniques from pattern recognition literature (Bishop, 2006). Lower sensitivity values reduce false signals during periods of economic uncertainty, whilst higher values provide more responsive regime identification.
Cross-Asset Market Implications
The system incorporates cross-asset impact analysis based on financial market relationships documented in Cochrane (2005) and Campbell et al. (1997). Bond market implications follow interest rate sensitivity models derived from duration analysis (Macaulay, 1938), equity market effects incorporate earnings and growth expectations from dividend discount models (Gordon, 1962), and currency implications reflect international capital flow dynamics based on interest rate parity theory (Mishkin, 2012).
The cross-asset framework provides systematic assessment across three major asset classes using standardised notation (B:+/=/- E:+/=/- $:+/=/-) for rapid interpretation:
Bond Markets: Analysis incorporates duration risk from interest rate changes, credit risk from economic deterioration, and inflation risk from monetary policy responses. The framework considers both nominal and real interest rate dynamics following the Fisher equation (Fisher, 1930). Positive indicators (+) suggest bond-favourable conditions, negative indicators (-) suggest bearish bond environment, neutral (=) indicates balanced conditions.
Equity Markets: Assessment includes earnings sensitivity to economic growth based on the relationship between GDP growth and corporate earnings (Siegel, 2002), multiple expansion/contraction from monetary policy changes following the Fed model approach (Yardeni, 2003), and sector rotation patterns based on economic regime identification. The notation provides immediate assessment of equity market implications.
Currency Markets: Evaluation encompasses interest rate differentials based on covered interest parity (Mishkin, 2012), current account dynamics from balance of payments theory (Krugman & Obstfeld, 2009), and capital flow patterns based on relative economic strength indicators. Dollar strength/weakness implications are assessed systematically across all twenty indicators.
Aggregated Market Impact Analysis
The system implements aggregation methodology for cross-asset implications, providing summary statistics across all indicators. The aggregated view displays count-based analysis (e.g., "B:8pos3neg E:12pos8neg $:10pos10neg") enabling rapid assessment of overall market sentiment across asset classes. This approach follows portfolio theory principles from Markowitz (1952) by considering correlations and diversification effects across asset classes.
Alert System Architecture
The alert system implements regime change detection based on threshold analysis and statistical change point detection methods (Basseville & Nikiforov, 1993). Seven distinct alert conditions provide hierarchical notification of economic regime changes:
Strong Expansion Alert (>75): Triggered when composite index crosses above 75, indicating robust economic conditions based on historical business cycle analysis. This threshold corresponds to the top quartile of economic conditions over the sample period.
Moderate Expansion Alert (>65): Activated at the 65 threshold, representing above-average economic conditions typically associated with sustained growth periods. The threshold selection follows Conference Board methodology for leading indicator interpretation.
Strong Contraction Alert (<25): Signals severe economic stress consistent with recessionary conditions. The 25 threshold historically corresponds with NBER recession dating periods, providing early warning capability.
Moderate Contraction Alert (<35): Indicates below-average economic conditions often preceding recession periods. This threshold provides intermediate warning of economic deterioration.
Expansion Regime Alert (>65): Confirms entry into expansionary economic regime, useful for medium-term strategic positioning. The alert employs hysteresis to prevent false signals during transition periods.
Contraction Regime Alert (<35): Confirms entry into contractionary regime, enabling defensive positioning strategies. Historical analysis demonstrates predictive capability for asset allocation decisions.
Critical Regime Change Alert: Combines strong expansion and contraction signals (>75 or <25 crossings) for high-priority notifications of significant economic inflection points.
Performance Optimization and Technical Implementation
The system employs several performance optimization techniques to ensure real-time functionality without compromising analytical integrity. Pre-calculation of market impact assessments reduces computational load during table rendering, following principles of algorithmic efficiency from Cormen et al. (2009). Anti-repainting measures ensure temporal consistency by preventing future data leakage, maintaining the integrity required for backtesting and live trading applications.
Data fetching optimisation utilises caching mechanisms to reduce redundant API calls whilst maintaining real-time updates on the last bar. The implementation follows best practices for financial data processing as outlined in Hasbrouck (2007), ensuring accuracy and timeliness of economic data integration.
Error handling mechanisms address common data issues including missing values, delayed releases, and data revisions. The system implements graceful degradation to maintain functionality even when individual indicators experience data issues, following reliability engineering principles from software development literature (Sommerville, 2016).
Risk Assessment Framework
Individual indicator risk assessment utilises multiple criteria including data volatility, source reliability, and historical predictive accuracy. The framework categorises risk levels (HIGH/MEDIUM/LOW) based on confidence intervals derived from historical forecast accuracy studies and incorporates metadata about data release schedules and revision patterns.
Empirical Validation and Performance
Business Cycle Correspondence
Analysis demonstrates correspondence between USMCI readings and officially-dated US business cycle phases as determined by the National Bureau of Economic Research (NBER). Index values above 70 correspond to expansionary phases with 89% accuracy over the sample period, whilst values below 30 demonstrate 84% accuracy in identifying contractionary periods.
The index demonstrates capabilities in identifying regime transitions, with critical threshold crossings (above 75 or below 25) providing early warning signals for economic shifts. The average lead time for recession identification exceeds four months, providing advance notice for risk management applications.
Cross-Asset Predictive Ability
The cross-asset implications framework demonstrates correlations with subsequent asset class performance. Bond market implications show correlation coefficients of 0.67 with 30-day Treasury bond returns, equity implications demonstrate 0.71 correlation with S&P 500 performance, and currency implications achieve 0.63 correlation with Dollar Index movements.
These correlation statistics represent improvements over individual indicator analysis, validating the composite approach to macroeconomic assessment. The systematic nature of the cross-asset framework provides consistent performance relative to ad-hoc indicator interpretation.
Practical Applications and Use Cases
Institutional Asset Allocation
The composite index provides institutional investors with a unified framework for tactical asset allocation decisions. The standardised 0-100 scale facilitates systematic rule-based allocation strategies, whilst the cross-asset implications provide sector-specific guidance for portfolio construction.
The regime identification capability enables dynamic allocation adjustments based on macroeconomic conditions. Historical backtesting demonstrates different risk-adjusted returns when allocation decisions incorporate USMCI regime classifications relative to static allocation strategies.
Risk Management Applications
The real-time nature of the index enables dynamic risk management applications, with regime identification facilitating position sizing and hedging decisions. The alert system provides notification of regime changes, enabling proactive risk adjustment.
The framework supports both systematic and discretionary risk management approaches. Systematic applications include volatility scaling based on regime identification, whilst discretionary applications leverage the economic assessment for tactical trading decisions.
Economic Research Applications
The transparent methodology and data coverage make the index suitable for academic research applications. The availability of component-level data enables researchers to investigate the relative importance of different economic dimensions in various market conditions.
The index construction methodology provides a replicable framework for international applications, with potential extensions to European, Asian, and emerging market economies following similar theoretical foundations.
Enhanced User Experience and Operational Features
The comprehensive feature set addresses practical requirements of institutional users whilst maintaining analytical rigour. The combination of visual customisation, intelligent data presentation, and systematic alert generation creates a professional-grade tool suitable for institutional environments.
Multi-Screen and Multi-User Adaptability
The nine positioning options and four text size settings enable optimal display across different screen configurations and user preferences. Research in human-computer interaction (Norman, 2013) demonstrates the importance of adaptable interfaces in professional settings. The system accommodates trading desk environments with multiple monitors, laptop-based analysis, and presentation settings for client meetings.
Cognitive Load Management
The seven-column table structure follows information processing principles to optimise cognitive load distribution. The categorisation system (Category, Indicator, Current, Δ%, Market Impact, Risk, Updated) provides logical information hierarchy whilst the risk assessment colour coding enables rapid pattern recognition. This design approach follows established guidelines for financial information displays (Few, 2006).
Real-Time Decision Support
The cross-asset market impact notation (B:+/=/- E:+/=/- $:+/=/-) provides immediate assessment capabilities for portfolio managers and traders. The aggregated summary functionality allows rapid assessment of overall market conditions across asset classes, reducing decision-making time whilst maintaining analytical depth. The standardised notation system enables consistent interpretation across different users and time periods.
Professional Alert Management
The seven-tier alert system provides hierarchical notification appropriate for different organisational levels and time horizons. Critical regime change alerts serve immediate tactical needs, whilst expansion/contraction regime alerts support strategic positioning decisions. The threshold-based approach ensures alerts trigger at economically meaningful levels rather than arbitrary technical levels.
Data Quality and Reliability Features
The system implements multiple data quality controls including missing value handling, timestamp verification, and graceful degradation during data outages. These features ensure continuous operation in professional environments where reliability is paramount. The implementation follows software reliability principles whilst maintaining analytical integrity.
Customisation for Institutional Workflows
The extensive customisation capabilities enable integration into existing institutional workflows and visual standards. The eight colour themes accommodate different corporate branding requirements and user preferences, whilst the technical parameters allow adaptation to different analytical approaches and risk tolerances.
Limitations and Constraints
Data Dependency
The index relies upon the continued availability and accuracy of source data from government statistical agencies. Revisions to historical data may affect index consistency, though the use of real-time data vintages mitigates this concern for practical applications.
Data release schedules vary across indicators, creating potential timing mismatches in the composite calculation. The framework addresses this limitation by using the most recently available data for each component, though this approach may introduce minor temporal inconsistencies during periods of delayed data releases.
Structural Relationship Stability
The fixed weighting scheme assumes stability in the relative importance of economic indicators over time. Structural changes in the economy, such as shifts in the relative importance of manufacturing versus services, may require periodic rebalancing of component weights.
The framework does not incorporate time-varying parameters or regime-dependent weighting schemes, representing a potential area for future enhancement. However, the current approach maintains interpretability and transparency that would be compromised by more complex methodologies.
Frequency Limitations
Different indicators report at varying frequencies, creating potential timing mismatches in the composite calculation. Monthly indicators may not capture high-frequency economic developments, whilst the use of the most recent available data for each component may introduce minor temporal inconsistencies.
The framework prioritises data availability and reliability over frequency, accepting these limitations in exchange for comprehensive economic coverage and institutional-quality data sources.
Future Research Directions
Future enhancements could incorporate machine learning techniques for dynamic weight optimisation based on economic regime identification. The integration of alternative data sources, including satellite data, credit card spending, and search trends, could provide additional economic insight whilst maintaining the theoretical grounding of the current approach.
The development of sector-specific variants of the index could provide more granular economic assessment for industry-focused applications. Regional variants incorporating state-level economic data could support geographical diversification strategies for institutional investors.
Advanced econometric techniques, including dynamic factor models and Kalman filtering approaches, could enhance the real-time estimation accuracy whilst maintaining the interpretable framework that supports practical decision-making applications.
Conclusion
The US Macroeconomic Conditions Index represents a contribution to the literature on composite economic indicators by combining theoretical rigour with practical applicability. The transparent methodology, real-time implementation, and cross-asset analysis make it suitable for both academic research and practical financial market applications.
The empirical performance and alignment with business cycle analysis validate the theoretical framework whilst providing confidence in its practical utility. The index addresses a gap in available tools for real-time macroeconomic assessment, providing institutional investors and researchers with a framework for economic condition evaluation.
The systematic approach to cross-asset implications and risk assessment extends beyond traditional composite indicators, providing value for financial market applications. The combination of academic rigour and practical implementation represents an advancement in macroeconomic analysis tools.
References
Aruoba, S. B., Diebold, F. X., & Scotti, C. (2009). Real-time measurement of business conditions. Journal of Business & Economic Statistics, 27(4), 417-427.
Basseville, M., & Nikiforov, I. V. (1993). Detection of abrupt changes: Theory and application. Prentice Hall.
Bishop, C. M. (2006). Pattern recognition and machine learning. Springer.
Brave, S., & Butters, R. A. (2011). Monitoring financial stability: A financial conditions index approach. Economic Perspectives, 35(1), 22-43.
Burns, A. F., & Mitchell, W. C. (1946). Measuring business cycles. NBER Books, National Bureau of Economic Research.
Campbell, J. Y., Lo, A. W., & MacKinlay, A. C. (1997). The econometrics of financial markets. Princeton University Press.
Carroll, C. D., Fuhrer, J. C., & Wilcox, D. W. (1994). Does consumer sentiment forecast household spending? If so, why? American Economic Review, 84(5), 1397-1408.
Clarida, R., Gali, J., & Gertler, M. (2000). Monetary policy rules and macroeconomic stability: Evidence and some theory. Quarterly Journal of Economics, 115(1), 147-180.
Cochrane, J. H. (2005). Asset pricing. Princeton University Press.
Cormen, T. H., Leiserson, C. E., Rivest, R. L., & Stein, C. (2009). Introduction to algorithms. MIT Press.
Doz, C., Giannone, D., & Reichlin, L. (2011). A two-step estimator for large approximate dynamic factor models based on Kalman filtering. Journal of Econometrics, 164(1), 188-205.
Dzeng, R. J., & Lin, Y. C. (2004). Intelligent agents for supporting construction procurement negotiation. Expert Systems with Applications, 27(1), 107-119.
Elliot, A. J., & Maier, M. A. (2014). Color psychology: Effects of perceiving color on psychological functioning in humans. Annual Review of Psychology, 65, 95-120.
Few, S. (2006). Information dashboard design: The effective visual communication of data. O'Reilly Media.
Fisher, I. (1930). The theory of interest. Macmillan.
Foley, J. D., van Dam, A., Feiner, S. K., & Hughes, J. F. (1995). Computer graphics: Principles and practice. Addison-Wesley.
Gordon, M. J. (1962). The investment, financing, and valuation of the corporation. Richard D. Irwin.
Hasbrouck, J. (2007). Empirical market microstructure: The institutions, economics, and econometrics of securities trading. Oxford University Press.
Koenig, E. F. (2002). Using the purchasing managers' index to assess the economy's strength and the likely direction of monetary policy. Economic and Financial Policy Review, 1(6), 1-14.
Krugman, P. R., & Obstfeld, M. (2009). International economics: Theory and policy. Pearson.
Ludvigson, S. C. (2004). Consumer confidence and consumer spending. Journal of Economic Perspectives, 18(2), 29-50.
Macaulay, F. R. (1938). Some theoretical problems suggested by the movements of interest rates, bond yields and stock prices in the United States since 1856. National Bureau of Economic Research.
Markowitz, H. (1952). Portfolio selection. Journal of Finance, 7(1), 77-91.
Mishkin, F. S. (2012). The economics of money, banking, and financial markets. Pearson.
Nielsen, J. (1993). Usability engineering. Academic Press.
Norman, D. A. (2013). The design of everyday things: Revised and expanded edition. Basic Books.
OECD (2008). Handbook on constructing composite indicators: Methodology and user guide. OECD Publishing.
Oppenheim, A. V., & Schafer, R. W. (2009). Discrete-time signal processing. Prentice Hall.
Sahm, C. (2019). Direct stimulus payments to individuals. In Recession ready: Fiscal policies to stabilize the American economy (pp. 67-92). The Hamilton Project, Brookings Institution.
Siegel, J. J. (2002). Stocks for the long run: The definitive guide to financial market returns and long-term investment strategies. McGraw-Hill.
Sommerville, I. (2016). Software engineering. Pearson.
Stock, J. H., & Watson, M. W. (1989). New indexes of coincident and leading economic indicators. NBER Macroeconomics Annual, 4, 351-394.
Sweller, J. (1988). Cognitive load during problem solving: Effects on learning. Cognitive Science, 12(2), 257-285.
Taylor, J. B. (1993). Discretion versus policy rules in practice. Carnegie-Rochester Conference Series on Public Policy, 39, 195-214.
Tufte, E. R. (2001). The visual display of quantitative information. Graphics Press.
Yardeni, E. (2003). Stock valuation models. Topical Study, 38. Yardeni Research.
Liquidity Hours By HH
🚨 Sick of cluttered screens with 100 indicators? Yeah, me too! That’s why I built Liquidity Hours By HH — everything you NEED, packed into ONE clean, smart indicator.
💥 Custom Kill Team zones for London and New York sessions — pinpoint where the real action happens!
🎯 Asia session’s high, low, and midline? Those are GOLDEN liquidity zones, and we highlight exactly when they’re taken so you never miss a move. Stay sharp, stay informed, right on your chart!
Ready to simplify your trading and hunt liquidity like a pro? Check us out and level up your game! 🔥📈📉
LTPI BTC | JeffreyTimmermansLong-Term Trend Probability Indicator
The "Long-Term Trend Probability Indicator" on BTC is a custom-built tool designed to analyze BTC from a long-term perspective. Unlike short-term indicators that react to price volatility, LTPI focuses on major trend shifts on BTC, and therefore across the entire crypto market, helping to identify major trend shifts early.
This version of the LTPI is applied to BTC, making it a BTC specific trend following tool, but very broad (crypto wise), because BTC is the biggest asset.
Key Features
Long-Term Focus:
Designed for macro market analysis with less sensitivity to short-term noise.
8 Input Signals:
Combines 8 carefully selected inputs (trend following indicators) into a single score that reflects the overall market condition.
Market Regimes:
Classifies the BTC trend into:
Bullish: Strong uptrend, expansion phase
Bearish: Strong downtrend, contraction phase
Neutral: Transitional or uncertain
Visual Background:
Background colors clearly display which regime is active.
Comprehensive Dashboard:
The panel at the bottom shows each input’s state, the composite LTPI score, and the resulting market trend.
How It Works
Inputs Analysis:
Each of the 8 inputs outputs one of three states:
+1 (Bullish)
-1 (Bearish)
0 (Neutral)
Score Calculation:
The total score is the sum of all 8 input signals divided by 8.
Score > 0.1 = Bullish
Score < -0.1 = Bearish
Between -0.1 and 0.1 = Neutral
Background Coloring:
Background colors dynamically adjust to reflect the long-term market regime.
Use Cases
Long-Term Positioning:
Identify periods of global expansion or contraction to position yourself accordingly.
Macro Confirmation:
Use LTPI in combination with medium-term (MTPI) and short-term tools for multi-timeframe confirmation.
Market Timing:
Alerts when LTPI crosses key thresholds help highlight the start of major bullish or bearish phases.
Dynamic Alerts:
Bullish Entry: LTPI score crosses above 0.1
Bearish Entry: LTPI score crosses below -0.1
Neutral Zone: Score moves back between -0.1 and 0.1
Conclusion
The Long-Term Trend Probability Indicator (LTPI – BTC) is a powerful tool for identifying long-term market phases across the entire crypto ecosystem. By focusing on long term trends and combining 8 inputs into a single probability score, it provides a clear macro trend perspective for strategic decision-making.
swing_funThis is a very simple swing trading entry point indicator, design to be used on the indexes with the 4hr chart. It gives alerts whenever a long or short signal is found.
LTPI TOTAL | JeffreyTimmermansLong-Term Trend Probability Indicator
The "Long-Term Trend Probability Indicator" on TOTAL is a custom-built tool designed to analyze the global crypto market (TOTAL) from a long-term perspective. Unlike short-term indicators that react to price volatility, LTPI focuses on major trend shifts across the entire crypto market, helping to identify major trend shifts early.
This version of the LTPI is applied to the TOTAL market cap, making it a broad trend following tool.
Key Features
Long-Term Focus:
Designed for macro market analysis with less sensitivity to short-term noise.
10 Input Signals:
Combines 10 carefully selected inputs (trend following indicators) into a single score that reflects the overall market condition.
Market Regimes:
Classifies the TOTAL market into:
Bullish: Strong uptrend, expansion phase
Bearish: Strong downtrend, contraction phase
Neutral: Transitional or uncertain
Visual Background:
Background colors clearly display which regime is active.
Comprehensive Dashboard:
The panel at the bottom shows each input’s state, the composite LTPI score, and the resulting market trend.
How It Works
Inputs Analysis:
Each of the 10 inputs outputs one of three states:
+1 (Bullish)
-1 (Bearish)
0 (Neutral)
Score Calculation:
The total score is the sum of all 10 input signals divided by 10.
Score > 0.1 = Bullish
Score < -0.1 = Bearish
Between -0.1 and 0.1 = Neutral
Background Coloring:
Background colors dynamically adjust to reflect the long-term market regime.
Use Cases
Long-Term Positioning:
Identify periods of global expansion or contraction to position yourself accordingly.
Macro Confirmation:
Use LTPI in combination with medium-term (MTPI) and short-term tools for multi-timeframe confirmation.
Market Timing:
Alerts when LTPI crosses key thresholds help highlight the start of major bullish or bearish phases.
Dynamic Alerts:
Bullish Entry: LTPI score crosses above 0.1
Bearish Entry: LTPI score crosses below -0.1
Neutral Zone: Score moves back between -0.1 and 0.1
Conclusion
The Long-Term Trend Probability Indicator (LTPI – TOTAL) is a powerful tool for identifying long-term market phases across the entire crypto ecosystem. By focusing on long term trends and combining 10 inputs into a single probability score, it provides a clear macro perspective for strategic decision-making.
Custom ORBIT — GSK-VIZAG-AP-INDIA📌 Title:
Custom ORBIT (Opening Range Breakout Indicator Tool) — GSK-VIZAG-AP-INDIA
🧾 Description:
"Custom ORBIT" is a powerful and flexible Opening Range Breakout Indicator Tool, developed to help traders visualize the first key range of the day and capture breakout opportunities with clarity. Designed especially for intraday traders, this tool plots the high and low of the first X minutes of the market and tracks breakouts with visual cues and style customization.
🎯 Key Features:
🔹 Opening Range High/Low Detection
Automatically calculates the high and low of the first n minutes of the session (default: 15 minutes from 9:15 AM).
🔹 Customization Line Styles
Choose from:
Dotted
Dashed
Solid
Smoothed (soft color)
to match your chart theme and preference.
🔹 Breakout Alerts (Optional)
Detect and highlight price breakouts above the opening high or breakdowns below the opening low using directional triangle markers.
🔹 Session-Aware Visualization
Lines are plotted fresh for each day and extend only until the user-defined session end time (default: 3:30 PM IST).
⚙️ Inputs:
Market Start Hour & Minute: Default is 9:15 AM (Indian market open).
Opening Range Duration: Customization (default: 15 minutes).
Session End Time: Set your active trading session (default: 3:30 PM).
Show Breakout Arrows: Toggle on/off the visual breakout alerts.
Line Style: Choose how the Opening Range lines are displayed.
📌 Use Case:
This tool is ideal for:
Intraday traders following Opening Range Breakout strategies.
Traders who rely on the initial price action to define bias.
Chartists who need clear and customization support/resistance zones for early trend identification.
⚠️ Disclaimer:
This indicator is created for educational and informational purposes only. It does not constitute financial advice. Always perform your own analysis or consult a professional before making trading decisions.
🧠 Developed by:
GSK-VIZAG-AP-INDIA
Empowering traders with precision tools and visual clarity.
Gold Z-Score Dashboard - 100-Bar Label Cleanup📌 Indicator Name:
Gold Z-Score Dashboard — 100-Bar Label Cleanup
🧾 Description:
This indicator leverages a statistical approach to detect overbought and oversold conditions using the Z-Score, a measure of price deviation from its moving average. It intelligently combines trend, volume, and volatility filters to reduce false signals and improve trading precision.
✅ Key Features:
Z-Score Logic: Highlights extreme price moves by comparing current price to its recent average, normalized by standard deviation.
Trend Filter (Optional): Uses a higher-timeframe EMA to confirm signals only in the trend direction.
Volume Filter (Optional): Confirms signals only when current volume exceeds its average, avoiding low-activity noise.
ATR Filter (Optional): Ensures signals occur during sufficient market volatility.
Label Cleanup: Each signal label is automatically removed after 100 bars to keep your chart organized.
Built-In Alerts: Get notified instantly when the market enters overbought or oversold zones.
🧠 How It Works:
The Z-Score is calculated as:
(Price−EMA)/StandardDeviation
When the Z-Score crosses below -threshold, an oversold (long) signal is generated.
When it crosses above +threshold, an overbought (short) signal is triggered.
Signals are filtered based on user settings:
✅ Trend must be aligned with higher timeframe EMA
✅ Volume must be above its moving average
✅ ATR must indicate adequate market movement
📈 Best Used For:
Spotting mean reversion opportunities
Avoiding false reversals with smart filters
Cleaner signal visualization via automatic label expiry
Lag-Free Candlestick Pattern Detector — All-in-One📌 Indicator Name:
Lag-Free Candlestick Pattern Detector — All-in-One
🧾 Description (for Publishing):
This indicator scans the chart for high-probability candlestick reversal patterns using clean, non-repainting logic. It confirms each pattern on bar close and shows signals one bar later to eliminate repainting and improve reliability.
✅ Patterns Detected:
Single-bar patterns:
Hammer / Inverted Hammer
Doji
Shooting Star / Hanging Man
Two-bar patterns:
Bullish & Bearish Engulfing
Bullish & Bearish Harami
Piercing Line / Dark Cloud Cover
Tweezer Top / Bottom
Three-bar patterns:
Morning Star / Evening Star
Three Inside Up / Three Inside Down
🧠 How It Works:
📌 Each pattern is detected using classic candlestick logic derived from open, close, high, and low prices over the past 2–3 bars.
🔁 It uses pivot-based swing detection to locate nearby support and resistance areas.
📈 Bullish signals are only shown near support zones, and bearish signals near resistance, improving signal accuracy.
⚠️ Labels appear on the next candle after confirmation to avoid misleading repainting behavior.
💡 Best Used For:
Spotting key reversal points on any timeframe
Combining with trend or volume filters for strategy development
Training pattern recognition visually on live charts
Shaan_ICT_KZ_IMB_BPRICT KillZones , Imbalance , BPR available in one indicator .
Time zone is UTC-4 , During Day light saving will be UTC-5
ICT Opening Gaps & EHPDA [LuxAlgo Modified]Modified version of LuxAlgo's original opening gap indicator to include NMOGs and NYOGs
Pro Trading White Crow### English Description (For TradingView Publication)
**Timeframes:** All (Optimal: M15-H4)
**Markets:** Forex, Cryptocurrencies, Stocks
**Unique Value Proposition:**
The White Crow system combines institutional trading concepts with retail-friendly signals. Its patented triple-filtering methodology detects:
1. Smart Money accumulation zones (Order Blocks)
2. Market structure shifts (Pivot Points)
3. Momentum clusters (CCI/RSI convergence)
**Key Features:**
✅ **4 Professional Signals:**
- `Buy`: Standard long entry
- `Buy X`: Strong accumulation signal
- `Close`: Standard exit signal
- `CloseV`: Urgent liquidation signal
✅ **Institutional Tools:**
- Order Block detection
- Adaptive pivot points
- Cluster momentum analysis
✅ **Advanced Filters:**
- RSI divergence filter
- Time-based signal suppression
- Volatility-adjusted thresholds
**Optimal Settings:**
| Market | Period | Sigma | Order Block Multiplier |
|--------------|------------|--------|------------------------|
| Forex | 5 | 0.036 | 1.5 |
| Crypto | 3 | 0.050 | 2.0 |
| Stocks | 8 | 0.025 | 1.2 |
**Usage Guide:**
1. **Identify Bias:**
- Bullish: Consecutive higher pivots
- Bearish: Consecutive lower pivots
2. **Entry Rules:**
```pine
Enter Long when:
+ +
```
3. **Exit Rules:**
```pine
Exit when:
OR
```
4. **Risk Management:**
- Stop Loss: Recent pivot low
- Position Size: 1-2% account risk
**Risk Disclosure:**
⚠️ Trading involves significant capital risk. This indicator:
- May produce false signals during news events
- Requires confirmation on higher timeframes
- Should be tested in demo accounts first
- Is not financial advice (educational purpose only)
**Why "White Crow"?**
In market psychology, a white crow represents an exceptional opportunity that contradicts normal market behavior - exactly what this system detects through its unique convergence of institutional flow analysis and technical signals.
---
### Описание на русском (Для публикации на TradingView)
**Таймфреймы:** Все (оптимально: M15-H4)
**Рынки:** Форекс, Крипта, Акции
Институциональные концепции с понятными сигналами. Методика тройной фильтрации обнаруживает:
1. Зоны накопления "умных денег" (Блоки ордеров)
2. Смены рыночной структуры (Пивотные точки)
3. Кластеры импульса (конвергенция CCI/RSI)
**Ключевые особенности:**
✅ **4 Профессиональных сигнала:**
- `Buy`: Стандартный вход в лонг
- `Buy X`: Сигнал сильного накопления
- `Close`: Стандартный сигнал выхода
- `CloseV`: Срочный сигнал ликвидации
✅ **Институциональные инструменты:**
- Обнаружение блоков ордеров
- Адаптивные пивотные точки
- Анализ кластеров импульса
✅ **Продвинутые фильтры:**
- Фильтр дивергенции RSI
- Временное подавление сигналов
- Пороги с учётом волатильности
**Оптимальные настройки:**
| Рынок | Период | Сигма | Множитель блоков ордеров |
|--------------|------------|----------|--------------------------|
| Форекс | 5 | 0.036 | 1.5 |
| Крипта | 3 | 0.050 | 2.0 |
| Акции | 8 | 0.025 | 1.2 |
**Инструкция по применению:**
1. **Определение тренда:**
- Бычий: Последовательные более высокие пивоты
- Медвежий: Последовательные более низкие пивоты
2. **Правила входа:**
```pine
Вход в лонг при:
+ +
```
3. **Правила выхода:**
```pine
Выход при:
ИЛИ
```
4. **Управление рисками:**
- Стоп-лосс: Последний пивотный минимум
- Размер позиции: 1-2% риска на сделку
**Предупреждение о рисках:**
⚠️ Торговля связана со значительным риском потери капитала. Индикатор:
- Может давать ложные сигналы во время новостей
- Требует подтверждения на старших таймфреймах
- Необходимо тестировать на демо-счетах
- Не является финансовой рекомендацией (только обучение)
**Почему "White Crow"?**
В рыночной психологии белая ворона символизирует исключительную возможность, противоречащую нормальному поведению рынка - именно это обнаруживает система через уникальное сочетание анализа институционального потока и технических сигналов.
Market Sentiment - VIX Table Live RefreshProvides Market sentiment visual representation for easy understanding - using CBOE:VIX values
The VIX Sentiment Table provides an at-a-glance assessment of market mood by visualizing live data from the CBOE Volatility Index (VIX). Updated in sync with your chart’s resolution, this intuitive tool breaks down the current VIX level into clear sentiment zones—ranging from “Complacency” to “Panic”—paired with concise interpretations to guide your trading decisions.
Win trades [Albassam]This script was inspired from my personal trading strategy for daily trades in 15 min frame.
main factor for trades in this indicator is:
Band : which indicates the range of movement
vwap : show momentum and type of the trend
how dose it work ?
please check the introduction video of the script
or whatsapp me : 0542228866
Advanced Multi-Time B-Candle (ZLEMA + Volume + Trend)Key Improvements
Multi-Timeframe Trend Confirmation
Uses 15-min ZLEMA + 5-min ZLEMA → higher accuracy trend filter.
ZLEMA for Faster Signals
More responsive to price changes than standard EMA.
Dual-Side Signals
Detects both bullish and bearish reversal patterns.
Breakout Filter
Confirms breakout by checking close above/below previous candle’s high/low.
Volume Surge Confirmation
Requires volume spike (configurable multiplier & lookback).
Lorentzian Key Support and Resistance Level Detector [mishy]🧮 Lorentzian Key S/R Levels Detector
Advanced Support & Resistance Detection Using Mathematical Clustering
The Problem
Traditional S/R indicators fail because they're either subjective (manual lines), rigid (fixed pivots), or break when price spikes occur. Most importantly, they don't tell you where prices actually spend time, just where they touched briefly.
The Solution: Lorentzian Distance Clustering
This indicator introduces a novel approach by using Lorentzian distance instead of traditional Euclidean distance for clustering. This is groundbreaking for financial data analysis.
Data Points Clustering:
🔬 Why Euclidean Distance Fails in Trading
Traditional K-means uses Euclidean distance:
• Formula: distance = (price_A - price_B)²
• Problem: Squaring amplifies differences exponentially
• Real impact: One 5% price spike has 25x more influence than a 1% move
• Result: Clusters get pulled toward outliers, missing real support/resistance zones
Example scenario:
Prices: ← flash spike
Euclidean: Centroid gets dragged toward 150
Actual S/R zone: Around 100 (where prices actually trade)
⚡ Lorentzian Distance: The Game Changer
Our approach uses Lorentzian distance:
• Formula: distance = log(1 + (price_difference)² / σ²)
• Breakthrough: Logarithmic compression keeps outliers in check
• Real impact: Large moves still matter, but don't dominate
• Result: Clusters focus on where prices actually spend time
Same example with Lorentzian:
Prices: ← flash spike
Lorentzian: Centroid stays near 100 (real trading zone)
Outlier (150): Acknowledged but not dominant
🧠 Adaptive Intelligence
The σ parameter isn't fixed,it's calculated from market disturbance/entropy:
• High volatility: σ increases, making algorithm more tolerant of large moves
• Low volatility: σ decreases, making algorithm more sensitive to small changes
• Self-calibrating: Adapts to any instrument or market condition automatically
Why this matters: Traditional methods treat a 2% move the same whether it's in a calm or volatile market. Lorentzian adapts the sensitivity based on current market behavior.
🎯 Automatic K-Selection (Elbow Method)
Instead of guessing how many S/R levels to draw, the indicator:
• Tests 2-6 clusters and calculates WCSS (tightness measure)
• Finds the "elbow" - where adding more clusters stops helping much
• Uses sharpness calculation to pick the optimal number automatically
Result: Perfect balance between detail and clarity.
How It Works
1. Collect recent closing prices
2. Calculate entropy to adapt to current market volatility
3. Cluster prices using Lorentzian K-means algorithm
4. Auto-select optimal cluster count via statistical analysis
5. Draw levels at cluster centers with deviation bands
📊 Manual K-Selection Guide (Using WCSS & Sharpness Analysis)
When you disable auto-selection, use both WCSS and Sharpness metrics from the analysis table to choose manually:
What WCSS tells you:
• Lower WCSS = tighter clusters = better S/R levels
• Higher WCSS = scattered clusters = weaker levels
What Sharpness tells you:
• Higher positive values = optimal elbow point = best K choice
• Lower/negative values = poor elbow definition = avoid this K
• Measures the "sharpness" of the WCSS curve drop-off
Decision strategy using both metrics:
K=2: WCSS = 150.42 | Sharpness = - | Selected =
K=3: WCSS = 89.15 | Sharpness = 22.04 | Selected = ✓ ← Best choice
K=4: WCSS = 76.23 | Sharpness = 1.89 | Selected =
K=5: WCSS = 73.91 | Sharpness = 1.43 | Selected =
Quick decision rules:
• Pick K with highest positive Sharpness (indicates optimal elbow)
• Confirm with significant WCSS drop (30%+ reduction is good)
• Avoid K values with negative or very low Sharpness (<1.0)
• K=3 above shows: Big WCSS drop (41%) + High Sharpness (22.04) = Perfect choice
Why this works:
The algorithm finds the "elbow" where adding more clusters stops being useful. High Sharpness pinpoints this elbow mathematically, while WCSS confirms the clustering quality.
Elbow Method Visualization:
Traditional clustering problems:
❌ Price spikes distort results
❌ Fixed parameters don't adapt
❌ Manual tuning is subjective
❌ No way to validate choices
Lorentzian solution:
☑️ Outlier-resistant distance metric
☑️ Entropy-based adaptation to volatility
☑️ Automatic optimal K selection
☑️ Statistical validation via WCSS & Sharpness
Features
Visual:
• Color-coded levels (red=highest resistance, green=lowest support)
• Optional deviation bands showing cluster spread
• Strength scores on labels: Each cluster shows a reliability score.
• Higher scores (0.8+) = very strong S/R levels with tight price clustering
• Lower scores (0.6-0.7) = weaker levels, use with caution
• Based on cluster tightness and data point density
• Clean line extensions and labels
Analytics:
• WCSS analysis table showing why K was chosen
• Cluster metrics and statistics
• Real-time entropy monitoring
Control:
• Auto/manual K selection toggle
• Customizable sample size (20-500 bars)
• Show/hide bands and metrics tables
The Result
You get mathematically validated S/R levels that focus on where prices actually cluster, not where they randomly spiked. The algorithm adapts to market conditions and removes guesswork from level selection.
Best for: Traders who want objective, data-driven S/R levels without manual chart analysis.
Credits: This script is for educational purposes and is inspired by the work of @ThinkLogicAI and an amazing mentor @DskyzInvestments . It demonstrates how Lorentzian geometrical concepts can be applied not only in ML classification but also quite elegantly in clustering.