Koalafied Risk ManagementTables and labels/lines showing trade levels and risk/reward. Use to manage trade risk compared to portfolio size.
Initial design optimised for tickers denominated against USD.
在脚本中搜索" TABLE "
Table ATH and DayQuotes in the middle of a chartJust important things at a glance ..
AlltimeHigh and Daily High/Low
Volume Trend AnalysisStudy Material for Volume Trend Analysis Dashboard
1. Introduction
This script is a complete volume-based technical analysis dashboard designed in TradingView, created under the guidelines of TradingView and aiTrendview. It combines multiple indicators—Volume, RSI, Supertrend, Buy/Sell Pressure, and Momentum—into a single visual dashboard.
The purpose is education and market observation, not guaranteed profits. Students using this tool should focus on understanding patterns, signals, and probabilities rather than treating them as fixed rules.
________________________________________
2. Core Components and Indicators
🔹 Volume Analysis
• Volume shows the number of shares/contracts traded in a specific period.
• The script compares today’s volume with historical averages (e.g., 20-day average).
• This helps identify whether trading activity is higher or lower than usual.
• Learning use: A student can track if high volume confirms a price breakout or if low volume suggests weak conviction.
• Combination:
o High price rise + High volume → Strong bullish move.
o Price rise + Low volume → Weak rally, may fail.
o Price fall + High volume → Strong selling pressure.
o Price fall + Low volume → Weak decline, may reverse.
________________________________________
🔹 RSI (Relative Strength Index)
• RSI measures momentum (0–100 scale).
• Above 70 = Overbought (possible selling zone).
• Below 30 = Oversold (possible buying zone).
• Around 50 = Neutral, sideways market.
• Learning use: Combine with volume—RSI near extremes with high volume often marks turning points.
• Combination:
o RSI < 30 + High buy pressure volume = Strong bounce probability.
o RSI > 70 + High sell pressure volume = Risk of reversal downward.
________________________________________
🔹 Supertrend
• Supertrend uses volatility (ATR) to show support/resistance bands.
• Price above = Bullish trend.
• Price below = Bearish trend.
• Learning use: New students can treat it as a dynamic stop-loss and trailing tool.
• Combination:
o Price > Supertrend + RSI > 50 + High buy volume = Safe bullish trend.
o Price < Supertrend + RSI < 50 + High sell volume = Safe bearish trend.
________________________________________
🔹 Buy/Sell Pressure
• The indicator splits volume into buying vs. selling portions based on price action.
• Shows % of buying volume vs. selling volume.
• Learning use: Students can visualize whether bulls or bears are dominating.
• Combination:
o Buying > 65% → Bulls stronger.
o Selling > 65% → Bears stronger.
o Balanced → Market indecisive (range-bound).
________________________________________
🔹 Momentum & Signal Status
• Momentum combines RSI and Supertrend to classify market as Bullish, Bearish, or Neutral.
• Buy/Sell signals are triggered on crossovers of price with Supertrend along with RSI conditions.
• Learning use: Beginners should not blindly trade these signals but track how often they succeed/fail under different market conditions.
• Combination:
o Bullish Momentum + Buy Signal + High Volume = Strong entry setup.
o Bearish Momentum + Sell Signal + High Volume = Strong short setup.
________________________________________
🔹 Volume Pace
• Compares current intraday volume with expected average progress.
• Above pace = Traders active earlier than usual.
• Below pace = Weak interest in current session.
• Learning use: Beginners can track whether moves are backed by real activity or just price manipulation.
• Combination:
o Above pace + Bullish signals = Reliable rally.
o Below pace + Bullish signals = Weak rally, avoid.
________________________________________
3. How to Use the Dashboard
• The dashboard consolidates all indicators into a simple table: Signals, Momentum, Position, Profit, Volume, Pressure, Levels, and Status.
• It helps beginners see different aspects of market condition at one glance.
• Instead of jumping between multiple charts, everything is available in one panel.
• Students can use this to practice observation, backtest signals, and record outcomes.
________________________________________
4. Educational Guidelines
1. Paper Trade First: Always test on virtual trading accounts before real money.
2. Record Outcomes: Note how each signal works in trending vs. sideways markets.
3. Combine with Chart Reading: This is not standalone—students must learn candlestick patterns, support/resistance, and fundamentals.
4. Avoid Overtrading: Just because a dashboard flashes “BUY” doesn’t mean to enter blindly.
5. Adapt Timeframes: Learn the difference between intraday vs. daily signals. Shorter timeframes = more noise.
________________________________________
5. Common Beginner Mistakes
• Blind Trading: Treating BUY/SELL signals as automatic entry/exit without analysis.
• Ignoring Volume: Not checking whether signals are backed by strong or weak volume.
• Overconfidence: Assuming 100% accuracy—no indicator is perfect.
• Misusing Alerts: Alerts help monitoring but don’t guarantee profitability.
________________________________________
6. Disclaimer
This indicator is created strictly for educational and learning purposes under TradingView and aiTrendview guidelines.
• It is not financial advice and should not be treated as a guaranteed profit-making tool.
• Past performance does not guarantee future results.
• Misuse of this indicator for blind speculation can result in financial loss.
• Always use it with proper risk management and independent judgment.
• For real trading decisions, consult a certified financial advisor.
________________________________________
✅ By studying this dashboard, students gain exposure to:
• How multiple indicators interact.
• How volume confirms or rejects price moves.
• How to build discipline by observing signals, not chasing them.
This makes the tool a training ground for market observation rather than a shortcut to quick profits.
Technical Probability MetrixThe provided Pine Script is a comprehensive trading tool called the "Technical Probability Metrix," designed for TradingView in Pine Script version 5. It integrates multiple technical indicators and advanced calculations to generate a probability score indicating the likelihood of bullish or bearish price movement. This study is helpful for traders seeking a consolidated market analysis from several technical perspectives in one integrated view.
How to Use This Script
• Apply the script to any chart on TradingView.
• Customize input parameters like wave detection period, Fibonacci levels, RSI length, MACD settings, stochastic length, and EMA periods to suit your trading style.
• Enable or disable display elements such as Elliott Wave labels, Fibonacci levels, and the summary table as needed.
• Observe the summary table that shows the status, values, strength progress bars, and probability percentages for each indicator category.
• Use the overall "Technical Probability Metrix" score and color-coded signals to determine trade bias and strength.
• Alerts are set up for strong buy/sell signals, trend changes, and EMA crossovers for real-time notification.
How It Is Helpful
• Unified Analysis: Combines momentum, trend, volume, and Fibonacci analysis in a single view, saving time and reducing indicator clutter.
• Probability Scores: Converts complex indicator data into probability percentages, allowing easier interpretation of market direction strength.
• Adaptive Targeting: Provides configurable probability levels indicating multiple targets based on the current trend strength.
• Trend Detection: Uses a trend scoring method combining linear regression, moving averages, and pivot highs/lows for a robust trend bias.
• Alert Conditions: Notifies users of key market signal changes to support timely decision-making.
• Volume and Order Blocks: Includes volume moving average and order block strength which are critical for validating price moves.
• Multi-Timeframe EMA Cross: Incorporates 15-minute EMA crossover analysis adding another confirmation layer.
Indicators Included and Their Role
• RSI (Relative Strength Index): Measures overbought/oversold conditions. Values >70 suggest overbought; <30 suggest oversold.
• MACD (Moving Average Convergence Divergence): Momentum and trend confirmation; bullish when MACD line crosses above signal line.
• Stochastic Oscillator: Identifies momentum and potential trend reversals; bullish when %K crosses above %D under 80.
• Volume Moving Average and Ratio: Detects unusual volume spikes which often precede price moves.
• VWAP (Volume Weighted Average Price): Determines if price is trading above or below average price weighted by volume, indicating institutional interest.
• Order Block Strength: Highlights key supply/demand zones from recent high/low ranges.
• EMA 9/20 Crossover (on 15-min): Short and medium-term trend signals for finer timing.
• Elliott Wave Pivots: Detects significant wave highs and lows to assess price position within swing structures.
• Trend Metrics: Combines moving averages, linear regression slope, higher highs/lows, and bar comparisons to score market trend strength.
How to Analyze Using This Study
• Look for alignment among the indicators: bullish RSI, MACD, stochastic, and volume with positive trend scores and price above VWAP suggest a strong buy.
• Use the probability percentages and progress bars to gauge the power behind signals.
• Observe the overall signal (Strong Buy, Buy, Neutral, Sell, Strong Sell) and corresponding color for quick visual cues.
• Fibonacci levels and wave counts provide context about price targets and retracement zones.
• Alerts notify when conditions for strong entry or exit signals occur, complementing manual analysis.
Benefits for New Traders
• Simplifies Complex Data: Merges multiple technical tools into one dashboard, reducing confusion from using many separate indicators.
• Visual Progress Bars and Status: Easy-to-understand visualization of each indicator’s strength and market probability.
• Educative Value: Shows how classic indicators combine into an overall market assessment, useful for learning indicator interactions.
• Alerts: Helps beginners by signaling trading opportunities without needing constant manual chart monitoring.
• Adjustable Settings: Allows users to experiment with input values and observe how indicators respond.
Disclaimer from aiTrendview
This script and its trading signals are provided for training and educational purposes only. They do not constitute financial advice or a guaranteed trading system. Trading involves substantial risk, and there is the potential to lose all invested capital. Users should perform their own analysis and consult with qualified financial professionals before making any trading decisions. aiTrendview disclaims any liability for losses incurred from using this code or trading based on its signals. Use this tool responsibly, and trade only with risk capital.
Advanced Range Analyzer ProAdvanced Range Analyzer Pro – Adaptive Range Detection & Breakout Forecasting
Overview
Advanced Range Analyzer Pro is a comprehensive trading tool designed to help traders identify consolidations, evaluate their strength, and forecast potential breakout direction. By combining volatility-adjusted thresholds, volume distribution analysis, and historical breakout behavior, the indicator builds an adaptive framework for navigating sideways price action. Instead of treating ranges as noise, this system transforms them into opportunities for mean reversion or breakout trading.
How It Works
The indicator continuously scans price action to identify active range environments. Ranges are defined by volatility compression, repeated boundary interactions, and clustering of volume near equilibrium. Once detected, the indicator assigns a strength score (0–100), which quantifies how well-defined and compressed the consolidation is.
Breakout probabilities are then calculated by factoring in:
Relative time spent near the upper vs. lower range boundaries
Historical breakout tendencies for similar structures
Volume distribution inside the range
Momentum alignment using auxiliary filters (RSI/MACD)
This creates a live probability forecast that updates as price evolves. The tool also supports range memory, allowing traders to analyze the last completed range after a breakout has occurred. A dynamic strength meter is displayed directly above each consolidation range, providing real-time insight into range compression and breakout potential.
Signals and Breakouts
Advanced Range Analyzer Pro includes a structured set of visual tools to highlight actionable conditions:
Range Zones – Gradient-filled boxes highlight active consolidations.
Strength Meter – A live score displayed in the dashboard quantifies compression.
Breakout Labels – Probability percentages show bias toward bullish or bearish continuation.
Breakout Highlights – When a breakout occurs, the range is marked with directional confirmation.
Dashboard Table – Displays current status, strength, live/last range mode, and probabilities.
These elements update in real time, ensuring that traders always see the current state of consolidation and breakout risk.
Interpretation
Range Strength : High scores (70–100) indicate strong consolidations likely to resolve explosively, while low scores suggest weak or choppy ranges prone to false signals.
Breakout Probability : Directional bias greater than 60% suggests meaningful breakout pressure. Equal probabilities indicate balanced compression, favoring mean-reversion strategies.
Market Context : Ranges aligned with higher timeframe trends often resolve in the dominant direction, while counter-trend ranges may lead to reversals or liquidity sweeps.
Volatility Insight : Tight ranges with low ATR imply imminent expansion; wide ranges signal extended consolidation or distribution phases.
Strategy Integration
Advanced Range Analyzer Pro can be applied across multiple trading styles:
Breakout Trading : Enter on probability shifts above 60% with confirmation of volume or momentum.
Mean Reversion : Trade inside ranges with high strength scores by fading boundaries and targeting equilibrium.
Trend Continuation : Focus on ranges that form mid-trend, anticipating continuation after consolidation.
Liquidity Sweeps : Use failed breakouts at boundaries to capture reversals.
Multi-Timeframe : Apply on higher timeframes to frame market context, then execute on lower timeframes.
Advanced Techniques
Combine with volume profiles to identify areas of institutional positioning within ranges.
Track sequences of strong consolidations for trend development or exhaustion signals.
Use breakout probability shifts in conjunction with order flow or momentum indicators to refine entries.
Monitor expanding/contracting range widths to anticipate volatility cycles.
Custom parameters allow fine-tuning sensitivity for different assets (crypto, forex, equities) and trading styles (scalping, intraday, swing).
Inputs and Customization
Range Detection Sensitivity : Controls how strictly ranges are defined.
Strength Score Settings : Adjust weighting of compression, volume, and breakout memory.
Probability Forecasting : Enable/disable directional bias and thresholds.
Gradient & Fill Options : Customize range visualization colors and opacity.
Dashboard Display : Toggle live vs last range, info table size, and position.
Breakout Highlighting : Choose border/zone emphasis on breakout events.
Why Use Advanced Range Analyzer Pro
This indicator provides a data-driven approach to trading consolidation phases, one of the most common yet underutilized market states. By quantifying range strength, mapping probability forecasts, and visually presenting risk zones, it transforms uncertainty into clarity.
Whether you’re trading breakouts, fading ranges, or mapping higher timeframe context, Advanced Range Analyzer Pro delivers a structured, adaptive framework that integrates seamlessly into multiple strategies.
OHLC VWAP Volume High Low Highlights - Lite by ChartWaleTrack OHLC, VWAP, Volume, High/Low, Rise/Fall levels, and get special highlights for significant volume moves.
Works on Most Symbols including Indices, Commodities, Cash Stocks, F&O, and Crypto.
Features:
• Label mode and customizable table mode
• Lite Version provides insights across all supported symbols
⚠ Disclaimer: All indicators, tools, and data provided are strictly for **quick reference and educational purposes only**.
Outputs may sometimes be incorrect or delayed. Please always verify with official exchange/company sources before making trading or investment decisions.
Nothing here should be considered financial advice. Please consult a **certified financial advisor** before making any investment or trading decisions.
🌐 Visit: www.ChartWale.com
Ultimate Pattern ScannerSmart Pattern Scanner Pro - Complete Study Guide
The Smart Pattern Scanner Pro is an advanced candlestick pattern recognition indicator that automatically detects over 30 traditional Japanese candlestick patterns across multiple timeframes simultaneously. It combines pattern recognition with volume analysis and trend confirmation to provide traders with comprehensive reversal and continuation signals.
Core Features:
• 30+ Candlestick Patterns: Complete library of traditional patterns
• Multi-Timeframe Scanning: Simultaneous analysis across up to 7 timeframes
• Volume Integration: Buy/sell volume analysis with pattern confirmation
• Trend Filtering: SMA-based trend confirmation for pattern validity
• Real-Time Dashboard: Professional interface with customizable display
• Alert System: Automated notifications when patterns are detected
________________________________________
Candlestick Pattern Categories
Reversal Patterns (Bullish)
Single Candle Patterns
1. Hammer
o Formation: Small body at top, long lower shadow (2x body size)
o Signal: Bullish reversal after downtrend
o Reliability: High when confirmed with volume
o Entry: Above hammer high with stop below low
2. Inverted Hammer
o Formation: Small body at bottom, long upper shadow
o Signal: Potential bullish reversal (needs confirmation)
o Reliability: Medium (requires next candle confirmation)
o Entry: Confirmed breakout above pattern
3. Dragonfly Doji
o Formation: Open = Close, long lower shadow, no upper shadow
o Signal: Strong bullish reversal signal
o Reliability: High in downtrends
o Entry: Above doji high with tight stop
4. Long Lower Shadow
o Formation: Lower shadow 2x body length
o Signal: Rejection of lower prices, bullish sentiment
o Reliability: Medium to high with volume
o Entry: Above candle high
Multi-Candle Patterns
1. Bullish Engulfing
o Formation: Large white candle completely engulfs previous black candle
o Signal: Strong bullish reversal
o Reliability: Very high with volume confirmation
o Entry: Above engulfing candle high
2. Morning Star
o Formation: 3-candle pattern (down, small, up)
o Signal: Major bullish reversal
o Reliability: Excellent (one of most reliable patterns)
o Entry: Above third candle high
3. Morning Doji Star
o Formation: Like Morning Star but middle candle is doji
o Signal: Strong bullish reversal
o Reliability: Very high
o Entry: Above third candle close
4. Piercing Pattern
o Formation: White candle opens below previous low, closes above midpoint
o Signal: Bullish reversal
o Reliability: High when closing >50% into previous candle
o Entry: Above piercing candle high
5. Bullish Harami
o Formation: Small white candle within previous large black candle
o Signal: Potential bullish reversal
o Reliability: Medium (needs confirmation)
o Entry: Above mother candle high
Reversal Patterns (Bearish)
Single Candle Patterns
1. Shooting Star
o Formation: Small body at bottom, long upper shadow
o Signal: Bearish reversal after uptrend
o Reliability: High with volume confirmation
o Entry: Below shooting star low
2. Hanging Man
o Formation: Like hammer but appears in uptrend
o Signal: Potential bearish reversal
o Reliability: Medium (needs confirmation)
o Entry: Below hanging man low
3. Gravestone Doji
o Formation: Open = Close, long upper shadow, no lower shadow
o Signal: Strong bearish reversal
o Reliability: High in uptrends
o Entry: Below doji low
4. Long Upper Shadow
o Formation: Upper shadow 2x body length
o Signal: Rejection of higher prices
o Reliability: Medium to high
o Entry: Below candle low
Multi-Candle Patterns
1. Bearish Engulfing
o Formation: Large black candle engulfs previous white candle
o Signal: Strong bearish reversal
o Reliability: Very high
o Entry: Below engulfing candle low
2. Evening Star
o Formation: 3-candle pattern (up, small, down)
o Signal: Major bearish reversal
o Reliability: Excellent
o Entry: Below third candle low
3. Dark Cloud Cover
o Formation: Black candle opens above previous high, closes below midpoint
o Signal: Bearish reversal
o Reliability: High when closing <50% into previous candle
o Entry: Below dark cloud low
Continuation Patterns
1. Rising Three Methods
o Formation: White candle, 3 small declining candles, white candle
o Signal: Bullish continuation
o Reliability: High in strong uptrends
2. Falling Three Methods
o Formation: Black candle, 3 small rising candles, black candle
o Signal: Bearish continuation
o Reliability: High in strong downtrends
Indecision Patterns
1. Doji
o Formation: Open = Close (or very close)
o Signal: Market indecision, potential reversal
o Reliability: Context-dependent
2. Spinning Tops
o Formation: Small body with upper and lower shadows
o Signal: Market indecision
o Reliability: Low without confirmation
________________________________________
Multi-Timeframe Analysis
Timeframe Hierarchy Strategy
Primary Analysis Flow:
1. Higher Timeframe (Daily/Weekly): Establish overall trend direction
2. Intermediate Timeframe (4H/1H): Identify key support/resistance levels
3. Lower Timeframe (15M/5M): Precise entry and exit timing
Configuration Guidelines:
• Scalping: 1M, 3M, 5M, 15M, 30M
• Day Trading: 5M, 15M, 30M, 1H, 4H
• Swing Trading: 1H, 4H, 1D, 1W
• Position Trading: 4H, 1D, 1W, 1M
Pattern Confluence Rules:
1. High Probability Setup: Same pattern type appears on 3+ timeframes
2. Trend Alignment: Reversal patterns should align with higher timeframe structure
3. Volume Confirmation: Strong volume on pattern timeframe and higher timeframes
________________________________________
Volume Analysis Integration
Volume Components:
1. Buy Volume: Volume when close > open (green candles)
2. Sell Volume: Volume when close ≤ open (red candles)
3. Volume Ratio: Current volume / 20-period moving average
4. Progress Indicator: Visual representation of volume strength
Volume Signal Interpretation:
• Ratio >1.5: Strong volume confirmation
• Ratio 1.0-1.5: Moderate volume support
• Ratio <1.0: Weak volume (pattern less reliable)
Volume Analysis Rules:
1. Bullish Patterns: Require strong buy volume for confirmation
2. Bearish Patterns: Require strong sell volume for confirmation
3. Volume Divergence: When pattern and volume disagree, favor volume
4. Volume Spikes: Ratios >2.0 indicate institutional interest
________________________________________
Live Market Application
Step 1: Dashboard Setup
1. Position Selection: Choose optimal table position for your layout
2. Timeframe Configuration: Set relevant timeframes for your strategy
3. Volume Analysis: Enable for confirmation signals
4. Progress Indicators: Enable for visual signal strength
Step 2: Pattern Identification Process
Real-Time Scanning:
1. Monitor Multiple Timeframes: Check all configured timeframes simultaneously
2. Pattern Priority: Focus on patterns appearing on higher timeframes first
3. Signal Confluence: Look for patterns appearing across multiple timeframes
4. Volume Confirmation: Verify adequate volume support
Pattern Validation:
1. Trend Context: Ensure pattern aligns with overall market structure
2. Support/Resistance: Check if pattern forms at key levels
3. Market Conditions: Consider overall market volatility and sentiment
4. Time of Day: Be aware of session characteristics (open, close, lunch)
Step 3: Entry Decision Matrix
High Probability Entries:
• Pattern on 3+ timeframes
• Strong volume confirmation (ratio >1.5)
• Trend alignment with higher timeframes
• Formation at key support/resistance
Medium Probability Entries:
• Pattern on 2 timeframes
• Moderate volume (ratio 1.0-1.5)
• Partial trend alignment
• Formation in trending market
Low Probability Entries:
• Single timeframe pattern
• Weak volume (ratio <1.0)
• Counter-trend formation
• Choppy/sideways market
________________________________________
Pattern Reliability Assessment
Tier 1 Patterns (Highest Reliability - 70-80% success rate):
• Morning Star / Evening Star
• Bullish/Bearish Engulfing
• Three White Soldiers / Three Black Crows
• Hammer (in strong downtrend)
• Shooting Star (in strong uptrend)
Tier 2 Patterns (High Reliability - 60-70% success rate):
• Piercing Pattern / Dark Cloud Cover
• Morning/Evening Doji Star
• Harami patterns
• Abandoned Baby
• Kicking patterns
Tier 3 Patterns (Moderate Reliability - 50-60% success rate):
• Doji patterns
• Tweezer Tops/Bottoms
• Window patterns
• Tasuki Gap patterns
• Marubozu patterns
Tier 4 Patterns (Lower Reliability - 40-50% success rate):
• Spinning Tops
• Long shadow patterns (single)
• Neutral doji formations
• Single candle continuation patterns
________________________________________
Trading Strategies
Strategy 1: Multi-Timeframe Reversal
Objective: Catch major trend reversals using high-reliability patterns
Rules:
1. Wait for Tier 1 patterns on Daily + 4H timeframes
2. Require volume ratio >1.5 on both timeframes
3. Enter on 1H confirmation candle
4. Stop loss below/above pattern extreme
5. Target 2:1 or 3:1 risk-reward ratio
Strategy 2: Intraday Scalping
Objective: Quick profits from short-term pattern formations
Rules:
1. Focus on 5M and 15M timeframes
2. Trade only Tier 1 and Tier 2 patterns
3. Require volume confirmation
4. Quick exits (10-30 pip targets)
5. Tight stops (5-15 pips)
Strategy 3: Swing Trading
Objective: Multi-day position holding based on pattern signals
Rules:
1. Use Daily and Weekly timeframes
2. Focus on major reversal patterns
3. Combine with fundamental analysis
4. Wider stops (2-5% of entry price)
5. Hold for 5-20 trading days
Strategy 4: Trend Continuation
Objective: Enter trending markets using continuation patterns
Rules:
1. Identify strong trends on higher timeframes
2. Wait for continuation patterns on lower timeframes
3. Enter in direction of main trend
4. Trail stops using pattern lows/highs
5. Pyramid positions on additional patterns
________________________________________
Risk Management
Position Sizing Rules:
1. Tier 1 Patterns: Risk up to 2% of account
2. Tier 2 Patterns: Risk up to 1.5% of account
3. Tier 3 Patterns: Risk up to 1% of account
4. Tier 4 Patterns: Risk up to 0.5% of account
Stop Loss Guidelines:
1. Reversal Patterns: Stop beyond pattern extreme + 1 ATR
2. Continuation Patterns: Stop at pattern invalidation level
3. Doji Patterns: Tight stops due to indecision nature
4. Multi-Candle Patterns: Use pattern range for stop placement
Take Profit Strategies:
1. Conservative: 1:1 risk-reward ratio
2. Moderate: 2:1 risk-reward ratio
3. Aggressive: 3:1 risk-reward ratio
4. Trailing: Move stops to breakeven after 1:1 achieved
________________________________________
Limitations and Considerations
Technical Limitations:
1. Pattern Subjectivity: Slight variations in pattern interpretation
2. Market Context Dependency: Patterns perform differently in various market conditions
3. False Signals: Not all patterns lead to expected price moves
4. Lagging Nature: Patterns are confirmed after formation is complete
Market Condition Considerations:
1. Trending Markets: Continuation patterns more reliable than reversals
2. Range-Bound Markets: Reversal patterns at extremes more effective
3. High Volatility: Patterns may not develop properly
4. News Events: Fundamental factors can override technical patterns
Optimal Usage Conditions:
1. Liquid Markets: Adequate volume and participation
2. Normal Volatility: Not during extreme market stress
3. Clear Market Structure: Defined support and resistance levels
4. Multiple Timeframe Alignment: Confluence across timeframes
When NOT to Trade Patterns:
1. Major News Releases: Economic announcements can invalidate patterns
2. Market Holidays: Reduced participation affects reliability
3. Extreme Volatility: VIX >30 or similar stress indicators
4. Gap Openings: Large gaps can negate pattern significance
________________________________________
Risk Disclaimer
CRITICAL WARNING FROM aiTrendview
TRADING FINANCIAL INSTRUMENTS INVOLVES SUBSTANTIAL RISK OF LOSS
This Smart Pattern Scanner Pro indicator ("the Indicator") is provided for educational and analytical purposes only. By using this indicator, you acknowledge and accept the following terms and conditions:
No Financial Advice
• NOT INVESTMENT ADVICE: This indicator does not constitute financial, investment, or trading advice
• NO RECOMMENDATIONS: Pattern signals are not recommendations to buy or sell any financial instrument
• EDUCATIONAL TOOL: Designed for learning technical analysis concepts and pattern recognition
• INDEPENDENT RESEARCH REQUIRED: Always conduct your own thorough analysis before making trading decisions
Substantial Trading Risks
• CAPITAL LOSS RISK: You may lose some or all of your trading capital
• LEVERAGE DANGERS: Margin trading can amplify losses beyond your initial investment
• MARKET VOLATILITY: Financial markets are inherently unpredictable and can move against any analysis
• PATTERN FAILURE: Candlestick patterns fail frequently and do not guarantee profitable outcomes
• FALSE SIGNALS: The indicator may generate incorrect or misleading signals
Technical Analysis Limitations
• NOT PREDICTIVE: Candlestick patterns analyze past price action, not future movements
• SUBJECTIVE INTERPRETATION: Pattern recognition can vary between traders and market conditions
• CONTEXT DEPENDENT: Patterns must be analyzed within broader market context
• NO GUARANTEE: No technical analysis method guarantees trading success
• STATISTICAL PROBABILITY: Even high-reliability patterns fail 20-30% of the time
User Responsibilities
• SOLE RESPONSIBILITY: You are entirely responsible for all trading decisions and outcomes
• RISK MANAGEMENT: Implement appropriate position sizing and stop-loss strategies
• PROFESSIONAL CONSULTATION: Seek advice from qualified financial professionals
• REGULATORY COMPLIANCE: Ensure compliance with local financial regulations
• CONTINUOUS EDUCATION: Maintain ongoing education in market analysis and risk management
Indicator Limitations
• SOFTWARE BUGS: Technical glitches or calculation errors may occur
• DATA DEPENDENCY: Relies on accurate price and volume data feeds
• PLATFORM LIMITATIONS: Subject to TradingView platform capabilities and restrictions
• VERSION UPDATES: Functionality may change with future updates
• COMPATIBILITY: May not work optimally with all chart configurations
Volume Analysis Limitations
• DATA ACCURACY: Volume data may be incomplete or delayed
• MARKET VARIATIONS: Volume patterns differ across markets and instruments
• INSTITUTIONAL ACTIVITY: Cannot guarantee detection of all institutional trading
• LIQUIDITY FACTORS: Low liquidity markets may produce unreliable volume signals
Multi-Timeframe Considerations
• CONFLICTING SIGNALS: Different timeframes may show contradictory patterns
• TIME SYNCHRONIZATION: Pattern timing may vary across timeframes
• COMPUTATIONAL LOAD: Multiple timeframe analysis may affect performance
• COMPLEXITY RISK: More data does not necessarily mean better decisions
Specific Trading Warnings
Pattern-Specific Risks:
1. Doji Patterns: Indicate indecision, not directional conviction
2. Single Candle Patterns: Generally less reliable than multi-candle formations
3. Continuation Patterns: May signal trend exhaustion rather than continuation
4. Gap Patterns: Subject to overnight and weekend gap risks
Market Condition Risks:
1. News Events: Fundamental factors can invalidate any technical pattern
2. Market Manipulation: Large players can create false pattern signals
3. Algorithmic Trading: High-frequency trading can distort traditional patterns
4. Market Crashes: Extreme events render technical analysis ineffective
Psychological Trading Risks:
1. Overconfidence: Successful patterns may lead to excessive risk-taking
2. Pattern Addiction: Over-reliance on patterns without broader analysis
3. Confirmation Bias: Seeing patterns that don't actually exist
4. Emotional Trading: Fear and greed can override pattern discipline
Legal and Regulatory Disclaimers
Intellectual Property:
• COPYRIGHT PROTECTION: This indicator is protected by copyright law
• AUTHORIZED USE ONLY: Use only as permitted by TradingView terms of service
• NO REDISTRIBUTION: Unauthorized copying or redistribution is prohibited
• MODIFICATION RESTRICTIONS: Code modifications may void any support or warranties
Regulatory Compliance:
• LOCAL LAWS: Ensure compliance with your jurisdiction's financial regulations
• LICENSING REQUIREMENTS: Some jurisdictions require licenses for trading or advisory activities
• TAX OBLIGATIONS: Trading profits/losses may have tax implications
• REPORTING REQUIREMENTS: Some jurisdictions require reporting of trading activities
Limitation of Liability:
• NO LIABILITY: aiTrendview accepts no liability for any losses, damages, or adverse outcomes
• INDIRECT DAMAGES: Not liable for consequential, incidental, or punitive damages
• MAXIMUM LIABILITY: Limited to amount paid for indicator access (if any)
• FORCE MAJEURE: Not responsible for events beyond reasonable control
Final Warnings and Recommendations
Before Using This Indicator:
1. DEMO TRADING: Practice extensively with paper trading before risking real money
2. EDUCATION: Thoroughly understand candlestick pattern theory and market dynamics
3. RISK ASSESSMENT: Honestly assess your risk tolerance and financial situation
4. PROFESSIONAL ADVICE: Consult with qualified financial advisors
5. START SMALL: Begin with minimal position sizes to test strategies
Red Flags - Do NOT Trade If:
• You cannot afford to lose the money you're risking
• You're experiencing financial stress or pressure
• You're trading emotionally or impulsively
• You don't understand the patterns or market mechanics
• You're using borrowed money or credit to trade
• You're treating trading as gambling rather than calculated risk-taking
Emergency Procedures:
• STOP TRADING immediately if experiencing significant losses
• SEEK HELP if trading is affecting your mental health or relationships
• REVIEW STRATEGY after any series of losses
• TAKE BREAKS from trading to maintain perspective
• PROFESSIONAL HELP: Contact financial counselors if needed
Acknowledgment Required
By using the Smart Pattern Scanner Pro indicator, you explicitly acknowledge that:
1. You have read and understood this entire disclaimer
2. You accept full responsibility for all trading decisions and outcomes
3. You understand the substantial risks involved in financial trading
4. You will not hold aiTrendview liable for any losses or damages
5. You will use this tool only for educational and personal analysis purposes
6. You will comply with all applicable laws and regulations
7. You will implement appropriate risk management practices
8. You understand that past performance does not predict future results
REMEMBER: The most important rule in trading is capital preservation. No pattern, indicator, or strategy is worth risking your financial well-being.
________________________________________
Disclaimer from aiTrendview.com
The content provided in this blog post is for educational and training purposes only. It is not intended to be, and should not be construed as, financial, investment, or trading advice. All charting and technical analysis examples are for illustrative purposes. Trading and investing in financial markets involve substantial risk of loss and are not suitable for every individual. Before making any financial decisions, you should consult with a qualified financial professional to assess your personal financial situation.
Quantum Market Analyzer X7Quantum Market Analyzer X7 - Complete Study Guide
Table of Contents
1. Overview
2. Indicator Components
3. Signal Interpretation
4. Live Market Analysis Guide
5. Best Practices
6. Limitations and Considerations
7. Risk Disclaimer
________________________________________
Overview
The Quantum Market Analyzer X7 is a comprehensive multi-timeframe technical analysis indicator that combines traditional and modern analytical methods. It aggregates signals from multiple technical indicators across seven key analysis categories to provide traders with a consolidated view of market sentiment and potential trading opportunities.
Key Features:
• Multi-Indicator Analysis: Combines 20+ technical indicators
• Real-Time Dashboard: Professional interface with customizable display
• Signal Aggregation: Weighted scoring system for overall market sentiment
• Advanced Analytics: Includes Order Block detection, Supertrend, and Volume analysis
• Visual Progress Indicators: Easy-to-read progress bars for signal strength
________________________________________
Indicator Components
1. Oscillators Section
Purpose: Identifies overbought/oversold conditions and momentum changes
Included Indicators:
• RSI (14): Relative Strength Index - momentum oscillator
• Stochastic (14): Compares closing price to price range
• CCI (20): Commodity Channel Index - cycle identification
• Williams %R (14): Momentum indicator similar to Stochastic
• MACD (12,26,9): Moving Average Convergence Divergence
• Momentum (10): Rate of price change
• ROC (9): Rate of Change
• Bollinger Bands (20,2): Volatility-based indicator
Signal Interpretation:
• Strong Buy (6+ points): Multiple oscillators indicate oversold conditions
• Buy (2-5 points): Moderate bullish momentum
• Neutral (-1 to 1 points): Balanced conditions
• Sell (-2 to -5 points): Moderate bearish momentum
• Strong Sell (-6+ points): Multiple oscillators indicate overbought conditions
2. Moving Averages Section
Purpose: Determines trend direction and strength
Included Indicators:
• SMA: 10, 20, 50, 100, 200 periods
• EMA: 10, 20, 50 periods
Signal Logic:
• Price >2% above MA = Strong Buy (+2)
• Price above MA = Buy (+1)
• Price below MA = Sell (-1)
• Price >2% below MA = Strong Sell (-2)
Signal Interpretation:
• Strong Buy (6+ points): Price well above multiple MAs, strong uptrend
• Buy (2-5 points): Price above most MAs, bullish trend
• Neutral (-1 to 1 points): Mixed MA signals, consolidation
• Sell (-2 to -5 points): Price below most MAs, bearish trend
• Strong Sell (-6+ points): Price well below multiple MAs, strong downtrend
3. Order Block Analysis
Purpose: Identifies institutional support/resistance levels and breakouts
How It Works:
• Detects historical levels where large orders were placed
• Monitors price behavior around these levels
• Identifies breakouts from established order blocks
Signal Types:
• BULLISH BRK (+2): Breakout above resistance order block
• BEARISH BRK (-2): Breakdown below support order block
• ABOVE SUP (+1): Price holding above support
• BELOW RES (-1): Price rejected at resistance
• NEUTRAL (0): No significant order block interaction
4. Supertrend Analysis
Purpose: Trend following indicator based on Average True Range
Parameters:
• ATR Period: 10 (default)
• ATR Multiplier: 6.0 (default)
Signal Types:
• BULLISH (+2): Price above Supertrend line
• BEARISH (-2): Price below Supertrend line
• NEUTRAL (0): Transition period
5. Trendline/Channel Analysis
Purpose: Identifies trend channels and breakout patterns
Components:
• Dynamic trendline calculation using pivot points
• Channel width based on historical volatility
• Breakout detection algorithm
Signal Types:
• UPPER BRK (+2): Breakout above upper channel
• LOWER BRK (-2): Breakdown below lower channel
• ABOVE MID (+1): Price above channel midline
• BELOW MID (-1): Price below channel midline
6. Volume Analysis
Purpose: Confirms price movements with volume data
Components:
• Volume spikes detection
• On Balance Volume (OBV)
• Volume Price Trend (VPT)
• Money Flow Index (MFI)
• Accumulation/Distribution Line
Signal Calculation: Multiple volume indicators are combined to determine institutional activity and confirm price movements.
________________________________________
Signal Interpretation
Overall Summary Signals
The indicator aggregates all component signals into an overall market sentiment:
Signal Score Range Interpretation Action
STRONG BUY 10+ Overwhelming bullish consensus Consider long positions
BUY 4-9 Moderate to strong bullish bias Look for long opportunities
NEUTRAL -3 to 3 Mixed signals, consolidation Wait for clearer direction
SELL -4 to -9 Moderate to strong bearish bias Look for short opportunities
STRONG SELL -10+ Overwhelming bearish consensus Consider short positions
Progress Bar Interpretation
• Filled bars indicate signal strength
• Green bars: Bullish signals
• Red bars: Bearish signals
• More filled bars = stronger conviction
________________________________________
Live Market Analysis Guide
Step 1: Initial Assessment
1. Check Overall Summary: Start with the main signal
2. Verify with Component Analysis: Ensure signals align
3. Look for Divergences: Identify conflicting signals
Step 2: Timeframe Analysis
1. Set Appropriate Timeframe: Use 1H for intraday, 4H/1D for swing trading
2. Multi-Timeframe Confirmation: Check higher timeframes for trend context
3. Entry Timing: Use lower timeframes for precise entry points
Step 3: Signal Confirmation Process
For Buy Signals:
1. Oscillators: Look for oversold conditions (RSI <30, Stoch <20)
2. Moving Averages: Price should be above key MAs
3. Order Blocks: Confirm bounce from support levels
4. Volume: Check for accumulation patterns
5. Supertrend: Ensure bullish trend alignment
For Sell Signals:
1. Oscillators: Look for overbought conditions (RSI >70, Stoch >80)
2. Moving Averages: Price should be below key MAs
3. Order Blocks: Confirm rejection at resistance levels
4. Volume: Check for distribution patterns
5. Supertrend: Ensure bearish trend alignment
Step 4: Risk Management Integration
1. Signal Strength Assessment: Stronger signals = larger position size
2. Stop Loss Placement: Use Order Block levels for stops
3. Take Profit Targets: Based on channel analysis and resistance levels
4. Position Sizing: Adjust based on signal confidence
________________________________________
Best Practices
Entry Strategies
1. High Conviction Entries: Wait for STRONG BUY/SELL signals
2. Confluence Trading: Look for multiple components aligning
3. Breakout Trading: Use Order Block and Trendline breakouts
4. Trend Following: Align with Supertrend direction
Risk Management
1. Never Risk More Than 2% Per Trade: Regardless of signal strength
2. Use Stop Losses: Place at invalidation levels
3. Scale Positions: Stronger signals warrant larger (but still controlled) positions
4. Diversification: Don't rely solely on one indicator
Market Conditions
1. Trending Markets: Focus on Supertrend and MA signals
2. Range-Bound Markets: Emphasize Oscillator and Order Block signals
3. High Volatility: Reduce position sizes, widen stops
4. Low Volume: Be cautious of breakout signals
Common Mistakes to Avoid
1. Signal Chasing: Don't enter after signals have already moved significantly
2. Ignoring Context: Consider overall market conditions
3. Overtrading: Wait for high-quality setups
4. Poor Risk Management: Always use appropriate position sizing
________________________________________
Limitations and Considerations
Technical Limitations
1. Lagging Nature: All technical indicators are based on historical data
2. False Signals: No indicator is 100% accurate
3. Market Regime Changes: Indicators may perform differently in various market conditions
4. Whipsaws: Possible in choppy, sideways markets
Optimal Use Cases
1. Trending Markets: Performs best in clear trending environments
2. Medium to High Volatility: Requires sufficient price movement for signals
3. Liquid Markets: Works best with adequate volume and tight spreads
4. Multiple Timeframe Analysis: Most effective when used across different timeframes
When to Use Caution
1. Major News Events: Fundamental analysis may override technical signals
2. Market Opens/Closes: Higher volatility can create false signals
3. Low Volume Periods: Signals may be less reliable
4. Holiday Trading: Reduced participation affects signal quality
________________________________________
Risk Disclaimer
IMPORTANT LEGAL DISCLAIMER FROM aiTrendview
WARNING: TRADING INVOLVES SUBSTANTIAL RISK OF LOSS
This Quantum Market Analyzer X7 indicator ("the Indicator") is provided for educational and informational purposes only. By using this indicator, you acknowledge and agree to the following terms:
No Investment Advice
• The Indicator does NOT constitute investment advice, financial advice, or trading recommendations
• All signals generated are based on historical price data and mathematical calculations
• Past performance does not guarantee future results
• No representation is made that any account will achieve profits or losses similar to those shown
Risk Acknowledgment
• TRADING CARRIES SUBSTANTIAL RISK: You may lose some or all of your invested capital
• LEVERAGE AMPLIFIES RISK: Margin trading can result in losses exceeding your initial investment
• MARKET VOLATILITY: Financial markets are inherently unpredictable and volatile
• TECHNICAL ANALYSIS LIMITATIONS: No technical indicator is infallible or guarantees profitable trades
User Responsibility
• YOU ARE SOLELY RESPONSIBLE for all trading decisions and their consequences
• CONDUCT YOUR OWN RESEARCH: Always perform independent analysis before making trading decisions
• CONSULT PROFESSIONALS: Seek advice from qualified financial advisors
• RISK MANAGEMENT: Implement appropriate risk management strategies
No Warranties
• The Indicator is provided "AS IS" without warranties of any kind
• aiTrendview makes no representations about the accuracy, reliability, or suitability of the Indicator
• Technical glitches, data feed issues, or calculation errors may occur
• The Indicator may not work as expected in all market conditions
Limitation of Liability
• aiTrendview SHALL NOT BE LIABLE for any direct, indirect, incidental, or consequential damages
• This includes but is not limited to: trading losses, missed opportunities, data inaccuracies, or system failures
• MAXIMUM LIABILITY is limited to the amount paid for the indicator (if any)
Code Usage and Distribution
• This indicator is published on TradingView in accordance with TradingView's house rules
• UNAUTHORIZED MODIFICATION or redistribution of this code is prohibited
• Users may not claim ownership of this intellectual property
• Commercial use requires explicit written permission from aiTrendview
Compliance and Regulations
• VERIFY LOCAL REGULATIONS: Ensure compliance with your jurisdiction's trading laws
• Some trading strategies may not be suitable for all investors
• Tax implications of trading are your responsibility
• Report trading activities as required by law
Specific Risk Factors
1. False Signals: The Indicator may generate incorrect buy/sell signals
2. Market Gaps: Overnight gaps can invalidate technical analysis
3. Fundamental Events: News and economic data can override technical signals
4. Liquidity Risk: Some markets may have insufficient liquidity
5. Technology Risk: Platform failures or connectivity issues may prevent order execution
Professional Trading Warning
• THIS IS NOT PROFESSIONAL TRADING SOFTWARE: Not intended for institutional or professional trading
• NO REGULATORY APPROVAL: This indicator has not been approved by any financial regulatory authority
• EDUCATIONAL PURPOSE: Designed primarily for learning technical analysis concepts
FINAL WARNING
NEVER INVEST MONEY YOU CANNOT AFFORD TO LOSE
Trading financial instruments involves significant risk. The majority of retail traders lose money. Before using this indicator in live trading:
1. Practice on paper/demo accounts extensively
2. Start with small position sizes
3. Develop a comprehensive trading plan
4. Implement strict risk management rules
5. Continuously educate yourself about market dynamics
By using the Quantum Market Analyzer X7, you acknowledge that you have read, understood, and agree to this disclaimer. You assume full responsibility for all trading decisions and their outcomes.
Contact: For questions about this disclaimer or the indicator, contact aiTrendview through official TradingView channels only.
________________________________________
This study guide and indicator are published on TradingView in compliance with TradingView's community guidelines and house rules. All users must adhere to TradingView's terms of service when using this indicator.
Document Version: 1.0
Last Updated: September 2025
Publisher: aiTrendview
________________________________________
Disclaimer from aiTrendview.com
The content provided in this blog post is for educational and training purposes only. It is not intended to be, and should not be construed as, financial, investment, or trading advice. All charting and technical analysis examples are for illustrative purposes. Trading and investing in financial markets involve substantial risk of loss and are not suitable for every individual. Before making any financial decisions, you should consult with a qualified financial professional to assess your personal financial situation.
VWAP Market Structure Signals - ALCOTRADE Pro2VWAP-anchored signals with Liquidity Sweeps, Big Trades, and Market Structure filters — with symbol-aware presets for BTC/ETH/XAU.
---
**What it is**
A VWAP-anchored decision framework that combines:
1. Regime & trend via Weekly/Daily VWAP slope and ADX
2. Liquidity Sweeps (SFP) with wick/displacement/imbalance checks
3. Pullback/Breakout triggers with retest tolerance
4. “Big Trades” using volume & |delta| z-scores
5. Market Structure with a significance filter (min break %, swing ≥ ATR×, pivot age)
6. A MASTER state with weighted scoring and hysteresis
**Why combine these**
VWAP defines fair-value & regime; SFP hunts liquidity; PB/BO captures continuation/expansion; Big Trades confirm participation; Market Structure filters weak breaks. Together they reduce noise and keep signals context-aware.
**How it works (short)**
- **Regime:** Anchor = W-VWAP (or D-VWAP / HTF-MA). Slope (bps/bar) + ADX gate signals.
- **Proximity:** Signals prefer near-VWAP or within deviation bands.
- **Triggers:** SFP (wick %, ATR share, displacement/imbalance), Pullback/Breakout with retest tolerance, Big Trades z-scores.
- **Market Structure:** BOS/ChoCH must be “significant” (break %, swing ≥ ATR×, pivot age).
- **MASTER:** Weighted ensemble (SFP/PB/BO/BT/RSI/Slope/MS) with hysteresis, one MASTER per swing, cooldown.
**Presets**
Symbol-aware presets for **BTC/ETH/XAU** with tuned thresholds per timeframe (5m, 15m, 1h, 4h): proximity to VWAP, slope, ADX, zVol/z|Delta|, retest tolerance, and cooldown — designed to keep low noise on lower TFs.
**Usage**
1. Apply on a clean chart (no extra indicators on the publish screenshot).
2. Mode = **Full** for signals, or **VWAP only** for context.
3. Pick **Preset = Auto (symbol & TF)** or select a specific BTC/ETH/XAU preset.
4. Optional filters: RSI/MACD, HTF-MA and HTF Trend.
5. Signal markers are kept minimal by default (Shape). Enable labels only if needed.
**Alerts**
- `ALCOTRADE LONG`, `ALCOTRADE SHORT` with SL/TP1/TP2 payload (JSON).
- `ALCOTRADE MASTER LONG`, `ALCOTRADE MASTER SHORT` with score/ensemble payload.
**Inputs (high-level)**
- VWAPs (D/W/M) and deviation bands, proximity % or ATR.
- Triggers: SFP, Pullback/Breakout + retest tolerance.
- Filters: Slope, ADX, RSI/MACD, HTF-MA, HTF Trend.
- Market Structure significance filter (break %, swing≥ATR×, age).
- Big Trades (z-scores on volume and |delta|).
- Presets for BTC/ETH/XAU (Auto by symbol & TF).
- Performance controls: draw last N bars, minimal markers, debug table (off by default).
**Notes & Limits**
No performance promises. Not financial advice. Works best on liquid symbols. Heavy HTF requests may add overhead — keep debug off for a clean publish and faster rendering.
---
**خلاصهٔ کاربردی (فارسی)**
این اندیکاتور چارچوب تصمیمگیری مبتنی بر **VWAP** است که **ترند/رژیم، نزدیکی به VWAP، تریگرهای SFP و Pullback/Breakout، تأیید Big Trades با z-score، فیلتر ساختار بازار با «اهمیت»، و حالت MASTER با امتیازدهی وزنی** را ترکیب میکند. برای **BTC/ETH/XAU** پریستهای هوشمند 5m تا 4h دارد. روی چارت تمیز استفاده کنید؛ «Full» برای سیگنال و «VWAP only» برای کانتکست. هشدارها LONG/SHORT/MASTER با JSON هستند.
---
**Screenshot guideline**
Publish on a clean chart (no extra indicators/labels; debug = off; markers = Shape).
---
**Tags**
VWAP, Market Structure, Liquidity, SFP, BOS, ChoCH, Pullback, Breakout, Order Flow, Volume, Delta, Z-score, Big Trades, BTC, ETH, Gold, Futures, Risk Management
For access requests and subscription details, please see my TradingView profile.
Competition Signals — GBPUSD M15 (Manual)Here’s a brief and clear rundown on how to privately share your TradingView indicator:
Quick Guide: Share a Private TradingView Indicator
1. You Need a Premium Account
Only users with a Premium TradingView subscription can publish invite-only scripts, which allow private sharing. You can identify invite-only scripts by a lock icon next to the script’s name. 
2. Publish Your Script as Invite-Only
• Open your indicator in the Pine Editor.
• Click “Publish Script”, choose “Private” visibility, then select Invite-Only as the access type. 
• After publishing, a “Manage Access” button will appear on your script page, letting you control which TradingView users can use it. 
3. Grant Access to Others
• Use the “Manage Access” section to add specific TradingView usernames.
• Those added will be able to see the script under their “Invite-Only Scripts” tab in their Indicators panel. 
4. Privacy & Control Maintained
• Invite-Only scripts are closed-source: Users can’t view or copy your code. 
• You retain full control—only those you authorize can use it.
Summary Table
Step Action
1. Premium Required Needed to publish invite-only scripts
2. Publish Invite-Only Via Pine Editor → “Publish Script” → Invite-Only
3. Manage Access Use “Manage Access” to add users
4. Users Access They access via the “Invite-Only Scripts” tab
5. Code Privacy Script is hidden; users can’t see or copy it
Let me know if you’d like help walking through these steps or setting up permissions for multiple users!
DBG X WOLONG
Overview
DBG X Wolong is a feature-rich Pine Script v5 indicator/strategy designed to provide a systematic, configurable approach to detecting trade opportunities and managing positions. This free edition combines trend detection, momentum confirmation, volatility sizing and an adaptive grid/TP system into a single workflow that is intended to add practical value beyond a simple indicator mashup
What makes this script original & useful
Integrated workflow (not a mere mashup): indicators are assigned clear roles in a pipeline — trend → momentum → volatility → scaling/exit — so their outputs interact deterministically to form signals.
Adaptive grid + ATR sizing: grid spacing and stop/TP levels adapt to market volatility via ATR, reducing arbitrary parameter dependence.
MA cloud & Braid filter: the multi-MA cloud (supporting many MA types) is used as a structural trend/range detector; the Braid filter suppresses noise and confirms stronger trend regimes.
Multi-timeframe dashboard: compact view of trend across many TFs to avoid single-TF false signals.
Conceptual workflow (how it works, high level)
Trend detection: SuperTrend + MA cloud determine the primary bias (bull/bear).
Momentum confirmation: RSI and MACD histogram confirm momentum direction or reversals.
Volatility sizing: ATR is used to calculate stop levels and to scale position sizing and grid spacing (higher ATR → wider stops & grid)
Signal gating / filter: Braid filter and multi-TF confirmation reduce false entries and ensure higher-probability setups..
Grid / TP engine: when a signal triggers, the system can scale into positions across predefined grid steps and compute TP1/TP2/TP3 based on measured move (VWAP/regression or pivot logic), with labels on chart.
Visual outputs: colorized candles, entry/stop/take labels, pullback marks and a configurable table/dashboards.
Key components & role (concise)
SuperTrend: primary trend filter and main signal trigger.
MA Cloud / Ribbon (many MA types available): structure, support/resistance, trend validation
Braid Filter: noise suppression and signal confirmation.
FRAMA / JMA / advanced MA routines: adaptive smoothing options for different market regimes.
ATR: volatility measure for dynamic stops and grid spacing.
TP Engine / Regression-VWAP logic: adaptive take profit placement and multi-level exits.
Dashboard / Multi-TF checks: present TF consensus to avoid contradictory signals.
How signals are generated (conceptual)
Primary buy: SuperTrend flips bullish + price above short SMA + braid filter confirms + multi-TF bias mostly bullish.
Primary sell: SuperTrend flips bearish + price below short SMA + braid filter confirms + multi-TF bias mostly bearish.
Reversal/pullback markers: RSI crossing thresholds with additional confirmations.
(Exact thresholds and gating are configurable in inputs.).
Inputs summary (important ones to show in the publish dialog)
Sensitivity (SuperTrend tuning): 1–20 (default 6)
MA cloud cycles & ribbon choices (8 cycle settings)
Braid filter type & strength (percent)
ATR length & ATR risk multiplier (for SL and sizing).
Dashboard: enable/position/size, show/hide signals, pullback toggles.
TP mode (pivot/regression), TP multiplier and lengths
Recommended usage & presets
Sensitivity (SuperTrend tuning): 1–20 (default 6)
MA cloud cycles & ribbon choices (8 cycle settings)
Braid filter type & strength (percent)
ATR length & ATR risk multiplier (for SL and sizing).
Dashboard: enable/position/size, show/hide signals, pullback toggles.
TP mode (pivot/regression), TP multiplier and lengths
Recommended usage & presets
Scalping: TF 1–5 minutes; sensitivity higher (8–12); use only SuperTrend + Braid filters; TP1 only.
Intraday: TF 15–60 minutes; sensitivity medium (6–8); use full grid with ATR-based stops.
Swing: TF H1–D1; sensitivity lower (4–6); enable full indicators and multi-TF confirmations.
Always backtest and demo-trade settings before using live.
Limitations & safeguards
Market conditions (thin liquidity, news) can still produce false signals; use multi-TF filter and turn off signals near major events.
This free edition is intended for learning; advanced/premium variants may include additional proprietary optimizations.
Not investment advice — use proper money management and test before trading real capital.
Backtesting & validation
Backtest over multiple symbols and regimes (trending vs ranging) to find robust settings..
Use the dashboard to visualize TF alignment and exclude signals when mismatch occurs.
Keep trade frequency reasonable to avoid overfitting small sample sets.
Publishing notes (for moderators/reviewers)
This description explains how indicators combine in a defined workflow and why each component is used; it demonstrates originality (adaptive grid + ATR-based sizing + MA cloud + Braid filter as a cohesive strategy), not just a superficial mashup.
The code exposes configurable inputs and visual outputs; the long description gives sufficient conceptual detail for users and moderators to evaluate the script without exposing proprietary implementation details.
Universal Ratio Trend Matrix [InvestorUnknown]The Universal Ratio Trend Matrix is designed for trend analysis on asset/asset ratios, supporting up to 40 different assets. Its primary purpose is to help identify which assets are outperforming others within a selection, providing a broad overview of market trends through a matrix of ratios. The indicator automatically expands the matrix based on the number of assets chosen, simplifying the process of comparing multiple assets in terms of performance.
Key features include the ability to choose from a narrow selection of indicators to perform the ratio trend analysis, allowing users to apply well-defined metrics to their comparison.
Drawback: Due to the computational intensity involved in calculating ratios across many assets, the indicator has a limitation related to loading speed. TradingView has time limits for calculations, and for users on the basic (free) plan, this could result in frequent errors due to exceeded time limits. To use the indicator effectively, users with any paid plans should run it on timeframes higher than 8h (the lowest timeframe on which it managed to load with 40 assets), as lower timeframes may not reliably load.
Indicators:
RSI_raw: Simple function to calculate the Relative Strength Index (RSI) of a source (asset price).
RSI_sma: Calculates RSI followed by a Simple Moving Average (SMA).
RSI_ema: Calculates RSI followed by an Exponential Moving Average (EMA).
CCI: Calculates the Commodity Channel Index (CCI).
Fisher: Implements the Fisher Transform to normalize prices.
Utility Functions:
f_remove_exchange_name: Strips the exchange name from asset tickers (e.g., "INDEX:BTCUSD" to "BTCUSD").
f_remove_exchange_name(simple string name) =>
string parts = str.split(name, ":")
string result = array.size(parts) > 1 ? array.get(parts, 1) : name
result
f_get_price: Retrieves the closing price of a given asset ticker using request.security().
f_constant_src: Checks if the source data is constant by comparing multiple consecutive values.
Inputs:
General settings allow users to select the number of tickers for analysis (used_assets) and choose the trend indicator (RSI, CCI, Fisher, etc.).
Table settings customize how trend scores are displayed in terms of text size, header visibility, highlighting options, and top-performing asset identification.
The script includes inputs for up to 40 assets, allowing the user to select various cryptocurrencies (e.g., BTCUSD, ETHUSD, SOLUSD) or other assets for trend analysis.
Price Arrays:
Price values for each asset are stored in variables (price_a1 to price_a40) initialized as na. These prices are updated only for the number of assets specified by the user (used_assets).
Trend scores for each asset are stored in separate arrays
// declare price variables as "na"
var float price_a1 = na, var float price_a2 = na, var float price_a3 = na, var float price_a4 = na, var float price_a5 = na
var float price_a6 = na, var float price_a7 = na, var float price_a8 = na, var float price_a9 = na, var float price_a10 = na
var float price_a11 = na, var float price_a12 = na, var float price_a13 = na, var float price_a14 = na, var float price_a15 = na
var float price_a16 = na, var float price_a17 = na, var float price_a18 = na, var float price_a19 = na, var float price_a20 = na
var float price_a21 = na, var float price_a22 = na, var float price_a23 = na, var float price_a24 = na, var float price_a25 = na
var float price_a26 = na, var float price_a27 = na, var float price_a28 = na, var float price_a29 = na, var float price_a30 = na
var float price_a31 = na, var float price_a32 = na, var float price_a33 = na, var float price_a34 = na, var float price_a35 = na
var float price_a36 = na, var float price_a37 = na, var float price_a38 = na, var float price_a39 = na, var float price_a40 = na
// create "empty" arrays to store trend scores
var a1_array = array.new_int(40, 0), var a2_array = array.new_int(40, 0), var a3_array = array.new_int(40, 0), var a4_array = array.new_int(40, 0)
var a5_array = array.new_int(40, 0), var a6_array = array.new_int(40, 0), var a7_array = array.new_int(40, 0), var a8_array = array.new_int(40, 0)
var a9_array = array.new_int(40, 0), var a10_array = array.new_int(40, 0), var a11_array = array.new_int(40, 0), var a12_array = array.new_int(40, 0)
var a13_array = array.new_int(40, 0), var a14_array = array.new_int(40, 0), var a15_array = array.new_int(40, 0), var a16_array = array.new_int(40, 0)
var a17_array = array.new_int(40, 0), var a18_array = array.new_int(40, 0), var a19_array = array.new_int(40, 0), var a20_array = array.new_int(40, 0)
var a21_array = array.new_int(40, 0), var a22_array = array.new_int(40, 0), var a23_array = array.new_int(40, 0), var a24_array = array.new_int(40, 0)
var a25_array = array.new_int(40, 0), var a26_array = array.new_int(40, 0), var a27_array = array.new_int(40, 0), var a28_array = array.new_int(40, 0)
var a29_array = array.new_int(40, 0), var a30_array = array.new_int(40, 0), var a31_array = array.new_int(40, 0), var a32_array = array.new_int(40, 0)
var a33_array = array.new_int(40, 0), var a34_array = array.new_int(40, 0), var a35_array = array.new_int(40, 0), var a36_array = array.new_int(40, 0)
var a37_array = array.new_int(40, 0), var a38_array = array.new_int(40, 0), var a39_array = array.new_int(40, 0), var a40_array = array.new_int(40, 0)
f_get_price(simple string ticker) =>
request.security(ticker, "", close)
// Prices for each USED asset
f_get_asset_price(asset_number, ticker) =>
if (used_assets >= asset_number)
f_get_price(ticker)
else
na
// overwrite empty variables with the prices if "used_assets" is greater or equal to the asset number
if barstate.isconfirmed // use barstate.isconfirmed to avoid "na prices" and calculation errors that result in empty cells in the table
price_a1 := f_get_asset_price(1, asset1), price_a2 := f_get_asset_price(2, asset2), price_a3 := f_get_asset_price(3, asset3), price_a4 := f_get_asset_price(4, asset4)
price_a5 := f_get_asset_price(5, asset5), price_a6 := f_get_asset_price(6, asset6), price_a7 := f_get_asset_price(7, asset7), price_a8 := f_get_asset_price(8, asset8)
price_a9 := f_get_asset_price(9, asset9), price_a10 := f_get_asset_price(10, asset10), price_a11 := f_get_asset_price(11, asset11), price_a12 := f_get_asset_price(12, asset12)
price_a13 := f_get_asset_price(13, asset13), price_a14 := f_get_asset_price(14, asset14), price_a15 := f_get_asset_price(15, asset15), price_a16 := f_get_asset_price(16, asset16)
price_a17 := f_get_asset_price(17, asset17), price_a18 := f_get_asset_price(18, asset18), price_a19 := f_get_asset_price(19, asset19), price_a20 := f_get_asset_price(20, asset20)
price_a21 := f_get_asset_price(21, asset21), price_a22 := f_get_asset_price(22, asset22), price_a23 := f_get_asset_price(23, asset23), price_a24 := f_get_asset_price(24, asset24)
price_a25 := f_get_asset_price(25, asset25), price_a26 := f_get_asset_price(26, asset26), price_a27 := f_get_asset_price(27, asset27), price_a28 := f_get_asset_price(28, asset28)
price_a29 := f_get_asset_price(29, asset29), price_a30 := f_get_asset_price(30, asset30), price_a31 := f_get_asset_price(31, asset31), price_a32 := f_get_asset_price(32, asset32)
price_a33 := f_get_asset_price(33, asset33), price_a34 := f_get_asset_price(34, asset34), price_a35 := f_get_asset_price(35, asset35), price_a36 := f_get_asset_price(36, asset36)
price_a37 := f_get_asset_price(37, asset37), price_a38 := f_get_asset_price(38, asset38), price_a39 := f_get_asset_price(39, asset39), price_a40 := f_get_asset_price(40, asset40)
Universal Indicator Calculation (f_calc_score):
This function allows switching between different trend indicators (RSI, CCI, Fisher) for flexibility.
It uses a switch-case structure to calculate the indicator score, where a positive trend is denoted by 1 and a negative trend by 0. Each indicator has its own logic to determine whether the asset is trending up or down.
// use switch to allow "universality" in indicator selection
f_calc_score(source, trend_indicator, int_1, int_2) =>
int score = na
if (not f_constant_src(source)) and source > 0.0 // Skip if you are using the same assets for ratio (for example BTC/BTC)
x = switch trend_indicator
"RSI (Raw)" => RSI_raw(source, int_1)
"RSI (SMA)" => RSI_sma(source, int_1, int_2)
"RSI (EMA)" => RSI_ema(source, int_1, int_2)
"CCI" => CCI(source, int_1)
"Fisher" => Fisher(source, int_1)
y = switch trend_indicator
"RSI (Raw)" => x > 50 ? 1 : 0
"RSI (SMA)" => x > 50 ? 1 : 0
"RSI (EMA)" => x > 50 ? 1 : 0
"CCI" => x > 0 ? 1 : 0
"Fisher" => x > x ? 1 : 0
score := y
else
score := 0
score
Array Setting Function (f_array_set):
This function populates an array with scores calculated for each asset based on a base price (p_base) divided by the prices of the individual assets.
It processes multiple assets (up to 40), calling the f_calc_score function for each.
// function to set values into the arrays
f_array_set(a_array, p_base) =>
array.set(a_array, 0, f_calc_score(p_base / price_a1, trend_indicator, int_1, int_2))
array.set(a_array, 1, f_calc_score(p_base / price_a2, trend_indicator, int_1, int_2))
array.set(a_array, 2, f_calc_score(p_base / price_a3, trend_indicator, int_1, int_2))
array.set(a_array, 3, f_calc_score(p_base / price_a4, trend_indicator, int_1, int_2))
array.set(a_array, 4, f_calc_score(p_base / price_a5, trend_indicator, int_1, int_2))
array.set(a_array, 5, f_calc_score(p_base / price_a6, trend_indicator, int_1, int_2))
array.set(a_array, 6, f_calc_score(p_base / price_a7, trend_indicator, int_1, int_2))
array.set(a_array, 7, f_calc_score(p_base / price_a8, trend_indicator, int_1, int_2))
array.set(a_array, 8, f_calc_score(p_base / price_a9, trend_indicator, int_1, int_2))
array.set(a_array, 9, f_calc_score(p_base / price_a10, trend_indicator, int_1, int_2))
array.set(a_array, 10, f_calc_score(p_base / price_a11, trend_indicator, int_1, int_2))
array.set(a_array, 11, f_calc_score(p_base / price_a12, trend_indicator, int_1, int_2))
array.set(a_array, 12, f_calc_score(p_base / price_a13, trend_indicator, int_1, int_2))
array.set(a_array, 13, f_calc_score(p_base / price_a14, trend_indicator, int_1, int_2))
array.set(a_array, 14, f_calc_score(p_base / price_a15, trend_indicator, int_1, int_2))
array.set(a_array, 15, f_calc_score(p_base / price_a16, trend_indicator, int_1, int_2))
array.set(a_array, 16, f_calc_score(p_base / price_a17, trend_indicator, int_1, int_2))
array.set(a_array, 17, f_calc_score(p_base / price_a18, trend_indicator, int_1, int_2))
array.set(a_array, 18, f_calc_score(p_base / price_a19, trend_indicator, int_1, int_2))
array.set(a_array, 19, f_calc_score(p_base / price_a20, trend_indicator, int_1, int_2))
array.set(a_array, 20, f_calc_score(p_base / price_a21, trend_indicator, int_1, int_2))
array.set(a_array, 21, f_calc_score(p_base / price_a22, trend_indicator, int_1, int_2))
array.set(a_array, 22, f_calc_score(p_base / price_a23, trend_indicator, int_1, int_2))
array.set(a_array, 23, f_calc_score(p_base / price_a24, trend_indicator, int_1, int_2))
array.set(a_array, 24, f_calc_score(p_base / price_a25, trend_indicator, int_1, int_2))
array.set(a_array, 25, f_calc_score(p_base / price_a26, trend_indicator, int_1, int_2))
array.set(a_array, 26, f_calc_score(p_base / price_a27, trend_indicator, int_1, int_2))
array.set(a_array, 27, f_calc_score(p_base / price_a28, trend_indicator, int_1, int_2))
array.set(a_array, 28, f_calc_score(p_base / price_a29, trend_indicator, int_1, int_2))
array.set(a_array, 29, f_calc_score(p_base / price_a30, trend_indicator, int_1, int_2))
array.set(a_array, 30, f_calc_score(p_base / price_a31, trend_indicator, int_1, int_2))
array.set(a_array, 31, f_calc_score(p_base / price_a32, trend_indicator, int_1, int_2))
array.set(a_array, 32, f_calc_score(p_base / price_a33, trend_indicator, int_1, int_2))
array.set(a_array, 33, f_calc_score(p_base / price_a34, trend_indicator, int_1, int_2))
array.set(a_array, 34, f_calc_score(p_base / price_a35, trend_indicator, int_1, int_2))
array.set(a_array, 35, f_calc_score(p_base / price_a36, trend_indicator, int_1, int_2))
array.set(a_array, 36, f_calc_score(p_base / price_a37, trend_indicator, int_1, int_2))
array.set(a_array, 37, f_calc_score(p_base / price_a38, trend_indicator, int_1, int_2))
array.set(a_array, 38, f_calc_score(p_base / price_a39, trend_indicator, int_1, int_2))
array.set(a_array, 39, f_calc_score(p_base / price_a40, trend_indicator, int_1, int_2))
a_array
Conditional Array Setting (f_arrayset):
This function checks if the number of used assets is greater than or equal to a specified number before populating the arrays.
// only set values into arrays for USED assets
f_arrayset(asset_number, a_array, p_base) =>
if (used_assets >= asset_number)
f_array_set(a_array, p_base)
else
na
Main Logic
The main logic initializes arrays to store scores for each asset. Each array corresponds to one asset's performance score.
Setting Trend Values: The code calls f_arrayset for each asset, populating the respective arrays with calculated scores based on the asset prices.
Combining Arrays: A combined_array is created to hold all the scores from individual asset arrays. This array facilitates further analysis, allowing for an overview of the performance scores of all assets at once.
// create a combined array (work-around since pinescript doesn't support having array of arrays)
var combined_array = array.new_int(40 * 40, 0)
if barstate.islast
for i = 0 to 39
array.set(combined_array, i, array.get(a1_array, i))
array.set(combined_array, i + (40 * 1), array.get(a2_array, i))
array.set(combined_array, i + (40 * 2), array.get(a3_array, i))
array.set(combined_array, i + (40 * 3), array.get(a4_array, i))
array.set(combined_array, i + (40 * 4), array.get(a5_array, i))
array.set(combined_array, i + (40 * 5), array.get(a6_array, i))
array.set(combined_array, i + (40 * 6), array.get(a7_array, i))
array.set(combined_array, i + (40 * 7), array.get(a8_array, i))
array.set(combined_array, i + (40 * 8), array.get(a9_array, i))
array.set(combined_array, i + (40 * 9), array.get(a10_array, i))
array.set(combined_array, i + (40 * 10), array.get(a11_array, i))
array.set(combined_array, i + (40 * 11), array.get(a12_array, i))
array.set(combined_array, i + (40 * 12), array.get(a13_array, i))
array.set(combined_array, i + (40 * 13), array.get(a14_array, i))
array.set(combined_array, i + (40 * 14), array.get(a15_array, i))
array.set(combined_array, i + (40 * 15), array.get(a16_array, i))
array.set(combined_array, i + (40 * 16), array.get(a17_array, i))
array.set(combined_array, i + (40 * 17), array.get(a18_array, i))
array.set(combined_array, i + (40 * 18), array.get(a19_array, i))
array.set(combined_array, i + (40 * 19), array.get(a20_array, i))
array.set(combined_array, i + (40 * 20), array.get(a21_array, i))
array.set(combined_array, i + (40 * 21), array.get(a22_array, i))
array.set(combined_array, i + (40 * 22), array.get(a23_array, i))
array.set(combined_array, i + (40 * 23), array.get(a24_array, i))
array.set(combined_array, i + (40 * 24), array.get(a25_array, i))
array.set(combined_array, i + (40 * 25), array.get(a26_array, i))
array.set(combined_array, i + (40 * 26), array.get(a27_array, i))
array.set(combined_array, i + (40 * 27), array.get(a28_array, i))
array.set(combined_array, i + (40 * 28), array.get(a29_array, i))
array.set(combined_array, i + (40 * 29), array.get(a30_array, i))
array.set(combined_array, i + (40 * 30), array.get(a31_array, i))
array.set(combined_array, i + (40 * 31), array.get(a32_array, i))
array.set(combined_array, i + (40 * 32), array.get(a33_array, i))
array.set(combined_array, i + (40 * 33), array.get(a34_array, i))
array.set(combined_array, i + (40 * 34), array.get(a35_array, i))
array.set(combined_array, i + (40 * 35), array.get(a36_array, i))
array.set(combined_array, i + (40 * 36), array.get(a37_array, i))
array.set(combined_array, i + (40 * 37), array.get(a38_array, i))
array.set(combined_array, i + (40 * 38), array.get(a39_array, i))
array.set(combined_array, i + (40 * 39), array.get(a40_array, i))
Calculating Sums: A separate array_sums is created to store the total score for each asset by summing the values of their respective score arrays. This allows for easy comparison of overall performance.
Ranking Assets: The final part of the code ranks the assets based on their total scores stored in array_sums. It assigns a rank to each asset, where the asset with the highest score receives the highest rank.
// create array for asset RANK based on array.sum
var ranks = array.new_int(used_assets, 0)
// for loop that calculates the rank of each asset
if barstate.islast
for i = 0 to (used_assets - 1)
int rank = 1
for x = 0 to (used_assets - 1)
if i != x
if array.get(array_sums, i) < array.get(array_sums, x)
rank := rank + 1
array.set(ranks, i, rank)
Dynamic Table Creation
Initialization: The table is initialized with a base structure that includes headers for asset names, scores, and ranks. The headers are set to remain constant, ensuring clarity for users as they interpret the displayed data.
Data Population: As scores are calculated for each asset, the corresponding values are dynamically inserted into the table. This is achieved through a loop that iterates over the scores and ranks stored in the combined_array and array_sums, respectively.
Automatic Extending Mechanism
Variable Asset Count: The code checks the number of assets defined by the user. Instead of hardcoding the number of rows in the table, it uses a variable to determine the extent of the data that needs to be displayed. This allows the table to expand or contract based on the number of assets being analyzed.
Dynamic Row Generation: Within the loop that populates the table, the code appends new rows for each asset based on the current asset count. The structure of each row includes the asset name, its score, and its rank, ensuring that the table remains consistent regardless of how many assets are involved.
// Automatically extending table based on the number of used assets
var table table = table.new(position.bottom_center, 50, 50, color.new(color.black, 100), color.white, 3, color.white, 1)
if barstate.islast
if not hide_head
table.cell(table, 0, 0, "Universal Ratio Trend Matrix", text_color = color.white, bgcolor = #010c3b, text_size = fontSize)
table.merge_cells(table, 0, 0, used_assets + 3, 0)
if not hide_inps
table.cell(table, 0, 1,
text = "Inputs: You are using " + str.tostring(trend_indicator) + ", which takes: " + str.tostring(f_get_input(trend_indicator)),
text_color = color.white, text_size = fontSize), table.merge_cells(table, 0, 1, used_assets + 3, 1)
table.cell(table, 0, 2, "Assets", text_color = color.white, text_size = fontSize, bgcolor = #010c3b)
for x = 0 to (used_assets - 1)
table.cell(table, x + 1, 2, text = str.tostring(array.get(assets, x)), text_color = color.white, bgcolor = #010c3b, text_size = fontSize)
table.cell(table, 0, x + 3, text = str.tostring(array.get(assets, x)), text_color = color.white, bgcolor = f_asset_col(array.get(ranks, x)), text_size = fontSize)
for r = 0 to (used_assets - 1)
for c = 0 to (used_assets - 1)
table.cell(table, c + 1, r + 3, text = str.tostring(array.get(combined_array, c + (r * 40))),
text_color = hl_type == "Text" ? f_get_col(array.get(combined_array, c + (r * 40))) : color.white, text_size = fontSize,
bgcolor = hl_type == "Background" ? f_get_col(array.get(combined_array, c + (r * 40))) : na)
for x = 0 to (used_assets - 1)
table.cell(table, x + 1, x + 3, "", bgcolor = #010c3b)
table.cell(table, used_assets + 1, 2, "", bgcolor = #010c3b)
for x = 0 to (used_assets - 1)
table.cell(table, used_assets + 1, x + 3, "==>", text_color = color.white)
table.cell(table, used_assets + 2, 2, "SUM", text_color = color.white, text_size = fontSize, bgcolor = #010c3b)
table.cell(table, used_assets + 3, 2, "RANK", text_color = color.white, text_size = fontSize, bgcolor = #010c3b)
for x = 0 to (used_assets - 1)
table.cell(table, used_assets + 2, x + 3,
text = str.tostring(array.get(array_sums, x)),
text_color = color.white, text_size = fontSize,
bgcolor = f_highlight_sum(array.get(array_sums, x), array.get(ranks, x)))
table.cell(table, used_assets + 3, x + 3,
text = str.tostring(array.get(ranks, x)),
text_color = color.white, text_size = fontSize,
bgcolor = f_highlight_rank(array.get(ranks, x)))
Markov Chain [3D] | FractalystWhat exactly is a Markov Chain?
This indicator uses a Markov Chain model to analyze, quantify, and visualize the transitions between market regimes (Bull, Bear, Neutral) on your chart. It dynamically detects these regimes in real-time, calculates transition probabilities, and displays them as animated 3D spheres and arrows, giving traders intuitive insight into current and future market conditions.
How does a Markov Chain work, and how should I read this spheres-and-arrows diagram?
Think of three weather modes: Sunny, Rainy, Cloudy.
Each sphere is one mode. The loop on a sphere means “stay the same next step” (e.g., Sunny again tomorrow).
The arrows leaving a sphere show where things usually go next if they change (e.g., Sunny moving to Cloudy).
Some paths matter more than others. A more prominent loop means the current mode tends to persist. A more prominent outgoing arrow means a change to that destination is the usual next step.
Direction isn’t symmetric: moving Sunny→Cloudy can behave differently than Cloudy→Sunny.
Now relabel the spheres to markets: Bull, Bear, Neutral.
Spheres: market regimes (uptrend, downtrend, range).
Self‑loop: tendency for the current regime to continue on the next bar.
Arrows: the most common next regime if a switch happens.
How to read: Start at the sphere that matches current bar state. If the loop stands out, expect continuation. If one outgoing path stands out, that switch is the typical next step. Opposite directions can differ (Bear→Neutral doesn’t have to match Neutral→Bear).
What states and transitions are shown?
The three market states visualized are:
Bullish (Bull): Upward or strong-market regime.
Bearish (Bear): Downward or weak-market regime.
Neutral: Sideways or range-bound regime.
Bidirectional animated arrows and probability labels show how likely the market is to move from one regime to another (e.g., Bull → Bear or Neutral → Bull).
How does the regime detection system work?
You can use either built-in price returns (based on adaptive Z-score normalization) or supply three custom indicators (such as volume, oscillators, etc.).
Values are statistically normalized (Z-scored) over a configurable lookback period.
The normalized outputs are classified into Bull, Bear, or Neutral zones.
If using three indicators, their regime signals are averaged and smoothed for robustness.
How are transition probabilities calculated?
On every confirmed bar, the algorithm tracks the sequence of detected market states, then builds a rolling window of transitions.
The code maintains a transition count matrix for all regime pairs (e.g., Bull → Bear).
Transition probabilities are extracted for each possible state change using Laplace smoothing for numerical stability, and frequently updated in real-time.
What is unique about the visualization?
3D animated spheres represent each regime and change visually when active.
Animated, bidirectional arrows reveal transition probabilities and allow you to see both dominant and less likely regime flows.
Particles (moving dots) animate along the arrows, enhancing the perception of regime flow direction and speed.
All elements dynamically update with each new price bar, providing a live market map in an intuitive, engaging format.
Can I use custom indicators for regime classification?
Yes! Enable the "Custom Indicators" switch and select any three chart series as inputs. These will be normalized and combined (each with equal weight), broadening the regime classification beyond just price-based movement.
What does the “Lookback Period” control?
Lookback Period (default: 100) sets how much historical data builds the probability matrix. Shorter periods adapt faster to regime changes but may be noisier. Longer periods are more stable but slower to adapt.
How is this different from a Hidden Markov Model (HMM)?
It sets the window for both regime detection and probability calculations. Lower values make the system more reactive, but potentially noisier. Higher values smooth estimates and make the system more robust.
How is this Markov Chain different from a Hidden Markov Model (HMM)?
Markov Chain (as here): All market regimes (Bull, Bear, Neutral) are directly observable on the chart. The transition matrix is built from actual detected regimes, keeping the model simple and interpretable.
Hidden Markov Model: The actual regimes are unobservable ("hidden") and must be inferred from market output or indicator "emissions" using statistical learning algorithms. HMMs are more complex, can capture more subtle structure, but are harder to visualize and require additional machine learning steps for training.
A standard Markov Chain models transitions between observable states using a simple transition matrix, while a Hidden Markov Model assumes the true states are hidden (latent) and must be inferred from observable “emissions” like price or volume data. In practical terms, a Markov Chain is transparent and easier to implement and interpret; an HMM is more expressive but requires statistical inference to estimate hidden states from data.
Markov Chain: states are observable; you directly count or estimate transition probabilities between visible states. This makes it simpler, faster, and easier to validate and tune.
HMM: states are hidden; you only observe emissions generated by those latent states. Learning involves machine learning/statistical algorithms (commonly Baum–Welch/EM for training and Viterbi for decoding) to infer both the transition dynamics and the most likely hidden state sequence from data.
How does the indicator avoid “repainting” or look-ahead bias?
All regime changes and matrix updates happen only on confirmed (closed) bars, so no future data is leaked, ensuring reliable real-time operation.
Are there practical tuning tips?
Tune the Lookback Period for your asset/timeframe: shorter for fast markets, longer for stability.
Use custom indicators if your asset has unique regime drivers.
Watch for rapid changes in transition probabilities as early warning of a possible regime shift.
Who is this indicator for?
Quants and quantitative researchers exploring probabilistic market modeling, especially those interested in regime-switching dynamics and Markov models.
Programmers and system developers who need a probabilistic regime filter for systematic and algorithmic backtesting:
The Markov Chain indicator is ideally suited for programmatic integration via its bias output (1 = Bull, 0 = Neutral, -1 = Bear).
Although the visualization is engaging, the core output is designed for automated, rules-based workflows—not for discretionary/manual trading decisions.
Developers can connect the indicator’s output directly to their Pine Script logic (using input.source()), allowing rapid and robust backtesting of regime-based strategies.
It acts as a plug-and-play regime filter: simply plug the bias output into your entry/exit logic, and you have a scientifically robust, probabilistically-derived signal for filtering, timing, position sizing, or risk regimes.
The MC's output is intentionally "trinary" (1/0/-1), focusing on clear regime states for unambiguous decision-making in code. If you require nuanced, multi-probability or soft-label state vectors, consider expanding the indicator or stacking it with a probability-weighted logic layer in your scripting.
Because it avoids subjectivity, this approach is optimal for systematic quants, algo developers building backtested, repeatable strategies based on probabilistic regime analysis.
What's the mathematical foundation behind this?
The mathematical foundation behind this Markov Chain indicator—and probabilistic regime detection in finance—draws from two principal models: the (standard) Markov Chain and the Hidden Markov Model (HMM).
How to use this indicator programmatically?
The Markov Chain indicator automatically exports a bias value (+1 for Bullish, -1 for Bearish, 0 for Neutral) as a plot visible in the Data Window. This allows you to integrate its regime signal into your own scripts and strategies for backtesting, automation, or live trading.
Step-by-Step Integration with Pine Script (input.source)
Add the Markov Chain indicator to your chart.
This must be done first, since your custom script will "pull" the bias signal from the indicator's plot.
In your strategy, create an input using input.source()
Example:
//@version=5
strategy("MC Bias Strategy Example")
mcBias = input.source(close, "MC Bias Source")
After saving, go to your script’s settings. For the “MC Bias Source” input, select the plot/output of the Markov Chain indicator (typically its bias plot).
Use the bias in your trading logic
Example (long only on Bull, flat otherwise):
if mcBias == 1
strategy.entry("Long", strategy.long)
else
strategy.close("Long")
For more advanced workflows, combine mcBias with additional filters or trailing stops.
How does this work behind-the-scenes?
TradingView’s input.source() lets you use any plot from another indicator as a real-time, “live” data feed in your own script (source).
The selected bias signal is available to your Pine code as a variable, enabling logical decisions based on regime (trend-following, mean-reversion, etc.).
This enables powerful strategy modularity : decouple regime detection from entry/exit logic, allowing fast experimentation without rewriting core signal code.
Integrating 45+ Indicators with Your Markov Chain — How & Why
The Enhanced Custom Indicators Export script exports a massive suite of over 45 technical indicators—ranging from classic momentum (RSI, MACD, Stochastic, etc.) to trend, volume, volatility, and oscillator tools—all pre-calculated, centered/scaled, and available as plots.
// Enhanced Custom Indicators Export - 45 Technical Indicators
// Comprehensive technical analysis suite for advanced market regime detection
//@version=6
indicator('Enhanced Custom Indicators Export | Fractalyst', shorttitle='Enhanced CI Export', overlay=false, scale=scale.right, max_labels_count=500, max_lines_count=500)
// |----- Input Parameters -----| //
momentum_group = "Momentum Indicators"
trend_group = "Trend Indicators"
volume_group = "Volume Indicators"
volatility_group = "Volatility Indicators"
oscillator_group = "Oscillator Indicators"
display_group = "Display Settings"
// Common lengths
length_14 = input.int(14, "Standard Length (14)", minval=1, maxval=100, group=momentum_group)
length_20 = input.int(20, "Medium Length (20)", minval=1, maxval=200, group=trend_group)
length_50 = input.int(50, "Long Length (50)", minval=1, maxval=200, group=trend_group)
// Display options
show_table = input.bool(true, "Show Values Table", group=display_group)
table_size = input.string("Small", "Table Size", options= , group=display_group)
// |----- MOMENTUM INDICATORS (15 indicators) -----| //
// 1. RSI (Relative Strength Index)
rsi_14 = ta.rsi(close, length_14)
rsi_centered = rsi_14 - 50
// 2. Stochastic Oscillator
stoch_k = ta.stoch(close, high, low, length_14)
stoch_d = ta.sma(stoch_k, 3)
stoch_centered = stoch_k - 50
// 3. Williams %R
williams_r = ta.stoch(close, high, low, length_14) - 100
// 4. MACD (Moving Average Convergence Divergence)
= ta.macd(close, 12, 26, 9)
// 5. Momentum (Rate of Change)
momentum = ta.mom(close, length_14)
momentum_pct = (momentum / close ) * 100
// 6. Rate of Change (ROC)
roc = ta.roc(close, length_14)
// 7. Commodity Channel Index (CCI)
cci = ta.cci(close, length_20)
// 8. Money Flow Index (MFI)
mfi = ta.mfi(close, length_14)
mfi_centered = mfi - 50
// 9. Awesome Oscillator (AO)
ao = ta.sma(hl2, 5) - ta.sma(hl2, 34)
// 10. Accelerator Oscillator (AC)
ac = ao - ta.sma(ao, 5)
// 11. Chande Momentum Oscillator (CMO)
cmo = ta.cmo(close, length_14)
// 12. Detrended Price Oscillator (DPO)
dpo = close - ta.sma(close, length_20)
// 13. Price Oscillator (PPO)
ppo = ta.sma(close, 12) - ta.sma(close, 26)
ppo_pct = (ppo / ta.sma(close, 26)) * 100
// 14. TRIX
trix_ema1 = ta.ema(close, length_14)
trix_ema2 = ta.ema(trix_ema1, length_14)
trix_ema3 = ta.ema(trix_ema2, length_14)
trix = ta.roc(trix_ema3, 1) * 10000
// 15. Klinger Oscillator
klinger = ta.ema(volume * (high + low + close) / 3, 34) - ta.ema(volume * (high + low + close) / 3, 55)
// 16. Fisher Transform
fisher_hl2 = 0.5 * (hl2 - ta.lowest(hl2, 10)) / (ta.highest(hl2, 10) - ta.lowest(hl2, 10)) - 0.25
fisher = 0.5 * math.log((1 + fisher_hl2) / (1 - fisher_hl2))
// 17. Stochastic RSI
stoch_rsi = ta.stoch(rsi_14, rsi_14, rsi_14, length_14)
stoch_rsi_centered = stoch_rsi - 50
// 18. Relative Vigor Index (RVI)
rvi_num = ta.swma(close - open)
rvi_den = ta.swma(high - low)
rvi = rvi_den != 0 ? rvi_num / rvi_den : 0
// 19. Balance of Power (BOP)
bop = (close - open) / (high - low)
// |----- TREND INDICATORS (10 indicators) -----| //
// 20. Simple Moving Average Momentum
sma_20 = ta.sma(close, length_20)
sma_momentum = ((close - sma_20) / sma_20) * 100
// 21. Exponential Moving Average Momentum
ema_20 = ta.ema(close, length_20)
ema_momentum = ((close - ema_20) / ema_20) * 100
// 22. Parabolic SAR
sar = ta.sar(0.02, 0.02, 0.2)
sar_trend = close > sar ? 1 : -1
// 23. Linear Regression Slope
lr_slope = ta.linreg(close, length_20, 0) - ta.linreg(close, length_20, 1)
// 24. Moving Average Convergence (MAC)
mac = ta.sma(close, 10) - ta.sma(close, 30)
// 25. Trend Intensity Index (TII)
tii_sum = 0.0
for i = 1 to length_20
tii_sum += close > close ? 1 : 0
tii = (tii_sum / length_20) * 100
// 26. Ichimoku Cloud Components
ichimoku_tenkan = (ta.highest(high, 9) + ta.lowest(low, 9)) / 2
ichimoku_kijun = (ta.highest(high, 26) + ta.lowest(low, 26)) / 2
ichimoku_signal = ichimoku_tenkan > ichimoku_kijun ? 1 : -1
// 27. MESA Adaptive Moving Average (MAMA)
mama_alpha = 2.0 / (length_20 + 1)
mama = ta.ema(close, length_20)
mama_momentum = ((close - mama) / mama) * 100
// 28. Zero Lag Exponential Moving Average (ZLEMA)
zlema_lag = math.round((length_20 - 1) / 2)
zlema_data = close + (close - close )
zlema = ta.ema(zlema_data, length_20)
zlema_momentum = ((close - zlema) / zlema) * 100
// |----- VOLUME INDICATORS (6 indicators) -----| //
// 29. On-Balance Volume (OBV)
obv = ta.obv
// 30. Volume Rate of Change (VROC)
vroc = ta.roc(volume, length_14)
// 31. Price Volume Trend (PVT)
pvt = ta.pvt
// 32. Negative Volume Index (NVI)
nvi = 0.0
nvi := volume < volume ? nvi + ((close - close ) / close ) * nvi : nvi
// 33. Positive Volume Index (PVI)
pvi = 0.0
pvi := volume > volume ? pvi + ((close - close ) / close ) * pvi : pvi
// 34. Volume Oscillator
vol_osc = ta.sma(volume, 5) - ta.sma(volume, 10)
// 35. Ease of Movement (EOM)
eom_distance = high - low
eom_box_height = volume / 1000000
eom = eom_box_height != 0 ? eom_distance / eom_box_height : 0
eom_sma = ta.sma(eom, length_14)
// 36. Force Index
force_index = volume * (close - close )
force_index_sma = ta.sma(force_index, length_14)
// |----- VOLATILITY INDICATORS (10 indicators) -----| //
// 37. Average True Range (ATR)
atr = ta.atr(length_14)
atr_pct = (atr / close) * 100
// 38. Bollinger Bands Position
bb_basis = ta.sma(close, length_20)
bb_dev = 2.0 * ta.stdev(close, length_20)
bb_upper = bb_basis + bb_dev
bb_lower = bb_basis - bb_dev
bb_position = bb_dev != 0 ? (close - bb_basis) / bb_dev : 0
bb_width = bb_dev != 0 ? (bb_upper - bb_lower) / bb_basis * 100 : 0
// 39. Keltner Channels Position
kc_basis = ta.ema(close, length_20)
kc_range = ta.ema(ta.tr, length_20)
kc_upper = kc_basis + (2.0 * kc_range)
kc_lower = kc_basis - (2.0 * kc_range)
kc_position = kc_range != 0 ? (close - kc_basis) / kc_range : 0
// 40. Donchian Channels Position
dc_upper = ta.highest(high, length_20)
dc_lower = ta.lowest(low, length_20)
dc_basis = (dc_upper + dc_lower) / 2
dc_position = (dc_upper - dc_lower) != 0 ? (close - dc_basis) / (dc_upper - dc_lower) : 0
// 41. Standard Deviation
std_dev = ta.stdev(close, length_20)
std_dev_pct = (std_dev / close) * 100
// 42. Relative Volatility Index (RVI)
rvi_up = ta.stdev(close > close ? close : 0, length_14)
rvi_down = ta.stdev(close < close ? close : 0, length_14)
rvi_total = rvi_up + rvi_down
rvi_volatility = rvi_total != 0 ? (rvi_up / rvi_total) * 100 : 50
// 43. Historical Volatility
hv_returns = math.log(close / close )
hv = ta.stdev(hv_returns, length_20) * math.sqrt(252) * 100
// 44. Garman-Klass Volatility
gk_vol = math.log(high/low) * math.log(high/low) - (2*math.log(2)-1) * math.log(close/open) * math.log(close/open)
gk_volatility = math.sqrt(ta.sma(gk_vol, length_20)) * 100
// 45. Parkinson Volatility
park_vol = math.log(high/low) * math.log(high/low)
parkinson = math.sqrt(ta.sma(park_vol, length_20) / (4 * math.log(2))) * 100
// 46. Rogers-Satchell Volatility
rs_vol = math.log(high/close) * math.log(high/open) + math.log(low/close) * math.log(low/open)
rogers_satchell = math.sqrt(ta.sma(rs_vol, length_20)) * 100
// |----- OSCILLATOR INDICATORS (5 indicators) -----| //
// 47. Elder Ray Index
elder_bull = high - ta.ema(close, 13)
elder_bear = low - ta.ema(close, 13)
elder_power = elder_bull + elder_bear
// 48. Schaff Trend Cycle (STC)
stc_macd = ta.ema(close, 23) - ta.ema(close, 50)
stc_k = ta.stoch(stc_macd, stc_macd, stc_macd, 10)
stc_d = ta.ema(stc_k, 3)
stc = ta.stoch(stc_d, stc_d, stc_d, 10)
// 49. Coppock Curve
coppock_roc1 = ta.roc(close, 14)
coppock_roc2 = ta.roc(close, 11)
coppock = ta.wma(coppock_roc1 + coppock_roc2, 10)
// 50. Know Sure Thing (KST)
kst_roc1 = ta.roc(close, 10)
kst_roc2 = ta.roc(close, 15)
kst_roc3 = ta.roc(close, 20)
kst_roc4 = ta.roc(close, 30)
kst = ta.sma(kst_roc1, 10) + 2*ta.sma(kst_roc2, 10) + 3*ta.sma(kst_roc3, 10) + 4*ta.sma(kst_roc4, 15)
// 51. Percentage Price Oscillator (PPO)
ppo_line = ((ta.ema(close, 12) - ta.ema(close, 26)) / ta.ema(close, 26)) * 100
ppo_signal = ta.ema(ppo_line, 9)
ppo_histogram = ppo_line - ppo_signal
// |----- PLOT MAIN INDICATORS -----| //
// Plot key momentum indicators
plot(rsi_centered, title="01_RSI_Centered", color=color.purple, linewidth=1)
plot(stoch_centered, title="02_Stoch_Centered", color=color.blue, linewidth=1)
plot(williams_r, title="03_Williams_R", color=color.red, linewidth=1)
plot(macd_histogram, title="04_MACD_Histogram", color=color.orange, linewidth=1)
plot(cci, title="05_CCI", color=color.green, linewidth=1)
// Plot trend indicators
plot(sma_momentum, title="06_SMA_Momentum", color=color.navy, linewidth=1)
plot(ema_momentum, title="07_EMA_Momentum", color=color.maroon, linewidth=1)
plot(sar_trend, title="08_SAR_Trend", color=color.teal, linewidth=1)
plot(lr_slope, title="09_LR_Slope", color=color.lime, linewidth=1)
plot(mac, title="10_MAC", color=color.fuchsia, linewidth=1)
// Plot volatility indicators
plot(atr_pct, title="11_ATR_Pct", color=color.yellow, linewidth=1)
plot(bb_position, title="12_BB_Position", color=color.aqua, linewidth=1)
plot(kc_position, title="13_KC_Position", color=color.olive, linewidth=1)
plot(std_dev_pct, title="14_StdDev_Pct", color=color.silver, linewidth=1)
plot(bb_width, title="15_BB_Width", color=color.gray, linewidth=1)
// Plot volume indicators
plot(vroc, title="16_VROC", color=color.blue, linewidth=1)
plot(eom_sma, title="17_EOM", color=color.red, linewidth=1)
plot(vol_osc, title="18_Vol_Osc", color=color.green, linewidth=1)
plot(force_index_sma, title="19_Force_Index", color=color.orange, linewidth=1)
plot(obv, title="20_OBV", color=color.purple, linewidth=1)
// Plot additional oscillators
plot(ao, title="21_Awesome_Osc", color=color.navy, linewidth=1)
plot(cmo, title="22_CMO", color=color.maroon, linewidth=1)
plot(dpo, title="23_DPO", color=color.teal, linewidth=1)
plot(trix, title="24_TRIX", color=color.lime, linewidth=1)
plot(fisher, title="25_Fisher", color=color.fuchsia, linewidth=1)
// Plot more momentum indicators
plot(mfi_centered, title="26_MFI_Centered", color=color.yellow, linewidth=1)
plot(ac, title="27_AC", color=color.aqua, linewidth=1)
plot(ppo_pct, title="28_PPO_Pct", color=color.olive, linewidth=1)
plot(stoch_rsi_centered, title="29_StochRSI_Centered", color=color.silver, linewidth=1)
plot(klinger, title="30_Klinger", color=color.gray, linewidth=1)
// Plot trend continuation
plot(tii, title="31_TII", color=color.blue, linewidth=1)
plot(ichimoku_signal, title="32_Ichimoku_Signal", color=color.red, linewidth=1)
plot(mama_momentum, title="33_MAMA_Momentum", color=color.green, linewidth=1)
plot(zlema_momentum, title="34_ZLEMA_Momentum", color=color.orange, linewidth=1)
plot(bop, title="35_BOP", color=color.purple, linewidth=1)
// Plot volume continuation
plot(nvi, title="36_NVI", color=color.navy, linewidth=1)
plot(pvi, title="37_PVI", color=color.maroon, linewidth=1)
plot(momentum_pct, title="38_Momentum_Pct", color=color.teal, linewidth=1)
plot(roc, title="39_ROC", color=color.lime, linewidth=1)
plot(rvi, title="40_RVI", color=color.fuchsia, linewidth=1)
// Plot volatility continuation
plot(dc_position, title="41_DC_Position", color=color.yellow, linewidth=1)
plot(rvi_volatility, title="42_RVI_Volatility", color=color.aqua, linewidth=1)
plot(hv, title="43_Historical_Vol", color=color.olive, linewidth=1)
plot(gk_volatility, title="44_GK_Volatility", color=color.silver, linewidth=1)
plot(parkinson, title="45_Parkinson_Vol", color=color.gray, linewidth=1)
// Plot final oscillators
plot(rogers_satchell, title="46_RS_Volatility", color=color.blue, linewidth=1)
plot(elder_power, title="47_Elder_Power", color=color.red, linewidth=1)
plot(stc, title="48_STC", color=color.green, linewidth=1)
plot(coppock, title="49_Coppock", color=color.orange, linewidth=1)
plot(kst, title="50_KST", color=color.purple, linewidth=1)
// Plot final indicators
plot(ppo_histogram, title="51_PPO_Histogram", color=color.navy, linewidth=1)
plot(pvt, title="52_PVT", color=color.maroon, linewidth=1)
// |----- Reference Lines -----| //
hline(0, "Zero Line", color=color.gray, linestyle=hline.style_dashed, linewidth=1)
hline(50, "Midline", color=color.gray, linestyle=hline.style_dotted, linewidth=1)
hline(-50, "Lower Midline", color=color.gray, linestyle=hline.style_dotted, linewidth=1)
hline(25, "Upper Threshold", color=color.gray, linestyle=hline.style_dotted, linewidth=1)
hline(-25, "Lower Threshold", color=color.gray, linestyle=hline.style_dotted, linewidth=1)
// |----- Enhanced Information Table -----| //
if show_table and barstate.islast
table_position = position.top_right
table_text_size = table_size == "Tiny" ? size.tiny : table_size == "Small" ? size.small : size.normal
var table info_table = table.new(table_position, 3, 18, bgcolor=color.new(color.white, 85), border_width=1, border_color=color.gray)
// Headers
table.cell(info_table, 0, 0, 'Category', text_color=color.black, text_size=table_text_size, bgcolor=color.new(color.blue, 70))
table.cell(info_table, 1, 0, 'Indicator', text_color=color.black, text_size=table_text_size, bgcolor=color.new(color.blue, 70))
table.cell(info_table, 2, 0, 'Value', text_color=color.black, text_size=table_text_size, bgcolor=color.new(color.blue, 70))
// Key Momentum Indicators
table.cell(info_table, 0, 1, 'MOMENTUM', text_color=color.purple, text_size=table_text_size, bgcolor=color.new(color.purple, 90))
table.cell(info_table, 1, 1, 'RSI Centered', text_color=color.purple, text_size=table_text_size)
table.cell(info_table, 2, 1, str.tostring(rsi_centered, '0.00'), text_color=color.purple, text_size=table_text_size)
table.cell(info_table, 0, 2, '', text_color=color.blue, text_size=table_text_size)
table.cell(info_table, 1, 2, 'Stoch Centered', text_color=color.blue, text_size=table_text_size)
table.cell(info_table, 2, 2, str.tostring(stoch_centered, '0.00'), text_color=color.blue, text_size=table_text_size)
table.cell(info_table, 0, 3, '', text_color=color.red, text_size=table_text_size)
table.cell(info_table, 1, 3, 'Williams %R', text_color=color.red, text_size=table_text_size)
table.cell(info_table, 2, 3, str.tostring(williams_r, '0.00'), text_color=color.red, text_size=table_text_size)
table.cell(info_table, 0, 4, '', text_color=color.orange, text_size=table_text_size)
table.cell(info_table, 1, 4, 'MACD Histogram', text_color=color.orange, text_size=table_text_size)
table.cell(info_table, 2, 4, str.tostring(macd_histogram, '0.000'), text_color=color.orange, text_size=table_text_size)
table.cell(info_table, 0, 5, '', text_color=color.green, text_size=table_text_size)
table.cell(info_table, 1, 5, 'CCI', text_color=color.green, text_size=table_text_size)
table.cell(info_table, 2, 5, str.tostring(cci, '0.00'), text_color=color.green, text_size=table_text_size)
// Key Trend Indicators
table.cell(info_table, 0, 6, 'TREND', text_color=color.navy, text_size=table_text_size, bgcolor=color.new(color.navy, 90))
table.cell(info_table, 1, 6, 'SMA Momentum %', text_color=color.navy, text_size=table_text_size)
table.cell(info_table, 2, 6, str.tostring(sma_momentum, '0.00'), text_color=color.navy, text_size=table_text_size)
table.cell(info_table, 0, 7, '', text_color=color.maroon, text_size=table_text_size)
table.cell(info_table, 1, 7, 'EMA Momentum %', text_color=color.maroon, text_size=table_text_size)
table.cell(info_table, 2, 7, str.tostring(ema_momentum, '0.00'), text_color=color.maroon, text_size=table_text_size)
table.cell(info_table, 0, 8, '', text_color=color.teal, text_size=table_text_size)
table.cell(info_table, 1, 8, 'SAR Trend', text_color=color.teal, text_size=table_text_size)
table.cell(info_table, 2, 8, str.tostring(sar_trend, '0'), text_color=color.teal, text_size=table_text_size)
table.cell(info_table, 0, 9, '', text_color=color.lime, text_size=table_text_size)
table.cell(info_table, 1, 9, 'Linear Regression', text_color=color.lime, text_size=table_text_size)
table.cell(info_table, 2, 9, str.tostring(lr_slope, '0.000'), text_color=color.lime, text_size=table_text_size)
// Key Volatility Indicators
table.cell(info_table, 0, 10, 'VOLATILITY', text_color=color.yellow, text_size=table_text_size, bgcolor=color.new(color.yellow, 90))
table.cell(info_table, 1, 10, 'ATR %', text_color=color.yellow, text_size=table_text_size)
table.cell(info_table, 2, 10, str.tostring(atr_pct, '0.00'), text_color=color.yellow, text_size=table_text_size)
table.cell(info_table, 0, 11, '', text_color=color.aqua, text_size=table_text_size)
table.cell(info_table, 1, 11, 'BB Position', text_color=color.aqua, text_size=table_text_size)
table.cell(info_table, 2, 11, str.tostring(bb_position, '0.00'), text_color=color.aqua, text_size=table_text_size)
table.cell(info_table, 0, 12, '', text_color=color.olive, text_size=table_text_size)
table.cell(info_table, 1, 12, 'KC Position', text_color=color.olive, text_size=table_text_size)
table.cell(info_table, 2, 12, str.tostring(kc_position, '0.00'), text_color=color.olive, text_size=table_text_size)
// Key Volume Indicators
table.cell(info_table, 0, 13, 'VOLUME', text_color=color.blue, text_size=table_text_size, bgcolor=color.new(color.blue, 90))
table.cell(info_table, 1, 13, 'Volume ROC', text_color=color.blue, text_size=table_text_size)
table.cell(info_table, 2, 13, str.tostring(vroc, '0.00'), text_color=color.blue, text_size=table_text_size)
table.cell(info_table, 0, 14, '', text_color=color.red, text_size=table_text_size)
table.cell(info_table, 1, 14, 'EOM', text_color=color.red, text_size=table_text_size)
table.cell(info_table, 2, 14, str.tostring(eom_sma, '0.000'), text_color=color.red, text_size=table_text_size)
// Key Oscillators
table.cell(info_table, 0, 15, 'OSCILLATORS', text_color=color.purple, text_size=table_text_size, bgcolor=color.new(color.purple, 90))
table.cell(info_table, 1, 15, 'Awesome Osc', text_color=color.blue, text_size=table_text_size)
table.cell(info_table, 2, 15, str.tostring(ao, '0.000'), text_color=color.blue, text_size=table_text_size)
table.cell(info_table, 0, 16, '', text_color=color.red, text_size=table_text_size)
table.cell(info_table, 1, 16, 'Fisher Transform', text_color=color.red, text_size=table_text_size)
table.cell(info_table, 2, 16, str.tostring(fisher, '0.000'), text_color=color.red, text_size=table_text_size)
// Summary Statistics
table.cell(info_table, 0, 17, 'SUMMARY', text_color=color.black, text_size=table_text_size, bgcolor=color.new(color.gray, 70))
table.cell(info_table, 1, 17, 'Total Indicators: 52', text_color=color.black, text_size=table_text_size)
regime_color = rsi_centered > 10 ? color.green : rsi_centered < -10 ? color.red : color.gray
regime_text = rsi_centered > 10 ? "BULLISH" : rsi_centered < -10 ? "BEARISH" : "NEUTRAL"
table.cell(info_table, 2, 17, regime_text, text_color=regime_color, text_size=table_text_size)
This makes it the perfect “indicator backbone” for quantitative and systematic traders who want to prototype, combine, and test new regime detection models—especially in combination with the Markov Chain indicator.
How to use this script with the Markov Chain for research and backtesting:
Add the Enhanced Indicator Export to your chart.
Every calculated indicator is available as an individual data stream.
Connect the indicator(s) you want as custom input(s) to the Markov Chain’s “Custom Indicators” option.
In the Markov Chain indicator’s settings, turn ON the custom indicator mode.
For each of the three custom indicator inputs, select the exported plot from the Enhanced Export script—the menu lists all 45+ signals by name.
This creates a powerful, modular regime-detection engine where you can mix-and-match momentum, trend, volume, or custom combinations for advanced filtering.
Backtest regime logic directly.
Once you’ve connected your chosen indicators, the Markov Chain script performs regime detection (Bull/Neutral/Bear) based on your selected features—not just price returns.
The regime detection is robust, automatically normalized (using Z-score), and outputs bias (1, -1, 0) for plug-and-play integration.
Export the regime bias for programmatic use.
As described above, use input.source() in your Pine Script strategy or system and link the bias output.
You can now filter signals, control trade direction/size, or design pairs-trading that respect true, indicator-driven market regimes.
With this framework, you’re not limited to static or simplistic regime filters. You can rigorously define, test, and refine what “market regime” means for your strategies—using the technical features that matter most to you.
Optimize your signal generation by backtesting across a universe of meaningful indicator blends.
Enhance risk management with objective, real-time regime boundaries.
Accelerate your research: iterate quickly, swap indicator components, and see results with minimal code changes.
Automate multi-asset or pairs-trading by integrating regime context directly into strategy logic.
Add both scripts to your chart, connect your preferred features, and start investigating your best regime-based trades—entirely within the TradingView ecosystem.
References & Further Reading
Ang, A., & Bekaert, G. (2002). “Regime Switches in Interest Rates.” Journal of Business & Economic Statistics, 20(2), 163–182.
Hamilton, J. D. (1989). “A New Approach to the Economic Analysis of Nonstationary Time Series and the Business Cycle.” Econometrica, 57(2), 357–384.
Markov, A. A. (1906). "Extension of the Limit Theorems of Probability Theory to a Sum of Variables Connected in a Chain." The Notes of the Imperial Academy of Sciences of St. Petersburg.
Guidolin, M., & Timmermann, A. (2007). “Asset Allocation under Multivariate Regime Switching.” Journal of Economic Dynamics and Control, 31(11), 3503–3544.
Murphy, J. J. (1999). Technical Analysis of the Financial Markets. New York Institute of Finance.
Brock, W., Lakonishok, J., & LeBaron, B. (1992). “Simple Technical Trading Rules and the Stochastic Properties of Stock Returns.” Journal of Finance, 47(5), 1731–1764.
Zucchini, W., MacDonald, I. L., & Langrock, R. (2017). Hidden Markov Models for Time Series: An Introduction Using R (2nd ed.). Chapman and Hall/CRC.
On Quantitative Finance and Markov Models:
Lo, A. W., & Hasanhodzic, J. (2009). The Heretics of Finance: Conversations with Leading Practitioners of Technical Analysis. Bloomberg Press.
Patterson, S. (2016). The Man Who Solved the Market: How Jim Simons Launched the Quant Revolution. Penguin Press.
TradingView Pine Script Documentation: www.tradingview.com
TradingView Blog: “Use an Input From Another Indicator With Your Strategy” www.tradingview.com
GeeksforGeeks: “What is the Difference Between Markov Chains and Hidden Markov Models?” www.geeksforgeeks.org
What makes this indicator original and unique?
- On‑chart, real‑time Markov. The chain is drawn directly on your chart. You see the current regime, its tendency to stay (self‑loop), and the usual next step (arrows) as bars confirm.
- Source‑agnostic by design. The engine runs on any series you select via input.source() — price, your own oscillator, a composite score, anything you compute in the script.
- Automatic normalization + regime mapping. Different inputs live on different scales. The script standardizes your chosen source and maps it into clear regimes (e.g., Bull / Bear / Neutral) without you micromanaging thresholds each time.
- Rolling, bar‑by‑bar learning. Transition tendencies are computed from a rolling window of confirmed bars. What you see is exactly what the market did in that window.
- Fast experimentation. Switch the source, adjust the window, and the Markov view updates instantly. It’s a rapid way to test ideas and feel regime persistence/switch behavior.
Integrate your own signals (using input.source())
- In settings, choose the Source . This is powered by input.source() .
- Feed it price, an indicator you compute inside the script, or a custom composite series.
- The script will automatically normalize that series and process it through the Markov engine, mapping it to regimes and updating the on‑chart spheres/arrows in real time.
Credits:
Deep gratitude to @RicardoSantos for both the foundational Markov chain processing engine and inspiring open-source contributions, which made advanced probabilistic market modeling accessible to the TradingView community.
Special thanks to @Alien_Algorithms for the innovative and visually stunning 3D sphere logic that powers the indicator’s animated, regime-based visualization.
Disclaimer
This tool summarizes recent behavior. It is not financial advice and not a guarantee of future results.
DTC AIO [India] v2.0DTC AIO v2.0 – Advanced Technical Analysis Suite
This indicator is a comprehensive dashboard designed specifically for Indian equities, providing traders with a unique blend of trend, volatility, volume, and earnings analytics—all in one panel.
Key Features
Multi-Timeframe Volatility Tables:
Instantly view daily, weekly, and monthly Average Daily Range (ADR) values in a compact, color-coded table.
Relative Volume (RVol) Panel:
Displays real-time relative volume in crores, helping you spot unusual activity at a glance.
Strength Gauge:
A proprietary scoring system that quantifies the frequency and magnitude of price bursts, giving you a unique “Strength” score for each symbol.
Earnings & Sales Table:
Automatically fetches and displays quarterly EPS and sales data, with YoY and QoQ growth, color-coded for clarity.
Theme-Aware Design:
All tables and overlays adapt to dark or light chart themes for maximum readability.
Customizable Watermark:
Add your own signature, timeframe, and price change watermark to the chart, with full control over position and color.
Sector & Industry Info:
Instantly see the symbol’s sector and industry in the main metrics table.
How It Works
Trend & Volatility:
Uses a blend of moving averages (user-selectable type and length) and price/volume patterns to highlight actionable setups.
Strength Gauge:
Calculates a proprietary score based on the frequency and size of price bursts over multiple lookback periods. This algorithm is unique to this script and not available in open-source alternatives.
Relative Volume:
Compares current volume to historical averages, displaying the result in crores for Indian market conventions.
Earnings Table:
Fetches the last four quarters of EPS and sales, automatically calculating and color-coding YoY and QoQ growth.
All tables and overlays are locked to price and update in real time.
How to Use
Add the indicator to your chart.
Customize table positions, watermark, and theme via the settings panel.
Use the dashboard to quickly assess trend, volatility, strength, and earnings for any Indian equity.
Hover over table cells for tooltips and additional information.
Why Closed Source?
This script is closed-source due to the proprietary nature of the “Strength Gauge” algorithm and the integrated dashboard logic, which are not available in open-source scripts. The unique scoring and visualization methods provide a competitive edge for users.
Notes
Designed for Indian equities, but can be used on any symbol.
All calculations are performed in real time and optimized for performance.
For best results, use on daily or higher timeframes.
If you have questions or feedback, please use the TradingView comments section.v
Nifty Dashboard//@version=5
//Author @GODvMarkets
indicator("GOD NSE Nifty Dashboard", "Nifty Dashboard")
i_timeframe = input.timeframe("D", "Timeframe")
// if not timeframe.isdaily
// runtime.error("Please switch timeframe to Daily")
i_text_size = input.string(size.auto, "Text Size", )
//-----------------------Functions-----------------------------------------------------
f_oi_buildup(price_chg_, oi_chg_) =>
switch
price_chg_ > 0 and oi_chg_ > 0 =>
price_chg_ > 0 and oi_chg_ < 0 =>
price_chg_ < 0 and oi_chg_ > 0 =>
price_chg_ < 0 and oi_chg_ < 0 =>
=>
f_color(val_) => val_ > 0 ? color.green : val_ < 0 ? color.red : color.gray
f_bg_color(val_) => val_ > 0 ? color.new(color.green,80) : val_ < 0 ? color.new(color.red,80) : color.new(color.black,80)
f_bg_color_price(val_) =>
fg_color_ = f_color(val_)
abs_val_ = math.abs(val_)
transp_ = switch
abs_val_ > .03 => 40
abs_val_ > .02 => 50
abs_val_ > .01 => 60
=> 80
color.new(fg_color_, transp_)
f_bg_color_oi(val_) =>
fg_color_ = f_color(val_)
abs_val_ = math.abs(val_)
transp_ = switch
abs_val_ > .10 => 40
abs_val_ > .05 => 50
abs_val_ > .025 => 60
=> 80
color.new(fg_color_, transp_)
f_day_of_week(time_=time) =>
switch dayofweek(time_)
1 => "Sun"
2 => "Mon"
3 => "Tue"
4 => "Wed"
5 => "Thu"
6 => "Fri"
7 => "Sat"
//-------------------------------------------------------------------------------------
var table table_ = table.new(position.middle_center, 22, 20, border_width = 1)
var cols_ = 0
var text_color_ = color.white
var bg_color_ = color.rgb(1, 5, 19)
f_symbol(idx_, symbol_) =>
symbol_nse_ = "NSE" + ":" + symbol_
fut_cur_ = "NSE" + ":" + symbol_ + "1!"
fut_next_ = "NSE" + ":" + symbol_ + "2!"
= request.security(symbol_nse_, i_timeframe, [close, close-close , close/close -1, volume], ignore_invalid_symbol = true, lookahead = barmerge.lookahead_on)
= request.security(fut_cur_, i_timeframe, , ignore_invalid_symbol = true, lookahead = barmerge.lookahead_on)
= request.security(fut_next_, i_timeframe, , ignore_invalid_symbol = true, lookahead = barmerge.lookahead_on)
= request.security(fut_cur_ + "_OI", i_timeframe, [close, close-close ], ignore_invalid_symbol = true, lookahead = barmerge.lookahead_on)
= request.security(fut_next_ + "_OI", i_timeframe, [close, close-close ], ignore_invalid_symbol = true, lookahead = barmerge.lookahead_on)
stk_vol_ = stk_vol_nse_
fut_vol_ = fut_cur_vol_ + fut_next_vol_
fut_oi_ = fut_cur_oi_ + fut_next_oi_
fut_oi_chg_ = fut_cur_oi_chg_ + fut_next_oi_chg_
fut_oi_chg_pct_ = fut_oi_chg_ / fut_oi_
fut_stk_vol_x_ = fut_vol_ / stk_vol_
fut_vol_oi_action_ = fut_vol_ / math.abs(fut_oi_chg_)
= f_oi_buildup(chg_pct_, fut_oi_chg_pct_)
close_color_ = fut_cur_close_ > fut_vwap_ ? color.green : fut_cur_close_ < fut_vwap_ ? color.red : text_color_
if barstate.isfirst
row_ = 0, col_ = 0
table.cell(table_, col_, row_, "Symbol", text_color = text_color_, bgcolor = bg_color_, text_size = i_text_size), col_ += 1
table.cell(table_, col_, row_, "Close", text_color = text_color_, bgcolor = bg_color_, text_size = i_text_size), col_ += 1
table.cell(table_, col_, row_, "VWAP", text_color = text_color_, bgcolor = bg_color_, text_size = i_text_size), col_ += 1
table.cell(table_, col_, row_, "Pts", text_color = text_color_, bgcolor = bg_color_, text_size = i_text_size), col_ += 1
table.cell(table_, col_, row_, "Stk Vol", text_color = text_color_, bgcolor = bg_color_, text_size = i_text_size), col_ += 1
table.cell(table_, col_, row_, "Fut Vol", text_color = text_color_, bgcolor = bg_color_, text_size = i_text_size), col_ += 1
table.cell(table_, col_, row_, "Fut/Stk Vol", text_color = text_color_, bgcolor = bg_color_, text_size = i_text_size), col_ += 1
table.cell(table_, col_, row_, "OI Cur", text_color = text_color_, bgcolor = bg_color_, text_size = i_text_size), col_ += 1
table.cell(table_, col_, row_, "OI Next", text_color = text_color_, bgcolor = bg_color_, text_size = i_text_size), col_ += 1
table.cell(table_, col_, row_, "OI Cur Chg", text_color = text_color_, bgcolor = bg_color_, text_size = i_text_size), col_ += 1
table.cell(table_, col_, row_, "OI Next Chg", text_color = text_color_, bgcolor = bg_color_, text_size = i_text_size), col_ += 1
table.cell(table_, col_, row_, "COI ", text_color = text_color_, bgcolor = bg_color_, text_size = i_text_size), col_ += 1
table.cell(table_, col_, row_, "COI Chg", text_color = text_color_, bgcolor = bg_color_, text_size = i_text_size), col_ += 1
table.cell(table_, col_, row_, "Vol/OI Chg", text_color = text_color_, bgcolor = bg_color_, text_size = i_text_size), col_ += 1
table.cell(table_, col_, row_, "COI Chg%", text_color = text_color_, bgcolor = bg_color_, text_size = i_text_size), col_ += 1
table.cell(table_, col_, row_, "Pr.Chg%", text_color = text_color_, bgcolor = bg_color_, text_size = i_text_size), col_ += 1
table.cell(table_, col_, row_, "OI Buildup", text_color = text_color_, bgcolor = bg_color_, text_size = i_text_size), col_ += 1
cell_color_ = color.white
cell_bg_color_ = color.rgb(1, 7, 24)
if barstate.islast
row_ = idx_, col_ = 0
table.cell(table_, col_, row_, str.format("{0}", symbol_), text_color = f_color(chg_pct_), bgcolor = f_bg_color_price(chg_pct_), text_size = i_text_size, text_halign = text.align_left), col_ += 1
table.cell(table_, col_, row_, str.format("{0,number,#.00}", fut_cur_close_), text_color = close_color_, bgcolor = cell_bg_color_, text_size = i_text_size, text_halign = text.align_right), col_ += 1
table.cell(table_, col_, row_, str.format("{0,number,#.00}", fut_vwap_), text_color = cell_color_, bgcolor = cell_bg_color_, text_size = i_text_size, text_halign = text.align_right), col_ += 1
table.cell(table_, col_, row_, str.format("{0,number,0.00}", chg_pts_), text_color = cell_color_, bgcolor = cell_bg_color_, text_size = i_text_size, text_halign = text.align_right), col_ += 1
table.cell(table_, col_, row_, str.format("{0,number,#,###}", stk_vol_), text_color = cell_color_, bgcolor = cell_bg_color_, text_size = i_text_size, text_halign = text.align_right), col_ += 1
table.cell(table_, col_, row_, str.format("{0,number,#,###}", fut_vol_), text_color = cell_color_, bgcolor = cell_bg_color_, text_size = i_text_size, text_halign = text.align_right), col_ += 1
table.cell(table_, col_, row_, str.format("{0,number,0.00}", fut_stk_vol_x_), text_color = cell_color_, bgcolor = cell_bg_color_, text_size = i_text_size, text_halign = text.align_right), col_ += 1
table.cell(table_, col_, row_, str.format("{0,number,#,###}", fut_cur_oi_), text_color = cell_color_, bgcolor = cell_bg_color_, text_size = i_text_size, text_halign = text.align_right), col_ += 1
table.cell(table_, col_, row_, str.format("{0,number,#,###}", fut_next_oi_), text_color = cell_color_, bgcolor = cell_bg_color_, text_size = i_text_size, text_halign = text.align_right), col_ += 1
table.cell(table_, col_, row_, str.format("{0,number,#,###}", fut_cur_oi_chg_), text_color = f_color(fut_cur_oi_chg_), bgcolor = f_bg_color(fut_cur_oi_chg_), text_size = i_text_size, text_halign = text.align_right), col_ += 1
table.cell(table_, col_, row_, str.format("{0,number,#,###}", fut_next_oi_chg_), text_color = f_color(fut_next_oi_chg_), bgcolor = f_bg_color(fut_next_oi_chg_), text_size = i_text_size, text_halign = text.align_right), col_ += 1
table.cell(table_, col_, row_, str.format("{0,number,#,###}", fut_oi_), text_color = cell_color_, bgcolor = cell_bg_color_, text_size = i_text_size, text_halign = text.align_right), col_ += 1
table.cell(table_, col_, row_, str.format("{0,number,#,###}", fut_oi_chg_), text_color = f_color(fut_oi_chg_), bgcolor = f_bg_color(fut_oi_chg_), text_size = i_text_size, text_halign = text.align_right), col_ += 1
table.cell(table_, col_, row_, str.format("{0,number,0.00}", fut_vol_oi_action_), text_color = cell_color_, bgcolor = cell_bg_color_, text_size = i_text_size, text_halign = text.align_right), col_ += 1
table.cell(table_, col_, row_, str.format("{0,number,0.00%}", fut_oi_chg_pct_), text_color = f_color(fut_oi_chg_pct_), bgcolor = f_bg_color_oi(fut_oi_chg_pct_), text_size = i_text_size, text_halign = text.align_right), col_ += 1
table.cell(table_, col_, row_, str.format("{0,number,0.00%}", chg_pct_), text_color = f_color(chg_pct_), bgcolor = f_bg_color_price(chg_pct_), text_size = i_text_size, text_halign = text.align_right), col_ += 1
table.cell(table_, col_, row_, str.format("{0}", oi_buildup_), text_color = oi_buildup_color_, bgcolor = color.new(oi_buildup_color_,80), text_size = i_text_size, text_halign = text.align_left), col_ += 1
idx_ = 1
f_symbol(idx_, "BANKNIFTY"), idx_ += 1
f_symbol(idx_, "NIFTY"), idx_ += 1
f_symbol(idx_, "CNXFINANCE"), idx_ += 1
f_symbol(idx_, "RELIANCE"), idx_ += 1
f_symbol(idx_, "HDFC"), idx_ += 1
f_symbol(idx_, "ITC"), idx_ += 1
f_symbol(idx_, "HINDUNILVR"), idx_ += 1
f_symbol(idx_, "INFY"), idx_ += 1
Intrabar Efficiency Ratio█ OVERVIEW
This indicator displays a directional variant of Perry Kaufman's Efficiency Ratio, designed to gauge the "efficiency" of intrabar price movement by comparing the sum of movements of the lower timeframe bars composing a chart bar with the respective bar's movement on an average basis.
█ CONCEPTS
Efficiency Ratio (ER)
Efficiency Ratio was first introduced by Perry Kaufman in his 1995 book, titled "Smarter Trading". It is the ratio of absolute price change to the sum of absolute changes on each bar over a period. This tells us how strong the period's trend is relative to the underlying noise. Simply put, it's a measure of price movement efficiency. This ratio is the modulator utilized in Kaufman's Adaptive Moving Average (KAMA), which is essentially an Exponential Moving Average (EMA) that adapts its responsiveness to movement efficiency.
ER's output is bounded between 0 and 1. A value of 0 indicates that the starting price equals the ending price for the period, which suggests that price movement was maximally inefficient. A value of 1 indicates that price had travelled no more than the distance between the starting price and the ending price for the period, which suggests that price movement was maximally efficient. A value between 0 and 1 indicates that price had travelled a distance greater than the distance between the starting price and the ending price for the period. In other words, some degree of noise was present which resulted in reduced efficiency over the period.
As an example, let's say that the price of an asset had moved from $15 to $14 by the end of a period, but the sum of absolute changes for each bar of data was $4. ER would be calculated like so:
ER = abs(14 - 15)/4 = 0.25
This suggests that the trend was only 25% efficient over the period, as the total distanced travelled by price was four times what was required to achieve the change over the period.
Intrabars
Intrabars are chart bars at a lower timeframe than the chart's. Each 1H chart bar of a 24x7 market will, for example, usually contain 60 intrabars at the LTF of 1min, provided there was market activity during each minute of the hour. Mining information from intrabars can be useful in that it offers traders visibility on the activity inside a chart bar.
Lower timeframes (LTFs)
A lower timeframe is a timeframe that is smaller than the chart's timeframe. This script determines which LTF to use by examining the chart's timeframe. The LTF determines how many intrabars are examined for each chart bar; the lower the timeframe, the more intrabars are analyzed, but fewer chart bars can display indicator information because there is a limit to the total number of intrabars that can be analyzed.
Intrabar precision
The precision of calculations increases with the number of intrabars analyzed for each chart bar. As there is a 100K limit to the number of intrabars that can be analyzed by a script, a trade-off occurs between the number of intrabars analyzed per chart bar and the chart bars for which calculations are possible.
Intrabar Efficiency Ratio (IER)
Intrabar Efficiency Ratio applies the concept of ER on an intrabar level. Rather than comparing the overall change to the sum of bar changes for the current chart's timeframe over a period, IER compares single bar changes for the current chart's timeframe to the sum of absolute intrabar changes, then applies smoothing to the result. This gives an indication of how efficient changes are on the current chart's timeframe for each bar of data relative to LTF bar changes on an average basis. Unlike the standard ER calculation, we've opted to preserve directional information by not taking the absolute value of overall change, thus allowing it to be utilized as a momentum oscillator. However, by taking the absolute value of this oscillator, it could potentially serve as a replacement for ER in the design of adaptive moving averages.
Since this indicator preserves directional information, IER can be regarded as similar to the Chande Momentum Oscillator (CMO) , which was presented in 1994 by Tushar Chande in "The New Technical Trader". Both CMO and ER essentially measure the same relationship between trend and noise. CMO simply differs in scale, and considers the direction of overall changes.
█ FEATURES
Display
Three different display types are included within the script:
• Line : Displays the middle length MA of the IER as a line .
Color for this display can be customized via the "Line" portion of the "Visuals" section in the script settings.
• Candles : Displays the non-smooth IER and two moving averages of different lengths as candles .
The `open` and `close` of the candle are the longest and shortest length MAs of the IER respectively.
The `high` and `low` of the candle are the max and min of the IER, longest length MA of the IER, and shortest length MA of the IER respectively.
Colors for this display can be customized via the "Candles" portion of the "Visuals" section in the script settings.
• Circles : Displays three MAs of the IER as circles .
The color of each plot depends on the percent rank of the respective MA over the previous 100 bars.
Different colors are triggered when ranks are below 10%, between 10% and 50%, between 50% and 90%, and above 90%.
Colors for this display can be customized via the "Circles" portion of the "Visuals" section in the script settings.
With either display type, an optional information box can be displayed. This box shows the LTF that the script is using, the average number of lower timeframe bars per chart bar, and the number of chart bars that contain LTF data.
Specifying intrabar precision
Ten options are included in the script to control the number of intrabars used per chart bar for calculations. The greater the number of intrabars per chart bar, the fewer chart bars can be analyzed.
The first five options allow users to specify the approximate amount of chart bars to be covered:
• Least Precise (Most chart bars) : Covers all chart bars by dividing the current timeframe by four.
This ensures the highest level of intrabar precision while achieving complete coverage for the dataset.
• Less Precise (Some chart bars) & More Precise (Less chart bars) : These options calculate a stepped LTF in relation to the current chart's timeframe.
• Very precise (2min intrabars) : Uses the second highest quantity of intrabars possible with the 2min LTF.
• Most precise (1min intrabars) : Uses the maximum quantity of intrabars possible with the 1min LTF.
The stepped lower timeframe for "Less Precise" and "More Precise" options is calculated from the current chart's timeframe as follows:
Chart Timeframe Lower Timeframe
Less Precise More Precise
< 1hr 1min 1min
< 1D 15min 1min
< 1W 2hr 30min
> 1W 1D 60min
The last five options allow users to specify an approximate fixed number of intrabars to analyze per chart bar. The available choices are 12, 24, 50, 100, and 250. The script will calculate the LTF which most closely approximates the specified number of intrabars per chart bar. Keep in mind that due to factors such as the length of a ticker's sessions and rounding of the LTF, it is not always possible to produce the exact number specified. However, the script will do its best to get as close to the value as possible.
Specifying MA type
Seven MA types are included in the script for different averaging effects:
• Simple
• Exponential
• Wilder (RMA)
• Weighted
• Volume-Weighted
• Arnaud Legoux with `offset` and `sigma` set to 0.85 and 6 respectively.
• Hull
Weighting
This script includes the option to weight IER values based on the percent rank of absolute price changes on the current chart's timeframe over a specified period, which can be enabled by checking the "Weigh using relative close changes" option in the script settings. This places reduced emphasis on IER values from smaller changes, which may help to reduce noise in the output.
█ FOR Pine Script™ CODERS
• This script imports the recently published lower_ltf library for calculating intrabar statistics and the optimal lower timeframe in relation to the current chart's timeframe.
• This script uses the recently released request.security_lower_tf() Pine Script™ function discussed in this blog post .
It works differently from the usual request.security() in that it can only be used on LTFs, and it returns an array containing one value per intrabar.
This makes it much easier for programmers to access intrabar information.
• This script implements a new recommended best practice for tables which works faster and reduces memory consumption.
Using this new method, tables are declared only once with var , as usual. Then, on the first bar only, we use table.cell() to populate the table.
Finally, table.set_*() functions are used to update attributes of table cells on the last bar of the dataset.
This greatly reduces the resources required to render tables.
Look first. Then leap.
Super PerformanceThe "Super Performance" script is a custom indicator written in Pine Script (version 6) for use on the TradingView platform. Its main purpose is to visually compare the performance of a selected stock or index against a benchmark index (default: NIFTYMIDSML400) over various timeframes, and to display sector-wise performance rankings in a clear, tabular format.
Key Features:
Customizable Display:
Users can toggle between dark and light color themes, enable or disable extended data columns, and choose between a compact "Mini Mode" or a full-featured table view. Table positions and sizes are also configurable for both stock and sector tables.
Performance Calculation:
The script calculates percentage price changes for the selected stock and the benchmark index over multiple periods: 1, 5, 10, 20, 50, and 200 days. It then checks if the stock is outperforming the index for each period.
Conviction Score:
For each period where the stock outperforms the index, a "conviction score" is incremented. This score is mapped to qualitative labels such as "Super solid," "Solid," "Good," etc., and is color-coded for quick visual interpretation.
Sector Performance Table:
The script tracks 19 sector indices (e.g., REALTY, IT, PHARMA, AUTO, ENERGY) and calculates their performance over 1, 5, 10, 20, and 60-day periods. It then ranks the top 5 performing sectors for each timeframe and displays them in a sector performance table.
Visual Output:
Two tables are constructed:
Stock Performance Table: Shows the stock's returns, index returns, outperformance markers (✔/✖), and the difference for each period, along with the overall conviction score.
Sector Performance Table: Ranks and displays the top 5 sectors for each timeframe, with color-coded performance values for easy comparison.
Seasonality DOW CombinedOverall Purpose
This script analyzes historical daily returns based on two specific criteria:
Month of the year (January through December)
Day of the week (Sunday through Saturday)
It summarizes and visually displays the average historical performance of the selected asset by these criteria over multiple years.
Step-by-Step Breakdown
1. Initial Settings:
Defines minimum year (i_year_start) from which data analysis will start.
Ensures the user is using a daily timeframe, otherwise prompts an error.
Sets basic display preferences like text size and color schemes.
2. Data Collection and Variables:
Initializes matrices to store and aggregate returns data:
month_data_ and month_agg_: store monthly performance.
dow_data_ and dow_agg_: store day-of-week performance.
COUNT tracks total number of occurrences, and COUNT_POSITIVE tracks positive-return occurrences.
3. Return Calculation:
Calculates daily percentage change (chg_pct_) in price:
chg_pct_ = close / close - 1
Ensures it captures this data only for the specified years (year >= i_year_start).
4. Monthly Performance Calculation:
Each daily return is grouped by month:
matrix.set updates total returns per month.
The script tracks:
Monthly cumulative returns
Number of occurrences (how many days recorded per month)
Positive occurrences (days with positive returns)
5. Day-of-Week Performance Calculation:
Similarly, daily returns are also grouped by day-of-the-week (Sunday to Saturday):
Daily return values are summed per weekday.
The script tracks:
Cumulative returns per weekday
Number of occurrences per weekday
Positive occurrences per weekday
6. Visual Display (Tables):
The script creates two visual tables:
Left Table: Monthly Performance.
Right Table: Day-of-the-Week Performance.
For each table, it shows:
Yearly data for each month/day.
Summaries at the bottom:
SUM row: Shows total accumulated returns over all selected years for each month/day.
+ive row: Shows percentage (%) of times the month/day had positive returns, along with a tooltip displaying positive occurrences vs total occurrences.
Cells are color-coded:
Green for positive returns.
Red for negative returns.
Gray for neutral/no change.
7. Interpreting the Tables:
Monthly Table (left side):
Helps identify seasonal patterns (e.g., historically bullish/bearish months).
Day-of-Week Table (right side):
Helps detect recurring weekday patterns (e.g., historically bullish Mondays or bearish Fridays).
Practical Use:
Traders use this to:
Identify patterns based on historical data.
Inform trading strategies, e.g., avoiding historically bearish days/months or leveraging historically bullish periods.
Example Interpretation:
If the table shows consistently green (positive) for March and April, historically the asset tends to perform well during spring. Similarly, if the "Friday" column is often red, historically Fridays are bearish for this asset.
ATR Bands with ATR Cross + InfoTableOverview
This Pine Script™ indicator is designed to enhance traders' ability to analyze market volatility, trend direction, and position sizing directly on their TradingView charts. By plotting Average True Range (ATR) bands anchored at the OHLC4 price, displaying crossover labels, and providing a comprehensive information table, this tool offers a multifaceted approach to technical analysis.
Key Features:
ATR Bands Anchored at OHLC4: Visual representation of short-term and long-term volatility bands centered around the average price.
OHLC4 Dotted Line: A dotted line representing the average of Open, High, Low, and Close prices.
ATR Cross Labels: Visual cues indicating when short-term volatility exceeds long-term volatility and vice versa.
Information Table: Displays real-time data on market volatility, calculated position size based on risk parameters, and trend direction relative to the 20-period Smoothed Moving Average (SMMA).
Purpose
The primary purpose of this indicator is to:
Assess Market Volatility: By comparing short-term and long-term ATR values, traders can gauge the current volatility environment.
Determine Optimal Position Sizing: A calculated position size based on user-defined risk parameters helps in effective risk management.
Identify Trend Direction: Comparing the current price to the 20-period SMMA assists in determining the prevailing market trend.
Enhance Decision-Making: Visual cues and real-time data enable traders to make informed trading decisions with greater confidence.
How It Works
1. ATR Bands Anchored at OHLC4
Average True Range (ATR) Calculations
Short-Term ATR (SA): Calculated over a 9-period using ta.atr(9).
Long-Term ATR (LA): Calculated over a 21-period using ta.atr(21).
Plotting the Bands
OHLC4 Dotted Line: Plotted using small circles to simulate a dotted line due to Pine Script limitations.
ATR(9) Bands: Plotted in blue with semi-transparent shading.
ATR(21) Bands: Plotted in orange with semi-transparent shading.
Overlap: Bands can overlap, providing visual insights into changes in volatility.
2. ATR Cross Labels
Crossover Detection:
SA > LA: Indicates increasing short-term volatility.
Detected using ta.crossover(SA, LA).
A green upward label "SA>LA" is plotted below the bar.
SA < LA: Indicates decreasing short-term volatility.
Detected using ta.crossunder(SA, LA).
A red downward label "SA LA, then the market is considered volatile.
Display: Shows "Yes" or "No" based on the comparison.
b. Position Size Calculation
Risk Total Amount: User-defined input representing the total capital at risk.
Risk per 1 Stock: User-defined input representing the risk associated with one unit of the asset.
Purpose: Helps traders determine the appropriate position size based on their risk tolerance and current market volatility.
c. Is Price > 20 SMMA?
SMMA Calculation:
Calculated using a 20-period Smoothed Moving Average with ta.rma(close, 20).
Logic: If the current close price is above the SMMA, the trend is considered upward.
Display: Shows "Yes" or "No" based on the comparison.
How to Use
Step 1: Add the Indicator to Your Chart
Copy the Script: Copy the entire Pine Script code into the TradingView Pine Editor.
Save and Apply: Save the script and click "Add to Chart."
Step 2: Configure Inputs
Risk Parameters: Adjust the "Risk Total Amount" and "Risk per 1 Stock" in the indicator settings to match your personal risk management strategy.
Step 3: Interpret the Visuals
ATR Bands
Width of Bands: Wider bands indicate higher volatility; narrower bands indicate lower volatility.
Band Overlap: Pay attention to areas where the blue and orange bands diverge or converge.
OHLC4 Dotted Line
Serves as a central reference point for the ATR bands.
Helps visualize the average price around which volatility is measured.
ATR Cross Labels
"SA>LA" Label:
Indicates short-term volatility is increasing relative to long-term volatility.
May signal potential breakout or trend acceleration.
"SA 20 SMMA?
Use this to confirm trend direction before entering or exiting trades.
Practical Example
Imagine you are analyzing a stock and notice the following:
ATR(9) Crosses Above ATR(21):
A green "SA>LA" label appears.
The info table shows "Yes" for "Is ATR-based price volatile."
Position Size:
Based on your risk parameters, the position size is calculated.
Price Above 20 SMMA:
The info table shows "Yes" for "Is price > 20 SMMA."
Interpretation:
The market is experiencing increasing short-term volatility.
The trend is upward, as the price is above the 20 SMMA.
You may consider entering a long position, using the calculated position size to manage risk.
Customization
Colors and Transparency:
Adjust the colors of the bands and labels to suit your preferences.
Risk Parameters:
Modify the default values for risk amounts in the inputs.
Moving Average Period:
Change the SMMA period if desired.
Limitations and Considerations
Lagging Indicators: ATR and SMMA are lagging indicators and may not predict future price movements.
Market Conditions: The effectiveness of this indicator may vary across different assets and market conditions.
Risk of Overfitting: Relying solely on this indicator without considering other factors may lead to suboptimal trading decisions.
Conclusion
This indicator combines essential elements of technical analysis to provide a comprehensive tool for traders. By visualizing ATR bands anchored at the OHLC4, indicating volatility crossovers, and providing real-time data on position sizing and trend direction, it aids in making informed trading decisions.
Whether you're a novice trader looking to understand market volatility or an experienced trader seeking to refine your strategy, this indicator offers valuable insights directly on your TradingView charts.
Code Summary
The script is written in Pine Script™ version 5 and includes:
Calculations for OHLC4, ATRs, Bands, SMMA:
Uses built-in functions like ta.atr() and ta.rma() for calculations.
Plotting Functions:
plotshape() for the OHLC4 dotted line.
plot() and fill() for the ATR bands.
Crossover Detection:
ta.crossover() and ta.crossunder() for detecting ATR crosses.
Labeling Crossovers:
label.new() to place informative labels on the chart.
Information Table Creation:
table.new() to create the table.
table.cell() to populate it with data.
Acknowledgments
ATR and SMMA Concepts: Built upon standard technical analysis concepts widely used in trading.
Pine Script™: Leveraged the capabilities of Pine Script™ version 5 for advanced charting and analysis.
Note: Always test any indicator thoroughly and consider combining it with other forms of analysis before making trading decisions. Trading involves risk, and past performance is not indicative of future results.
Happy Trading!
Symbol Searcher [EmuMoon]Introducing the EmuMoon 'Symbol Searcher'. Your go-to tool for quickly comparing and discovering the best coins/symbols to trade.
With this nifty tool, you can easily search and compare 40+ different coins/symbols simultaneously to find the most volatile ones, while also identifying coins that are already correlated to the ones you're trading. That way, you can diversify your portfolio and avoid putting all your eggs in one basket.🧺🐣
The Symbol Searcher lets you sort by volatility, correlation and weighted combinations of both. You can even input your own coins/symbols to see how they stack up. It's a fun way to explore the crypto/trading market and find new opportunities.
You can also add the 'Symbol Searcher' to the chart multiple times to display even more symbols. This works excellent with the other DCA Tools that are Advanced!
Features
The EmuMoon 'Symbol Searcher' has a number of features, including:
• Optimal Coin Selection - The 'Top Picks' Table automatically populates with coins/symbols exhibiting the most desirable values that are well suited to trading.
• 'Sort By' Drop-Down - Explore a wide range of sorting options to discover coins/symbols that align with your target goals and preferences.
• Lookback Duration - Small or broad, you can specify the quantity of bars/candles that are used when performing internal calculations.
• Customisable View - Choose the Quantity of Pairs to Compare and also separately choose the Quantity of Pairs to Display.
• Real-Time Data - Receive up-to-the-minute data on coins/symbols, pick any time frame interval to make informed and timely choices.
• Quick & Easy - You can search, compare and analyse a wide range of coins with speed and convenience and no complex setup.
• Default Pairs - Carefully selected from Binance USDT Spot, the top 40 pairs with a 'Maximum Supply' based on the highest statistics at the time of creating. Add your own at any time.
• Connectivity - Use on the go, on any device. Settings menu and display tables have been optimized to look great on Mobile as well as PC, Browser, App, Laptop, Mobile, Tablet etc.
• Fast Loading - Streamlined array/table structure means enhanced script compile times, significantly improving script compiling times and timeout errors.
Settings
• Show Main Table - Show or hide the main coin selection table.
• Display X Pairs - Choose how many pairs to display.
• Compare X Pairs - Choose how many pairs to compare.
• Lookback - Choose the quantity of bars/candles to be used for the Correlation and Volatility calculations.
• Sort By - Choose how the main table is sorted.
• Show Top Picks Table - Show or hide the Top Picks Table.
• + Corr X Vol - Choose the quantity of High Correlation + High Volatility coins to show on the Top Picks Table.
• - Corr X Vol - Choose the quantity of Low Correlation + High Volatility coins to show on the Top Picks Table.
• o Corr X Vol - Choose the quantity of Neutral Correlation + High Volatility coins to show on the Top Picks Table.
• Symbol Input 1 - To check for correlation, the script utilizes coin slot number 1 as a reference, comparing it against all the coins numbered 2~40.
• Symbol Inputs 2~40 - Customize the coin inputs (2~40) according to your preference.
• Table Position - Adjust location of table plotted on chart. You can also add the 'Symbol Searcher' to the chart multiple times to display even more symbols. 🎉
• Info & Help - Some great information about the script and its features
• Text Size - Whether you are on PC, App, or Tablet, you can adjust the view to fit your device.
Usage
While statistics provide valuable insights, they should not be solely relied upon as an indicator of future results. This script serves as a tool traders can utilise to help gain an overview of the market landscape, and quickly compare and identify potential opportunities, enhancing their decision-making process. To use the indicator, simply input your chosen coins/symbols or use the defaults, select the quantity you want to compare, choose a sorting option, you can also generate a Top Picks list based on the highest performing values by using the +/-/o Corr X Vol quantity selections.
The Echo System🔊 The Echo System – Trend + Momentum Trading Strategy
Overview:
The Echo System is a trend-following and momentum-based trading tool designed to identify high-probability buy and sell signals through a combination of market trend analysis, price movement strength, and candlestick validation.
Key Features:
📈 Trend Detection:
Uses a 30 EMA vs. 200 EMA crossover to confirm bullish or bearish trends.
Visual trend strength meter powered by percentile ranking of EMA distance.
🔄 Momentum Check:
Detects significant price moves over the past 6 bars, enhanced by ATR-based scaling to filter weak signals.
🕯️ Candle Confirmation:
Validates recent price action using the previous and current candle body direction.
✅ Smart Conditions Table:
A live dashboard showing all trade condition checks (Trend, Recent Price Move, Candlestick confirmations) in real-time with visual feedback.
📊 Backtesting & Stats:
Auto-calculates average win, average loss, risk-reward ratio (RRR), and win rate across historical signals.
Clean performance dashboard with color-coded metrics for easy reading.
🔔 Alerts:
Set alerts for trade signals or significant price movements to stay updated without monitoring the chart 24/7.
Visuals:
Trend markers and price movement flags plotted directly on the chart.
Dual tables:
📈 Conditions table (top-right): breaks down trade criteria status.
📊 Performance table (bottom-right): shows real-time stats on win/loss and RRR.🔊 The Echo System – Trend + Momentum Trading Strategy
Overview:
The Echo System is a trend-following and momentum-based trading tool designed to identify high-probability buy and sell signals through a combination of market trend analysis, price movement strength, and candlestick validation.
Key Features:
📈 Trend Detection:
Uses a 30 EMA vs. 200 EMA crossover to confirm bullish or bearish trends.
Visual trend strength meter powered by percentile ranking of EMA distance.
🔄 Momentum Check:
Detects significant price moves over the past 6 bars, enhanced by ATR-based scaling to filter weak signals.
🕯️ Candle Confirmation:
Validates recent price action using the previous and current candle body direction.
✅ Smart Conditions Table:
A live dashboard showing all trade condition checks (Trend, Recent Price Move, Candlestick confirmations) in real-time with visual feedback.
📊 Backtesting & Stats:
Auto-calculates average win, average loss, risk-reward ratio (RRR), and win rate across historical signals.
Clean performance dashboard with color-coded metrics for easy reading.
🔔 Alerts:
Set alerts for trade signals or significant price movements to stay updated without monitoring the chart 24/7.
Visuals:
Trend markers and price movement flags plotted directly on the chart.
Dual tables:
📈 Conditions table (top-right): breaks down trade criteria status.
📊 Performance table (bottom-right): shows real-time stats on win/loss and RRR.
Cutrim TheoryCutrim Theory
Created by Dalpiaz-BR , this indicator is based on the Probabilistic Theory developed by the renowned Brazilian trader Ronal Cutrim. The indicator aims to provide a detailed analysis of market imbalances and candlestick patterns across different timeframes, utilizing multi-timeframe data and dynamic information tables. It is designed to help traders identify favorable market conditions and make informed decisions in their trades.
Indicator Description
The Cutrim Theory is an advanced indicator that combines candlestick pattern analysis, and market imbalances to give a clear view of market conditions. The tool uses multi-timeframe data and displays dynamic tables to facilitate visual analysis on the main chart and histogram.
Key Features:
Multi-Timeframe Imbalance Analysis:
The indicator calculates buy and sell imbalances based on the number of green and red candles in different timeframes.
Users can choose to display all imbalances, only the last imbalance, or turn off this feature.
Dynamic and Flexible Tables:
Main Table: Shows detailed data for different timeframes, such as the percentage of bullish and bearish candles, the size of the last candle, and the average candle size.
Dynamic Table Position: The table on the main chart can be set to automatically move based on the current price position (upper or lower). Users can also manually set the position.
Histogram Table: Displays a summary of key information in an additional table on the histogram.
Visualization of Averages and Candle Sizes:
Displays histograms and moving average lines for candle sizes, providing a clear visualization of current market volatility.
Imbalance Signals:
The indicator also adds "Buy" and "Sell" labels directly on the main chart when an imbalance is detected, helping traders spot trading opportunities.
Customizable Settings:
Imbalance Options: "Turn Off All," "Last Imbalance," or "All Imbalances."
Main Table Positions: "top_left," "top_right," "bottom_left," "bottom_right," or "Dynamic."
Signal Messages: Customize the "Buy" and "Sell" messages.
Benefits:
Provides a clear and intuitive view of market conditions across multiple timeframes.
Facilitates the detection of imbalances and market shifts.
Highly configurable to meet the needs of different types of traders.
This script is a powerful addition to any trader's toolbox who seeks a detailed and multi-timeframe analysis based on Ronal Cutrim's Probabilistic Theory. Enjoy and adjust according to your trading style!
Auto Harmonic Pattern - PRO [AlgoScopes] V1Harmonic Patterns is a powerful tool for identifying potential reversal areas in the financial markets. Auto Harmonic Pattern Pro it is based on the work of Scott Carney, a renowned trader and author who developed the concept of harmonic patterns.
Scott Carney's extensive research and contributions have greatly enhanced our understanding of market patterns and their application in trading. Auto Harmonic Pattern Pro is adapted from Scott Carney's original work on harmonic patterns, as well as other sources that have contributed to the recognition and understanding of harmonic patterns beyond Carney's initial research.
Auto Harmonic Pattern Pro offers traders a valuable tool for identifying potential reversal zones in the markets. We would like to express our gratitude to Scott Carney for his pioneering work in developing harmonic patterns, as well as to the various contributors and sources that have expanded our knowledge and understanding of harmonic patterns beyond Carney's original research.
Remember to always practice proper risk management and combine the indicator's signals with other technical analysis tools for a comprehensive trading approach.
For more information about Scott Carney and his work on harmonic patterns, you can find additional resources on his official website.
💠 ABOUT THE SCRIPT
💎 DISPLAY
⚬ The following things are displayed by default on the chart
🔸 Live patterns in trade with XABCD labels. (filled major triangle)
🔸 Entry, Stop and Target levels on chart for all live patterns. Target level are dimmed along with reducing size when they become irrelevant
🔸 Open Trades Stat table - Show patterns ID, patterns name, status for patterns, size&age, Entry, I.Stop, T.Stop and Targets (TP1 - TP4).
⚬ Highlighted present stop (and/or trailing stop if is enabled) and next target
⚬ When there are multiple patterns on chart, Entry, Stop, and Target labels & lines & PRZ* boxes are created with specific distance from each other to provide clarity to the users
*(potential reversal zone)
⬜ SETTINGS
⚬ Let's talk about some of the settings. Almost all of these settings have already been optimized and tested over time, but for some tickers it might be better to do a new test.
💎 ZIGZAG
🔸 Length - Default is set to 8. User can change settings but it is a good idea to keep with fibonacci (5, 13, 21, 34, 55 etc)
🔸 Depth - This setting is for how many pivots indicator scan to find harmonic pattern. By default it is set as 200
🔸 Recursive Algorithm - Enabled will use recursive instead standard zigzag
💎 HARMONIC PATTERN SETTINGS
🔸 Trade Direction - Default is set to show all (bearish and bullish) harmonic patterns. Can be filtered to bullish or bearish direction.
🔸 Error Percent - Default is 8. That is error percent tolerance from perfect pattern ratio.
🔸 Maximum patterns - Maximum patterns allowed on chart at any time
⚬ When it reaches the maximum patterns and the indicator finds a new one, the old patterns will be removed
- (important for algo traders because alerts for those removed patterns will no longer be a trigger)
🔸 Pattern size
⚬ Without filter will show all patterns (regardless of size)
⚬ Show only patterns for user preference size (no more two patterns because is smaller of 280 bars)
🔸 External Filter - It can be used to filter harmonic patterns. You can build your own custom trend based scripts and use it with AHP to filter trades.
⚬ The structure of the external script must be
1 for Long/Bullish patterns
-1 for Short/Bearish patterns
2 for all (Long and Short patterns)
0 Trade is not allowed
🔸 Filter Pattern Starts
⚬ When Filter starts is enabled pattern will start for logical pivot (see example)
⚬ Disabled filter will show more patterns (still can be very profitable)
💎 STOP & ENTRY & TRAILING STOP
🔸 Trail Entry Price - If Entry is still not reached and the price is still in PRZ zone, at the new high/low will adjust Entry.
⚬ Open Stats table will show the first Entry (when patterns were found) as well as the last corrected Entry (when patterns reached Entry level).
⚬ Disable this option Entry will remain at the level when patterns are found.
🔸 Enable Targets (awaiting entry) - enabled will show potential Targets for "awaiting entry" patterns (not active patterns because they have not yet reached Entry).
⚬ The Open stats table will show all other information, risk %, R:R etc).
⚬ Risky trade but with very good R:R (not recommended for inexperienced traders, very high risk of trading hitting Stop before reaching a Target)
🔸 Stop Distance - By default is set to 5. That is percent from the last low/high when the pattern reaches Entry. Stop trail from price till pattern reached Entry level.
🔸 Entry Distance - By default is set to 16. Same for SL that is percent distance from live price. You can increase/decrease percent but remember you have to give space between live price and the entry.
⚬ If entry is close to price, trade will become active too quickly
⚬ Remember if you change Stop Distance as well as Entry Distance to check Risk : Reward (recommended R:R for the first target is about 1:1)
🔸 Trailing Type - Options for trailing type, Continuous, Stepped, Breakeven and Disabled.
⚬ Continuous - When the price reaches "Trailing Active" (initial level for activating the trailing stop), T.Stop will start from Entry or Initial Stop (based on "Trailing Starts") and follow the price by Distance or Percent (based on "Trailing by").
- example one (trailing starts from Initial Stop when TP1 reached by distance/price on picture 1 and by percent on picture 2)
- example two (trailing starts from Entry when TP1 reached by distance/price on picture 1 and by percent on picture 2)
⚬ Stepped - when price reaches Trailing Active (initial level for activating the trailing stop), T.Stop will move to the previous level
- (If "Trailing Active" is set to Target2, then T.Stop will move to Target1 when price reached TP2)
⚬ Breakeven - when price reaches Trailing Active (initial level for activating the trailing stop), T.Stop will move to Entry and stay there the entire time for that harmonic trade
- (till reached all targets or reached T.Stop)
🔸 Trailing Active - When will the Trailing Stop be activated ("Trailing Type" must be enabled)
🔸 Trailing by - Distance or Percent
⚬ Distance - T.Stop will follow live price by initial distance
⚬ Percent - T.Stop will follow live price by initial percent
🔸 Trailing Starts - Entry or Initial Stop
⚬ Entry - T.Stop will start trailing from Entry level
⚬ I.Stop - T.Stop will start trailing from initial Stop level
- (Check Continuous picture for information)
💎 TARGET
🔸 Base - The level from which the calculation for Targets is made.
🔸 Target 1/Target 4 dropdown - Targets are set by default and set in the dropdown most often used for those targets.
🔸 Target 1/Target 4 custom - If the desired ratio is not in the dropdown, then it is possible to manually enter the desired ratio.
⚬ (If you want to change some of the targets, maybe to confluence with support/resistance)
💎 PATTERNS
🔸 Harmonic Patterns Type
⚬ Enable/Disable harmonic patterns by Type of patterns (for Classic and Anti patterns)
⚬ By default all patterns are enabled (for standard patterns). Users can control and select/deselect all Classic, Anti or Non Standard patterns but also disable individual patterns.
⚬ For some patterns (like Shark and Navarro 200) we change PRZ or place in different Type groups. That is just cosmetic things.
🔸 Classic - This includes all and most popular Harmonic Patterns.
⚬ Gartley (Type I)
⚬ Bat (Type I)
⚬ Butterfly (Type II)
⚬ Crab (Type II)
⚬ Deep Crab (Type II)
⚬ Cypher (Type II)
⚬ Shark (Type III)
⚬ Nenstar (Type IV)
🔸 Anti Patterns
⚬ Anti Nenstar (Type I)
⚬ Anti Shark (Type II)
⚬ Anti Cypher (Type II)
⚬ Anti Crab (Type II)
⚬ Anti Butterfly (Type III)
⚬ Anti Bat (Type IV)
⚬ Anti Gartley (Type IV)
⚬ Navarro 200 (Type IV)
🔸 Non Standard -
⚬ White Swan
⚬ Black Swan
⚬ 3 Drive
⚬ Anti 3 Drive
⚬ Wolfe
⚬ Snorm
⚬ 121 Pattern
⚬ 5-0 Pattern
⚬ Sea Pony
⚬ Leonardo
💎 PATTERN DISPLAY OPTION
🔸 Pattern Lines Size - thickness for harmonic patterns
🔸 Pattern Lines Type - type for harmonic pattern lines (solid, dotted, dashed)
🔸 Fill XAB/BCD - major harmonic triangle
🔸 Fill ABC/XBD - minor harmonic triangle
🔸 Enable XABCD Label - labels for harmonic pattern
🔸 XABCD Label Size - size for harmonic xabcd labels
🔸 Enable Ratio Label & Line - lines and labels that connect harmonic patterns levels and that show the patterns ratio
🔸 Ratio Label Size - ratio labels size
⚬ Lines for pattern ratio are set by default dashed and can’t be changed.
💎 PRZ & ENTRY | STOP | TARGET SETTINGS
🔸 Entry & Stop & Target Labels - by default is set to small (opt small & normal)
🔸 Entry & Stop & Target Lines - by default is set to show lines & labels & price (opt lines & labels & price or lines & labels or disable all)
🔸 PRZ Box size - size in bars for PRZ box
⚬ Added option when it is not readable on chart pattern names or entry/stop/targets offset
⚬ Maximum (last pattern) can be drawn up to 500 bars in future or you will get error for script (use this option only when you need)
🔸 PRZ Box Type of Spacing - distance between PRZ boxes. "Auto" will make the maximum distance when there are more than 3 patterns on the chart for better visibility
- (the maximum can be projected up to 500 bars in the future)
🔸 PRZ Box Manual Spacing - manual distance between PRZ boxes if is “PRZ Box Type of Spacing” set to manual
💎 STATS AND DISPLAY
⚬ These settings can be used to manage display of open and close statistic tables
🔸 Open Trades - By default is enabled and set to the top right position.
🔸 Closed Trades - By default is disabled and set to bottom left position.
⚬ The size of the table can be changed (by default it is set to small)
🔸 Enable Tool Tip for Table - can be enabled/disabled. Shows important information for each section related to Open or Closed tables.
⚬ Recommended enabled until everything related to tables is understood, and later disabled (it starts to get annoying when you accidentally cross the tables with the mouse and tooltip box pop up)
💎 OPEN STATS
🔸 Percentage - show percentage for Targets and Stops
🔸 Risk/Reward - show patterns risk to reward for each Targets
🔸 Size/Age - show patterns size (from X to D in bars) and patterns age (distance in bars when patterns “In Trade”)
🔸 Live % & R:R - enabled will show live % and R:R if you take trade in that moment
💎 CLOSED STATS
🔸 Percentage - show stats by percent instead of numbers
🔸 Display Mode - Closed trade table have three display option, Compact, Detailed and Selective
⚬ Compact - show stats for Long/Bullish and Short/Bearish patterns
⚬ Selective - show stats just for active patterns
⚬ Detailed - show stats for each enabled patterns
- All stats is for “Backtest Bars” if enabled.
- I removed some things from the previous indicator (R:R as well as trailing R:R and win rate) because I think they are not relevant in Closed Table for trade or for statistics (Open Table have that)
💎 PATTERN | CHART COLOR THEME
⚬ By default it is set to Light color theme. Color theme will affect pattern lines, XABCD labels, ratio lines and label, entry/sl/targets labels and text in the open statistics table.
🔸 Dark Theme / Light Theme - Users can change any default individual color for dark or light theme (transparency too).
⚬ Light/Dark Theme suits dark or light chart background or user can change all color to preferred trade style.
⚬ Users have extra control to change all color to preferred trade style.
💎 ALERTS
⚬ Alerts - These settings help users to choose the type of alerts they want to receive.
🔸 New - New Harmonic Pattern is identified
🔸 Entry - Harmonic Pattern reached Entry level
🔸 Target 1/Target4 - Alert when patterns reached on of Target levels
🔸 Closure - Harmonic Pattern trade is closed. Reached all Targets or Stop or Trailing Stop (if is enabled)
🔸 Long & Short placeholders - Enabled will change for alerts Bullish/Bearish text for Long/Short text
⚬ example of custom alerts with some placeholders
💎 BACKTEST WINDOW
🔸 Backtest bars - Enabled will scan patterns for that bar range (default is set to 5000)
🔷 TOOL TIP
⚬ In setting you have help from tooltip to give you almost all this information for easy understanding. Hover mouse above tool tip and windows with info will appear.
⚬ On the chart, tool tip is added for each individual Harmonic pattern to show extra information (pattern ratio, type of harmonic and where often that pattern appears in Elliott wave fractal)
⚬ Tooltip for tables will also provide all the information related to Open and Closed tables. Disabled tooltip for tables will hide all information, but the tooltip for patterns will still remain.
🔴 Possible Errors
⚬ If a mistake is made in the settings and, for example, TP2 is set to 0.618 ratio and TP3 is changed to 0.5 ratio
- (the larger target is set to a smaller ratio than the smaller target), a red text will appear over most charts to indicate the error.
⚬ If Trailing Type is enabled and "Trailing Active" and "Trailing Starts" are set to the same level (Entry), a red text will appear on the charts to indicate an error
- (change "Trailing Active" to a higher level, TP1, or lower "Trailing Starts " to "I.Start")