Auto Timeframe Period Separators v3
This script automatically plots vertical separator lines for multiple key timeframes — including 5-minute, 15-minute, 1-hour, 4-hour, daily, and weekly — to help you visually identify period boundaries on your charts.
Features:
Customizable enable/disable options for each timeframe separator
Adjustable line color, style (solid, dashed, dotted), and width per timeframe
Dynamic plotting based on the current chart timeframe to reduce clutter
Visibility controls allowing you to define the minimum and maximum chart timeframes where each separator is displayed
Use Cases:
Easily distinguish trading sessions, days, and weeks for better chart analysis
Quickly identify time period breaks across multiple scales
Enhance chart readability without manual adjustments
How to Use:
Enable or disable any timeframe separator according to your preference
Customize colors and styles to suit your chart theme
Adjust visibility ranges to control when separators appear, depending on your current chart timeframe
Analisi fondamentale
NightWatch 24/5 [theUltimator5]NightWatch 24/5 is a comprehensive indicator designed to seamlessly display both regular and overnight trading (BOATS exchange) into a single chart. Current TV limitations don't allow both overnight trading and regular exchanges to appear on the same chart due to timeframe visibility settings. We can either select between RTH (Regular Trading Hours) or ETH (Extended Trading Hours). There is no option to show 24 hour charts when looking at a stock. This indicator attempts to solve this issue.
Please read the entire description thoroughly because this indicator takes a little bit of setup to work properly!
---IMPORTANT-- -
This indicator MUST be used over a liquid cryptocurrency chart, like Bitcoin. It requires access to something that trades 24/7 and has volume data for all periods. Bitcoin on Coinbase is the best option. Please select Bitcoin as your main ticker before adding this indicator to the chart.
-------------------
This indicator combines the price of both the regular trading hours and the overnight trading to create a single price line and volume candles. You can select view settings to either overlay the price on the chart, or have it below the chart. Volume can be toggled on or off as well.
Default settings:
Ticker = GME
Overlay Candles on Main Chart = true
Display Data = Both Price and Volume
Show Status Table = true
Here is an explanation for each of these settings:
Ticker - Type in the ticker you want to track overnight and intraday data for
Overlay Candles on Main chart - This will push the price candles onto the main chart area instead of below it. Volume candles will remain in their own separate pane below. This is useful if you want to track both price and volume without adding the indicator twice.
Display Data - This determines what data to show. Volume, price, or both volume and price.
Show Status Table - This toggles on or off the table that shows the ticker name, current session, and the price (change) of the ticker since the most recent daily close.
If you overlay the price onto the chart, the price of the stock you are looking at will likely be a VERY different price than the crypto it is overlaying against. There are a couple workarounds. You can either zoom into the chart around the price of the stock you are looking at (time consuming), or you can go into your object tree and drag the indicator up into the main chart area. This will overlay the price onto the crypto while maintaining it's own unique y-axis.
After you move the indicator up, you can add the indicator back a second time, then change the settings to only show the volume candles. You can then toggle off the table on one of the two so you don't see duplicate tables. This is the setting I am showing in my chart above. The indicator is added twice with the price being pulled up into the same window as Bitcoin, then a second instance below showing just volume.
--LIMITATIONS--
Since the indicator requires the use of a 24 hour market ticker like Bitcoin, it DOES NOT display extended hours data. The price and volume data STOPS at 16:00 EST then resumes back up at 20:00 EST when BOATS opens. At 04:00, the price and volume then stops until 09:30, when the regular trading hours begin. This causes a flat line in the price during those periods. Unfortunately, there is no current workaround to this issue.
If Bitcoin becomes illiquid (or whatever crypto you choose), it will only populate data for the ticker you want if there is data available for that crypto at the same time period. A gap in Bitcoin volume will show a gap in trade activity for your ticker.
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.
RatioETH /US02Y)This indicator shows the normalized performance of ETH multiplied by the inverse of the US 2-Year Treasury Yield (1 / US02Y).
It highlights how ETH reacts to falling or rising short-term yields, normalized as % change from the start of the chart.
RatioXRP / US02Y)Fetches XRP price and 2-year Treasury yield
Calculates composite: XRP price × (1 / US 2Y yield)
Normalizes that composite to % change from first chart bar
Plots that normalized composite line
RatioBTC/ US02Y)Fetches BTC price and US 2-Year yield (FRED:DGS2)
Computes BTC × (1 / US02Y) to reflect macro impact
Normalizes the composite value to show % change from the first visible value
Plots only the normalized result for clarity
MTF Custom Synthetic IndexMTF Custom Synthetic Index - Ultimate Index Creation Tool
🎯 What is this indicator?
The MTF Custom Synthetic Index is a powerful, fully customizable indicator that allows you to create your own synthetic index using up to 6 different instruments of your choice. Unlike traditional indices, this tool gives you complete control over instrument selection, weightings, and calculation methodology.
⭐ Key Features
🔧 Complete Customization
Choose ANY instruments: Forex pairs, stocks, commodities, indices, cryptocurrencies, bonds, etc.
Manual weight control: Set exact percentage weights for each instrument (must total 100%).
Flexible instrument direction: Ability to invert enabled instruments that move opposite to your desired index direction (i.e. you can use instruments that are negatively correlated).
📊 Multi-Timeframe Analysis
Simultaneous monitoring: View index strength across up to 3 additional timeframes.
Strength rating system: Automatic classification (Very Strong, Strong, Neutral, Weak, Very Weak).
Normalization options: Z-Score, Min-Max, or Percentage methods for timeframe comparison.
Visual summary table: Real-time strength ratings for all timeframes.
🎨 Professional Visualization
Clean chart display: Smooth index strength line with customizable styling.
Dynamic labelling: Real-time value display with strength ratings.
Color-coded indicators: Visual strength representation with intuitive colour schemes.
💡 Use Cases
🌍 Currency Strength Analysis
USD Index: Combine EURUSD (inverted), USDJPY, AUDUSD (inverted), etc.
EUR Index: Combine EURUSD, EURGBP, EURJPY, etc.
Multi-currency baskets: Track regional currency performance.
📈 Sector/Industry Tracking
Technology sector: Combine AAPL, MSFT, GOOGL with custom weights.
Energy sector: Combine oil, gas, and energy stocks.
Precious metals: Combine gold, silver, platinum with custom allocations.
🏛️ Macro Economic Indices
Interest rate sensitivity: Combine bonds, currency pairs, and rate-sensitive stocks.
Inflation hedges: Combine commodities, TIPS, and inflation-sensitive assets.
Risk appetite: Combine safe havens vs. risk assets.
💰 Portfolio Replication
Custom benchmarks: Create indices that match your specific portfolio allocation.
Strategy testing: Build theoretical indices to test investment strategies.
🔥 Key Benefits
✅ Precision Control
Exact weight specifications with mandatory 100% total.
Choose instruments that matter to your trading strategy.
Advanced ADX/DI calculation methodology with configurable parameters.
✅ Versatile Application
Works with any asset class available on TradingView.
Suitable for scalping, day trading, swing trading, and long-term analysis.
Perfect for both retail and institutional approaches.
✅ Multi-Timeframe Insights
Quickly and easily pot divergences between timeframes.
Confirm trends across multiple time horizons.
Make better-informed trading decisions.
⚙️ Technical Specifications
Calculation Method
Base algorithm: Advanced ADX (Average Directional Index) with Directional Indicators.
Bias calculation: Normalized or raw DI difference with ADX weighting.
Smoothing options: Configurable periods for DI calculation and ADX smoothing.
Validation & Safety
Weight validation: Must total exactly 100% - prevents calculation errors.
Data integrity: Handles missing data and invalid symbols gracefully.
Timeframe validation: Prevents duplicate or invalid timeframe selections.
🚀 Perfect For
Currency traders seeking custom dollar/euro/yen/etc strength indices.
Commodity traders seeking custom precious metal/energy/etc strength indices.
Portfolio managers needing custom benchmark creation.
Macro traders building economic strength indicators.
Systematic traders requiring precise, repeatable index calculations.
📋 Quick Start
Add the indicator to your chart
Configure instruments: Select your desired symbols and weights (must total 100%).
Set timeframes: Choose additional timeframes for multi-timeframe analysis.
Customize display: Adjust colors, labels, and table settings to your preference.
Start trading: Use the index strength readings to guide your trading decisions.
⚠️ Important Notes
Weights must total exactly 100%: The indicator will show an error if weights don't add up correctly.
Data requirements: All selected instruments must have available data for the calculation to work.
Timeframe selection: Multi-timeframe analysis requires different timeframes from your main/selected chart.
Transform your trading with the power of custom index creation. Take control of your analysis and build indices that truly matter to your trading strategy.
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
Auto Timeframe Period Separators v2
This script automatically plots vertical separator lines for multiple key timeframes — including 5-minute, 15-minute, 1-hour, 4-hour, daily, and weekly — to help you visually identify period boundaries on your charts.
Features:
Customizable enable/disable options for each timeframe separator
Adjustable line color, style (solid, dashed, dotted), and width per timeframe
Dynamic plotting based on the current chart timeframe to reduce clutter
Visibility controls allowing you to define the minimum and maximum chart timeframes where each separator is displayed
Use Cases:
Easily distinguish trading sessions, days, and weeks for better chart analysis
Quickly identify time period breaks across multiple scales
Enhance chart readability without manual adjustments
How to Use:
Enable or disable any timeframe separator according to your preference
Customize colors and styles to suit your chart theme
Adjust visibility ranges to control when separators appear, depending on your current chart timeframe
BTCUSD Multi TP Trade Signal📘 Indicator Description: BTCUSD Multi TP Trade Signal
This indicator is designed to generate high-quality Buy/Sell signals on BTCUSD, using a simple yet effective EMA crossover strategy. It visually plots all associated Take-Profit (TP) and Stop-Loss (SL) levels, allowing traders to plan and manage their trades with precision.
🔑 Key Features
✅ Trade Direction Control: Select to trade Long, Short, or Both directions
✅ Signal Generation: Uses EMA 20/50 crossover logic for trend confirmation
✅ Visual Trade Levels: Plots 4 customizable TP levels and a fixed SL on the chart
✅ Trend Filter Option: Align signals with higher timeframe (HTF) market direction
✅ User-Controlled Settings: Adjustable profit/stop targets and filtering logic
✅ Non-executing tool: Ideal for manual, visual, or alert-based trading
⚙️ Input Settings
Parameter Function
Strategy Direction Filters signals by direction (all, long, short)
Length of Filter Period for trend filter (SMA) on HTF
Candle Time Resolution for time-based conditions
Length of ATR ATR period for potential future enhancements
HTF Higher Time Frame (e.g., Weekly) for trend alignment
Use Filter Toggle the HTF filter ON/OFF
Stop Loss Fixed SL in USD
Take Profit 1–4 TP levels in USD from entry price
📊 How It Works
A Buy signal is plotted when EMA 20 crosses above EMA 50 and other conditions are met.
A Sell signal is plotted when EMA 20 crosses below EMA 50.
Each trade signal includes clearly marked TP1, TP2, TP3, TP4, and SL levels.
Optional HTF trend filter ensures signals align with the broader market trend.
🧠 Best Use Cases
Works best on 15-minute to 1-hour BTCUSD charts
Ideal for trend-following intraday or swing trading
Use with confluence (volume, price action, or key levels) for best results
CGPT Golden Cross / Death Cross AlertThis custom indicator identifies Golden Cross (Gx) and Death Cross (Dx) events using either EMA or SMA moving averages. A Golden Cross occurs when a short-term MA (e.g., 50) crosses above a long-term MA (e.g., 200), signaling potential bullish momentum. A Death Cross signals potential bearish momentum, with the short-term MA crossing below the long-term MA.
It includes:
📈 Customizable MA types (EMA or SMA)
⚙️ Adjustable fast & slow MA lengths
🟢🔴 Chart labels for Gx (green) and Dx (red)
🎯 Background highlights for visual trend shifts
🔔 Built-in alert conditions for real-time notifications
Ideal for crypto, stocks, or forex swing and trend trading
Distrodisco_v1.4What it does:
Defines a “distribution session” (customizable time window) and tracks that session’s high/low to compute its distribution width as a percentage.
Compares the current session’s distribution to historical same-day-of-week distributions to detect when it crosses above the median (i.e., a meaningful breakout in context).
Tags the breakout direction (long or short) based on wick extremes and prior-session pivots.
After a tagged break, tracks the pullback/retrace: how far price reverses back toward the tag (used for SL tuning).
Simultaneously measures how far price extends beyond the break before the retrace begins—this “extension before retrace” can be used to calibrate realistic take-profit targets.
Maintains historical accumulators for both retrace sizes and extensions so you can see distributions over time.
Key metrics shown in the table:
Total Days / Median Hits : Coverage of historical samples and how often distribution crosses its median.
Pullback Rate: Percentage of median breaks that produced a pullback (including live/active ones if the session ends mid-retrace).
Current / Historical Distribution Stats: Current session’s width vs. historical median/average for that weekday.
Reversion Ret (revAbs): The largest pullback after a break (live for the session), used as a de-facto stop-loss gauge.
Hist Median Ret: Median of completed historical retraces (and active ones at session end if not closed).
90%ile Ret: Upper-bound reference for retrace size—what the larger retraces look like.
>= X% PBs: User-defined threshold (e.g., enter 0.05 for 0.05%) showing the percentage of historical retraces that met or exceeded that magnitude.
Extension Median / 90%ile / Last Ext: How far price typically runs past the break before reversing—used for take-profit calibration. (If not yet enabled, these are forthcoming additions.)
Inputs:
Distribution Session / Timezone: Define the intra-day window to consider for distribution measurement.
Max Distribution % to Include: Caps abnormally wide distributions from polluting historical buckets.
Filter Out Abnormally Large Days: Toggle to exclude outliers.
Min Pullback to Count (%): Threshold to count “meaningful” retraces in the historical percentage bucket. Enter e.g. 0.05 to represent 0.05%.
Table styling: Color and positioning for easy visibility.
EPS+Sales+Net Profit+MCap+Sector & Industry📄 Full Description
This script displays a comprehensive financial data panel directly on your TradingView chart, helping long-term investors and swing traders make informed decisions based on fundamental trends. It consolidates key financial metrics and business classification data into a single, visually clear table.
🔍 Key Features:
🧾 Financial Metrics (Auto-Fetched via request.financial):
EPS (Earnings Per Share) – Displayed with trend direction (QoQ or YoY).
Sales / Revenue – In ₹ Crores (for Indian stocks), trend change also included.
Net Profit – Also in ₹ Crores, along with percentage change.
Market Cap – Automatically calculated using outstanding shares × price, shown in ₹ Cr.
Free Float Market Cap – Based on float shares × price, also in ₹ Cr.
🏷️ Sector & Industry Info:
Automatically identifies and displays the Sector and Industry of the stock using syminfo.sector and syminfo.industry.
Displayed inline with metrics, making it easy to know what business the stock belongs to.
📊 Table View:
Compact and responsive table shown on your chart.
Columns: Date | EPS | QoQ | Sales | QoQ | Net Profit | QoQ | Metrics
Metrics column dynamically shows:
Market Cap
Free Float
Sector (Row 4)
Industry (Row 5)
🌗 Appearance:
Supports Dark Mode and Mini Mode toggle.
You can also customize:
Number of data points (last 4+ quarters or years)
Table position and size
🎯 Use Case:
This script is ideal for:
Fundamental-focused traders who use EPS/Sales trends to identify momentum.
Swing traders who combine price action with fundamental tailwinds.
Portfolio builders who want to see sector/industry alignment quickly.
It works best with fundamentally sound stocks where earnings and profitability are a major factor in price movements.
✅ Important Notes:
Script uses request.financial which only works with supported symbols (mostly stocks).
Market Cap and Free Float are calculated in ₹ Crores.
All financial values are rounded and formatted for readability (e.g., 1,234 Cr).
🙏 Credits:
Developed and published by Sameer Thorappa
Built with a clean, minimalist approach for high readability and functionality.
High/Low Premarket & Previous Day This scripts adds lines for previous day and premarket high/low with labels that you can toggle on and off. The lines extend through current premarket and trading session
Gold Multi TP Strategy📘 Strategy Description: Gold Multi Take-Profit Strategy (XAUUSD)
This strategy is designed for Gold (XAUUSD) and works on any timeframe (recommended: 15-min or higher). It executes trades based on a simple EMA crossover logic with optional higher-timeframe and ATR-based filters to confirm trend direction and volatility.
🔑 Core Features
✅ Directional control: Trade only long, short, or both directions (Strategy Direction)
✅ Multi-level Take Profit: Scale out at up to 4 configurable profit targets
✅ Fixed Stop Loss: Set custom SL distance for risk control
✅ Position Sizing: Allocate different percentages to each TP level
✅ HTF Trend Filter (optional): Align trades with weekly candle trend
✅ ATR Filter (optional): Improve entries with volatility-based filter
⚙️ Inputs Explained
Input Name Function
Strategy Direction Choose to trade all, long, or short only
Length of Filter Length of the moving average used for HTF trend filter
Candle Time Reference candle timeframe in minutes (e.g., 1440 for daily)
Length of ATR Period for ATR calculation (volatility)
HTF Higher timeframe for filter (e.g., 1 week)
Filter Checkbox Enable/disable trend filter
Stop Loss Fixed SL distance in price units
Qty_percent1-3 % of position allocated to TP1–TP3 (rest goes to TP4)
Take profit1–4 TP levels (in price units) from entry price
🧠 Logic Overview
Entry triggered on EMA 20/50 crossover
Optional filter: entry allowed only if current price is above its HTF MA (bullish) or below (bearish)
Position is scaled out at up to 4 profit levels using different qty_percent
SL remains fixed throughout the trade
📊 Best Use
Intraday trading on XAUUSD, ideally during London/NY sessions
Trending or breakout conditions
Works best with additional confluence (price action, S/R, news)
TotM - BTC Price Momentum (30-day)🇬🇧 ENGLISH VERSION
A simple and effective 30-day momentum indicator for Bitcoin.
This indicator calculates the 30-day price momentum of Bitcoin, expressed as a percentage change from the closing price 30 bars ago. It's a lightweight and visual tool to assess short-term strength or overheating of price movements.
🟦 Blue = positive momentum
🔴 Red = overheated (> +40%)
⚫ Gray = negative momentum
Reference lines at 0% and 40% mark equilibrium and overbought zones.
Feel free to customize it for other assets or timeframes.
For educational use only – not financial advice.
Recession Warning Model [BackQuant]Recession Warning Model
Overview
The Recession Warning Model (RWM) is a Pine Script® indicator designed to estimate the probability of an economic recession by integrating multiple macroeconomic, market sentiment, and labor market indicators. It combines over a dozen data series into a transparent, adaptive, and actionable tool for traders, portfolio managers, and researchers. The model provides customizable complexity levels, display modes, and data processing options to accommodate various analytical requirements while ensuring robustness through dynamic weighting and regime-aware adjustments.
Purpose
The RWM fulfills the need for a concise yet comprehensive tool to monitor recession risk. Unlike approaches relying on a single metric, such as yield-curve inversion, or extensive economic reports, it consolidates multiple data sources into a single probability output. The model identifies active indicators, their confidence levels, and the current economic regime, enabling users to anticipate downturns and adjust strategies accordingly.
Core Features
- Indicator Families : Incorporates 13 indicators across five categories: Yield, Labor, Sentiment, Production, and Financial Stress.
- Dynamic Weighting : Adjusts indicator weights based on recent predictive accuracy, constrained within user-defined boundaries.
- Leading and Coincident Split : Separates early-warning (leading) and confirmatory (coincident) signals, with adjustable weighting (default 60/40 mix).
- Economic Regime Sensitivity : Modulates output sensitivity based on market conditions (Expansion, Late-Cycle, Stress, Crisis), using a composite of VIX, yield-curve, financial conditions, and credit spreads.
- Display Options : Supports four modes—Probability (0-100%), Binary (four risk bins), Lead/Coincident, and Ensemble (blended probability).
- Confidence Intervals : Reflects model stability, widening during high volatility or conflicting signals.
- Alerts : Configurable thresholds (Watch, Caution, Warning, Alert) with persistence filters to minimize false signals.
- Data Export : Enables CSV output for probabilities, signals, and regimes, facilitating external analysis in Python or R.
Model Complexity Levels
Users can select from four tiers to balance simplicity and depth:
1. Essential : Focuses on three core indicators—yield-curve spread, jobless claims, and unemployment change—for minimalistic monitoring.
2. Standard : Expands to nine indicators, adding consumer confidence, PMI, VIX, S&P 500 trend, money supply vs. GDP, and the Sahm Rule.
3. Professional : Includes all 13 indicators, incorporating financial conditions, credit spreads, JOLTS vacancies, and wage growth.
4. Research : Unlocks all indicators plus experimental settings for advanced users.
Key Indicators
Below is a summary of the 13 indicators, their data sources, and economic significance:
- Yield-Curve Spread : Difference between 10-year and 3-month Treasury yields. Negative spreads signal banking sector stress.
- Jobless Claims : Four-week moving average of unemployment claims. Sustained increases indicate rising layoffs.
- Unemployment Change : Three-month change in unemployment rate. Sharp rises often precede recessions.
- Sahm Rule : Triggers when unemployment rises 0.5% above its 12-month low, a reliable recession indicator.
- Consumer Confidence : University of Michigan survey. Declines reflect household pessimism, impacting spending.
- PMI : Purchasing Managers’ Index. Values below 50 indicate manufacturing contraction.
- VIX : CBOE Volatility Index. Elevated levels suggest market anticipation of economic distress.
- S&P 500 Growth : Weekly moving average trend. Declines reduce wealth effects, curbing consumption.
- M2 + GDP Trend : Monitors money supply and real GDP. Simultaneous declines signal credit contraction.
- NFCI : Chicago Fed’s National Financial Conditions Index. Positive values indicate tighter conditions.
- Credit Spreads : Proxy for corporate bond spreads using 10-year vs. 2-year Treasury yields. Widening spreads reflect stress.
- JOLTS Vacancies : Job openings data. Significant drops precede hiring slowdowns.
- Wage Growth : Year-over-year change in average hourly earnings. Late-cycle spikes often signal economic overheating.
Data Processing
- Rate of Change (ROC) : Optionally applied to capture momentum in data series (default: 21-bar period).
- Z-Score Normalization : Standardizes indicators to a common scale (default: 252-bar lookback).
- Smoothing : Applies a short moving average to final signals (default: 5-bar period) to reduce noise.
- Binary Signals : Generated for each indicator (e.g., yield-curve inverted or PMI below 50) based on thresholds or Z-score deviations.
Probability Calculation
1. Each indicator’s binary signal is weighted according to user settings or dynamic performance.
2. Weights are normalized to sum to 100% across active indicators.
3. Leading and coincident signals are aggregated separately (if split mode is enabled) and combined using the specified mix.
4. The probability is adjusted by a regime multiplier, amplifying risk during Stress or Crisis regimes.
5. Optional smoothing ensures stable outputs.
Display and Visualization
- Probability Mode : Plots a continuous 0-100% recession probability with color gradients and confidence bands.
- Binary Mode : Categorizes risk into four levels (Minimal, Watch, Caution, Alert) for simplified dashboards.
- Lead/Coincident Mode : Displays leading and coincident probabilities separately to track signal divergence.
- Ensemble Mode : Averages traditional and split probabilities for a balanced view.
- Regime Background : Color-coded overlays (green for Expansion, orange for Late-Cycle, amber for Stress, red for Crisis).
- Analytics Table : Optional dashboard showing probability, confidence, regime, and top indicator statuses.
Practical Applications
- Asset Allocation : Adjust equity or bond exposures based on sustained probability increases.
- Risk Management : Hedge portfolios with VIX futures or options during regime shifts to Stress or Crisis.
- Sector Rotation : Shift toward defensive sectors when coincident signals rise above 50%.
- Trading Filters : Disable short-term strategies during high-risk regimes.
- Event Timing : Scale positions ahead of high-impact data releases when probability and VIX are elevated.
Configuration Guidelines
- Enable ROC and Z-score for consistent indicator comparison unless raw data is preferred.
- Use dynamic weighting with at least one economic cycle of data for optimal performance.
- Monitor stress composite scores above 80 alongside probabilities above 70 for critical risk signals.
- Adjust adaptation speed (default: 0.1) to 0.2 during Crisis regimes for faster indicator prioritization.
- Combine RWM with complementary tools (e.g., liquidity metrics) for intraday or short-term trading.
Limitations
- Macro indicators lag intraday market moves, making RWM better suited for strategic rather than tactical trading.
- Historical data availability may constrain dynamic weighting on shorter timeframes.
- Model accuracy depends on the quality and timeliness of economic data feeds.
Final Note
The Recession Warning Model provides a disciplined framework for monitoring economic downturn risks. By integrating diverse indicators with transparent weighting and regime-aware adjustments, it empowers users to make informed decisions in portfolio management, risk hedging, or macroeconomic research. Regular review of model outputs alongside market-specific tools ensures its effective application across varying market conditions.
Simple Trading ChecklistCustomisable Simple Trading Checklist
This script overlays a fully customizable trading checklist directly onto your chart, providing an at-a-glance reminder of key trading steps and conditions before entering a position.
It is especially useful for discretionary or rule-based traders who want a consistent on-screen process to follow.
Seasonal Extreme ZonesTrue Seasonal Overlay Chart with Historical Bias
📊 Overview
This innovative Pine Script indicator combines true seasonal overlay visualization with historical bias analysis to provide traders with powerful seasonal trading insights. Unlike traditional seasonal charts that display years chronologically, this indicator overlays multiple years on the same seasonal axis (January-December) for direct pattern comparison.
🎯 Key Features
📈 True Seasonal Overlay
Multi-year Performance Lines: Display 2022, 2023, and 2024 performance on the same seasonal timeline
Year-to-Date Calculation: Each year starts at 0% on January 1st, showing cumulative performance
Real Seasonal Comparison: All years aligned to the same calendar position for accurate pattern recognition
Customizable Display: Toggle individual years on/off as needed
🔍 Historical Bias System
Configurable Timeframe: Analyze 5-25 years of seasonal data
Market-Specific Data: Realistic seasonality patterns for each asset class
Smart Bias Calculation: Adjusts extreme values based on historical depth
Automatic Inversion: Handles inverse pairs (JPY, CHF, CAD, DXY) automatically
💹 Multi-Asset Support
Forex Pairs: EURUSD, GBPUSD, USDJPY, USDCHF, AUDUSD, USDCAD, NZDUSD, DXY
Commodities: Gold, Silver, Crude Oil, Natural Gas, Copper, Agricultural products
Indices: DE40 (DAX), SPX500, NASDAQ100, US30, UK100, Nikkei, ASX200, EUROSTOXX50
🛠️ How It Works
Data Collection
Price Tracking: Captures January 1st starting prices for each year
Performance Calculation: Calculates year-to-date percentage performance
Seasonal Mapping: Maps each data point to its corresponding seasonal day
Array Storage: Stores performance data in organized arrays by year
Seasonal Overlay Logic
Interpolation: Finds nearest seasonal performance for current calendar position
True Overlay: Displays all years simultaneously on the same seasonal axis
Pattern Recognition: Enables direct visual comparison of seasonal behaviors
Historical Bias Engine
Asset-Specific Data: Uses realistic seasonal probabilities for each market
Years Adjustment: Moderates extreme values based on historical timeframe
Bias Calculation: Generates percentage-based seasonal bias (0-100%)
Signal Generation: Creates Strong Bull/Bear signals based on thresholds
📊 Visual Elements
Plot Lines
Blue Line (2024): Current year performance - thick line, most prominent
Red Line (2023): Previous year comparison - medium thickness
Purple Line (2022): Two years ago reference - medium thickness
Orange Line (Historical Bias): Long-term seasonal bias - thick, distinct
Threshold Levels
Strong Bull Line: Configurable bullish threshold (default: 70%)
Strong Bear Line: Configurable bearish threshold (default: 30%)
Neutral Line: 50% reference level
Zero Line: 0% performance reference
Background Colors
Green Background: Strong Long Bias periods
Red Background: Strong Short Bias periods
Transparent: Neutral periods
🎯 Trading Applications
Pattern Recognition
Seasonal Consistency: Identify repeating seasonal patterns across years
Divergence Analysis: Spot when current year deviates from historical norms
Trend Confirmation: Use seasonal bias to confirm directional trades
Bias-Based Trading
Strong Long Bias (>70%): Favor long setups, avoid shorts
Strong Short Bias (<30%): Favor short setups, avoid longs
Neutral Zones (30-70%): Focus on technical analysis over seasonal bias
Risk Management
Seasonal Headwinds: Reduce position sizes during unfavorable seasons
Seasonal Tailwinds: Consider larger positions during favorable periods
Entry Timing: Use seasonal overlay to time entries within trend direction
⚙️ Configuration Options
Display Settings
Year Selection: Toggle 2022, 2023, 2024 displays individually
Historical Bias Years: Configure 5-25 years for bias calculation
Threshold Levels: Customize Strong Bull/Bear threshold percentages
Visual Elements: Toggle table, backgrounds, and bias line
Asset Selection
Forex Group: Select from major currency pairs
Commodity Group: Choose from metals, energy, and agricultural products
Index Group: Pick from major global stock indices
Color Customization
Year Colors: Customize colors for each year line
Bias Color: Set historical bias line color
Background Colors: Configure Strong Bull/Bear background colors
📋 Information Panel
The indicator includes a comprehensive information table showing:
Current Asset: Selected instrument with inversion status
Monthly Status: Current month with bias direction and strength
Bias Percentage: Numerical historical bias value
Configuration: Active years and threshold settings
Seasonality Note: Indicates if data is inverted for certain pairs
🚀 Unique Advantages
True Seasonal Comparison: Unlike traditional charts, enables direct year-over-year seasonal comparison
Market-Specific Data: Uses realistic seasonal patterns based on actual market drivers
Automated Handling: Manages complex calculations and data interpolation automatically
Flexible Timeframes: Adapts historical bias calculation to user preferences
Professional Visualization: Clean, intuitive display suitable for all experience levels
💡 Best Practices
Combine with Technical Analysis: Use seasonal bias to filter trade direction, not as standalone signals
Consider Market Regime: Factor in current market conditions and volatility
Multiple Timeframe Analysis: Confirm seasonal bias on different chart timeframes
Risk Management: Always use appropriate position sizing regardless of seasonal bias
This indicator transforms seasonal analysis from static historical data into dynamic, actionable trading intelligence through innovative visualization and robust bias calculation methodology.
COT-Wallstreetstory OANDA Edition🔥 COT Wallstreetstory OANDA Edition - Professional COT Analysis Tool
This indicator provides comprehensive Commitment of Traders (COT) analysis across multiple asset classes with advanced signal generation for both long-term and intraday trading strategies.
🌟 KEY FEATURES:
✅ Multi-Asset Support:
- Forex: EUR, GBP, JPY, CHF, AUD, CAD, NZD, MXN
- Commodities: Gold, Silver, Crude Oil, Natural Gas, Copper, Grains
- Indices: S&P 500, Nasdaq, Dow Jones, Russell 2000, VIX
- Custom: Enter any CFTC code manually
✅ Smart Currency Inversion:
- Automatic data inversion for JPY, CHF, CAD, MXN pairs
- Shows "ORIGINAL" vs "INVERTED" display mode
- No more confusion with inverse correlations
✅ Dual Signal System:
- Long-term Signals: For W1/D1 swing trading
- Intraday Bias: For H4 setup → M15 entry strategies
- Visual backgrounds indicate signal strength
✅ Extreme Zones:
- Horizontal extreme zones with market-specific recommendations
- Customizable thresholds for each asset class
- Visual alerts when COT data reaches extreme levels
✅ Professional Visualization:
- Clean, emoji-free interface for serious traders
- Sensitivity arrows: ↑↑↑ Conservative, ↑↑ Normal, ↓ Aggressive
- Color-coded display modes and signal status
🎯 TRADING APPLICATIONS:
📈 Long-term Strategy:
Monitor when Commercials reach extreme positions and Non-Commercials follow. Perfect for identifying major trend reversals on weekly/daily charts.
⚡ Intraday Strategy:
Use Non-Commercial and Retail positioning relative to recent weeks to determine directional bias for H4 liquidity sweeps and M15 entries.
🔧 CUSTOMIZATION:
- Adjustable extreme thresholds for each market
- Three sensitivity levels for signal generation
- Customizable colors and line styles
- Optional info table with current market status
📊 TECHNICAL DETAILS:
- Uses TradingView's official COT Library
- Weekly COT data from CFTC reports
- Supports all major OANDA trading pairs
- Compatible with any timeframe (recommended: M15-D1)
⚠️ IMPORTANT NOTE:
This indicator displays COT data from CME futures markets. While trading OANDA spot markets, you're analyzing the underlying futures sentiment which drives institutional positioning.
Perfect for professional traders who understan