ADR/ATR Session No Probability Table by LKHere you go—clear, English docs you can drop into your script’s description or share with teammates.
ADR/ATR Session by LK — Overview
This indicator summarizes Average Daily Range (ADR) and Average True Range (ATR) for two horizons:
	•	Session H4 (e.g., 06:00–13:00 on a 4‑hour chart)
	•	Daily (D)
It shows:
	•	Current ADR/ATR values (using your chosen smoothing method)
	•	How much of ADR/ATR today/this bar has already been consumed (% of ADR/ATR)
	•	ADR/ATR as a percent of price
	•	Optional probability blocks: likelihood that %ADR will exceed user‑defined thresholds over a lookback window
	•	Optional on‑chart lines for the current H4 and Daily candles: Open, ADR High, ADR Low
⸻
What the metrics mean
	•	ADR (H4 / D): Moving average of the bar range (high - low).
	•	ATR (H4 / D): Moving average of True Range (max(hi-lo, |hi-close |, |lo-close |)).
	•	% of ADR (curr H4): (H4 range of the current H4 bar) / ADR(H4) × 100. Updates live even if the current time is outside the session.
	•	% of ADR (Daily): (today’s intra‑day range) / ADR(D) × 100.
	•	% of ATR (curr H4 / Daily): TR / ATR × 100 for that horizon.
	•	ADR % of Price / ATR % of Price: ADR or ATR divided by current price × 100 (a quick “volatility vs. price” gauge).
Session logic (H4): ADR/ATR(H4) only update on bars that fall inside the configured session window; outside the window the values hold steady (no recalculation “bleed”).
Daily range tracking: The indicator tracks today’s high/low in real‑time and resets at the day change.
⸻
Inputs (quick reference)
Core
	•	Length (ADR/ATR): smoothing length for ADR/ATR (default 21).
	•	Wait for Higher TF Bar Close: if true, updates ADR/ATR only after the higher‑TF bar closes when using request.security.
Timeframes
	•	Session Timeframe (H4): default 240.
	•	Daily Timeframe: default D.
Session time
	•	Session Timezone: “Chart” (default) or a fixed timezone.
	•	Session Start Hour, End Hour (minutes are fixed to 0 in this version).
Smoothing methods
	•	H4 ADR Method / H4 ATR Method: SMA/EMA/RMA/WMA.
	•	Daily ADR Method / Daily ATR Method: SMA/EMA/RMA/WMA.
Table appearance
	•	Table BG, Table Text, Table Font Size.
Lines (optional)
	•	Show current H4 segments, Show current Daily segments
	•	Line colors for Open / ADR High / ADR Low
	•	Line width
Probability
	•	H4 Probability Lookback (bars): number of H4 bars to examine (e.g., 300).
	•	Daily Probability Lookback (days): number of D bars (e.g., 180).
	•	ADR thresholds (%): CSV list of thresholds (e.g., 25,50,55,60,65,70,75,80,85,90,95,100,125,150).
The table will show the % of lookback bars where %ADR ≥ threshold.
Tip: If you want probabilities only for session H4 bars (not every H4 bar), ask and I can add a toggle to filter by inSess.
⸻
How to read the table
H4 block
	•	ADR (method) / ATR (method): the session‑aware averages.
	•	% of ADR (curr H4): live progress of this H4 bar toward the session ADR.
	•	ADR % of Price: ADR(H4) relative to price.
	•	% of ATR (curr H4) and ATR % of Price: same idea for ATR.
H4 Probability (lookback N bars)
	•	Rows like “≥ 80% ADR” show the fraction (in %) of the last N H4 bars that reached at least 80% of ADR(H4).
Daily block
	•	Mirrors the H4 block, but for Daily.
Daily Probability (lookback M days)
	•	Rows like “≥ 100% ADR” show the fraction of the last M daily bars whose daily range reached at least 100% of ADR(D).
⸻
Practical usage
	•	Use % of ADR (curr H4 / Daily) to judge exhaustion or room left in the day/session.
E.g., if Daily %ADR is already 95%, be cautious with momentum continuation trades.
	•	The probability tables give a quick historical context:
If “≥ 125% ADR” is ~18%, the market rarely stretches that far; your trade sizing/targets can reflect that.
	•	ADR/ATR % of Price helps normalize volatility between instruments.
⸻
Troubleshooting
	•	If probability rows are blank: ensure lookback windows are large enough (and that the chart has enough history).
	•	If ADR/ATR show … (NA): usually you don’t have enough bars for the chosen length/TF yet.
	•	If line segments are missing: verify you’re on a chart with visible current H4/D bars and the toggles are enabled.
⸻
Notes & customization ideas
	•	Add a toggle to count only session bars in H4 probability.
	•	Add separate thresholds for H4 vs Daily.
	•	Let users pick minutes for session start/end if needed.
	•	Add alerts when %ADR crosses specified thresholds.
If you want me to bundle any of the “ideas” above into the code, say the word and I’ll ship a clean patch.
在脚本中搜索"美联储9月降息25个基点"
Smart Money Proxy IndexOverview 
The Smart Money Proxy Index (SMPI) is an educational tool that attempts to identify potential institutional-style behavior patterns using publicly available market data. This comprehensive tool combines multiple institutional analysis techniques into a single, easy-to-read 0-100 oscillator.
 Important Disclaimer 
This is an educational proxy indicator that analyzes volume and price patterns. It cannot identify actual institutional trading activity and should not be interpreted as tracking real "smart money." Use for educational purposes and combine with other analysis methods.
 Inspiration & Methodology 
This indicator is inspired by MAPsignals' Big Money Index (BMI) methodology but uses publicly available price and volume data with original calculations. This is an independent educational interpretation designed to teach smart money concepts to retail traders. 
 What It Analyzes 
SMPI tracks potential "smart money" activity by combining:
 
 Block Trading Detection - Identifies unusual volume surges with significant price impact
 Money Flow Analysis - Volume-weighted price pressure using Money Flow Index
 Accumulation/Distribution Patterns - Modified On-Balance Volume signals
 Institutional Control Proxy - End-of-day positioning and control analysis
 
 Key Features 
– Multi-Component Analysis - Combines 4 different institutional detection methods
– BMI-Style 0-100 Scale - Familiar oscillator range with clear extreme levels
– Professional Visualization - Dynamic colors, gradient fills, and clean data table
– Comprehensive Alerts - Buy/sell signals plus divergence detection
– Fully Customizable - Adjust all parameters, colors, and display options
– Non-Repainting Signals - All alerts use confirmed data for reliability
– Educational Focus - Designed to teach institutional flow concepts
 How to Interpret 
 
 Above 80: Potential smart money distribution phase (bearish pressure)
 Below 20: Potential smart money accumulation phase (bullish opportunity)
 Signal Generation: Buy signals when crossing above 20, sell signals when crossing below 80
 Divergences: Price vs SMPI divergences can signal potential trend changes
 Volume Confirmation: Higher volume ratios strengthen signal reliability
 
 Best Practices 
 
 Timeframes: Works best on higher timeframes for institutional behavior analysis
 Confirmation: Combine with other technical analysis tools and market context
 Volume: Pay attention to volume confirmation in the data table
 Context: Consider overall market conditions and fundamental factors
 Risk Management: Not recommended as standalone trading system
 
 Customizable Parameters 
 
 Block Volume Threshold: Sensitivity for unusual volume detection (default: 2.5x average)
 SMPI Smoothing Period: Index calculation smoothing (default: 25 bars)
 Extreme Levels: Overbought/oversold thresholds (default: 80/20)
 Money Flow Length: MFI calculation period (default: 14)
 Visual Options: Colors, signals, and display preferences
 
 Available Alerts 
 
 Buy Signal: SMPI crosses above oversold level (20)
 Sell Signal: SMPI crosses below overbought level (80)
 Extreme Levels: Alerts when reaching overbought/oversold zones
 Divergence Detection: Bullish and bearish price vs SMPI divergences
 
 Educational Purpose & Limitations 
This indicator is designed as an educational proxy for understanding institutional flow concepts. It analyzes publicly available price and volume data to identify potential smart money behavior patterns.
 
 Cannot access actual institutional transaction data
 Signals may be slower than day-trading indicators (intentionally designed for institutional timeframes)
 Should be used in conjunction with other analysis methods
 Past performance does not guarantee future results
 
 What Makes This Different 
Unlike simple volume or momentum indicators, SMPI combines multiple institutional analysis techniques into one comprehensive tool. The multi-component approach provides a more robust view of potential smart money activity.
Signal Stack MeterWhat it is
A lightweight “go or no‑go” meter that combines your manual read of Structure, Location, and Momentum with automatic context from volatility and macro timing. It surfaces a single, tradeable answer on the chart: OK to engage or Standby.
Why traders like it
You keep your discretion and nuance, and the meter adds guardrails. It prevents good trade ideas from being executed in the wrong conditions.
What it measures
Manual buckets you set each day: Structure, Location, Momentum from 0 to 2
Volatility from VIX, term structure, ATR 5 over 60, and session gaps
Time windows for CPI, NFP, and FOMC with ET inputs and an exchange‑offset
Total score and a simple gate: threshold plus a “strong bucket” rule you choose
How to use in 30 seconds
Pick a preset for your market.
Set Structure, Location, Momentum to 0, 1, or 2.
Leave defaults for the auto metrics while you get a feel.
Read the header. When it says OK to engage, you have both your read and the context.
Defaults we recommend
OK threshold: 5
Strong bucket rule: Either Structure or Location equals 2
VIX triggers: 22 and 1.25× the 20‑SMA
Term mode: Diff at 0.00 tolerance. Ratio mode at 1.00+ is available
ATR 5/60 defense: 1.25. Offense cue: 0.85 or lower
ATR smoothing: 1
Gap mode: RTH with 0.60× ATR5 wild gap. ON wild range at 0.80× ATR5
CPI window 08:25 to 08:40 ET. FOMC window 13:50 to 14:30 ET
ET to exchange offset: −60 for CME index futures. Set to 0 for NYSE symbols like SPY
Alert cadence: Once per RTH session. Snooze first 30 minutes optional
New since the last description
Parity with Defense Mode for presets, sessions, ratio vs diff term mode, ATR smoothing, RTH‑key cadence, and snooze options
Event windows in ET with a simple offset to your exchange time
Alternate row backgrounds and full color control for readability
Exposed series for automation: EngageOK(1=yes) plus TotalScore
Debug toggle to see ATR ratio, term, and gap measurements directly
Notes
Dynamic alerts require “Any alert() function call”.
The meter is designed to sit opposite Defense Mode on the chart. Use the position input to avoid overlap.
Position Sizing Risk TablePosition Sizing Risk Table - swing trading. Allowing for a 0,25; 0,5 and 1% risk based on NAV
Canuck Trading Traders Strategy [Candle Entropy Edition]Canuck Trading Traders Strategy: A Unique Entropy-Based Day Trading System for Volatile Stocks
Overview
The Canuck Trading Traders Strategy is a custom, entropy-driven day trading system designed for high-volatility stocks like TSLA on short timeframes (e.g., 15m). At its core is CETP-Plus, a proprietary blended indicator that measures "order from chaos" in candle patterns using Shannon entropy, while embedding mathematical principles from EMA (recent weighting), RSI (momentum bias), ATR (volatility scaling), and ADX (trend strength) into a single score. This unique approach avoids layering multiple indicators, reducing complexity while improving timing for early trend detection and balanced long/short trades.
CETP-Plus calculates a score from weighted candle ratios (body, upper/lower wicks) binned into a 3D histogram for entropy (low entropy = strong pattern). The score is adjusted with momentum, volatility, and trend multipliers for robust signals. Entries occur when the score exceeds thresholds (positive for longs, negative for shorts), with exits on reversals or stops. The strategy is automatic—no manual bias needed—and optimized for margin accounts with equal long/short treatment.
Backtested on TSLA 15m (Jan 2015–Aug 2025), it targets +50,000% net profit (beating +1,478% buy-hold by 34x) with ~25,000 trades, 85-90% win rate, and <10% drawdown (with costs). Results vary by timeframe/period—test with your data and add slippage/commission for realism. Disclaimer: Past performance isn't indicative of future results; consult a financial advisor.
Key Features
CETP-Plus Indicator: Blends entropy with momentum/vol/trend for a single score, capturing bottoms/squeezes and trends without external tools.
Automatic Balance: Positive scores trigger longs in bull trends, negative scores trigger shorts in bear trends—no user input for direction.
Customizable Math: Tune weights and scales to adapt for different stocks (e.g., lower thresholds for NVDA's smoother trends).
Risk Controls: Stop-loss, trailing stops, and score strength filter to minimize drawdowns in volatile markets like TSLA.
Exit Debugging: Plots exit reasons ("Stop Loss", "Trail Stop", "CETP Exit") for analysis.
Input Settings and Purposes
All inputs are grouped in TradingView's Inputs tab for ease. Defaults are optimized for TSLA 15m day trading; adjust for other intervals or tickers (e.g., increase window for 1h, lower thresholds for NVDA).
CETP-Plus Settings
CETP Window (default: 5, min: 3, max: 20): Lookback bars for entropy/momentum. Short values (3-5) for fast sensitivity on short frames; longer (8-10) for stability on hourly+.
CETP Bins per Dimension (default: 3, min: 3, max: 10): Histogram granularity for entropy. Low (3) for speed/simple patterns; high (5+) for detail in complex markets.
Long Threshold (default: 0.15, min: 0.1, max: 0.8, step: 0.05): CETP score for long entries. Lower (0.1) for more longs in mild bull trends; higher (0.2) to filter noise.
Short Threshold (default: -0.05, min: -0.8, max: -0.1, step: 0.05): CETP score for short entries. Less negative (-0.05) for more shorts in mild bear trends; more negative (-0.2) for strong signals.
CETP Momentum Weight (default: 0.8, min: 0.1, max: 1.0, step: 0.1): Emphasizes momentum in score. High (0.9) for aggressive in fast moves; low (0.5) for entropy focus.
Momentum Scale (default: 1.6, min: 0.1, max: 2.0, step: 0.1): Amplifies momentum. High (2.0) for short intervals; low (1.0) for stability.
Body Ratio Weight (default: 1.2, min: 0.0, max: 2.0, step: 0.1): Weights candle body in entropy (trend focus). High (1.5) for strong trends; low (0.8) for wick emphasis.
Upper Wick Ratio Weight (default: 0.8, min: 0.0, max: 2.0, step: 0.1): Weights upper wick (reversal noise). Low (0.5) to reduce false ups.
Lower Wick Ratio Weight (default: 0.8, min: 0.0, max: 2.0, step=0.1): Weights lower wick. Low (0.5) to reduce false downs.
Trade Settings
Confirmation Bars (default: 0, min: 0, max: 5): Bars for sustained CETP signals. 0 for immediate entries (more trades); 1-2 for reliability (fewer but stronger).
Min CETP Score Strength (default: 0.04, min: 0.0, max: 0.5, step: 0.05): Min absolute score for entry. Low (0.04) for more trades; high (0.15) for quality.
Risk Management
Stop Loss (%) (default: 0.5, min: 0.1, max: 5.0, step: 0.1): % from entry for stop. Tight (0.4) for quick exits; wide (0.8) for trends.
ATR Multiplier (default: 1.5, min: 0.5, max: 3.0, step: 0.1): Scales ATR for stops/trails. Low (1.0) for tight; high (2.0) for room.
Trailing ATR Mult (default: 3.5, min: 0.5, max: 5.0, step: 0.1): ATR mult for trails. High (4.0) for longer holds; low (2.0) for profits.
Trail Start Offset (%) (default: 1.0, min: 0.5, max: 2.0, step: 0.1): % profit before trailing. Low (0.8) for early lock-in; high (1.5) for bigger moves.
These settings enable customization for intervals/tickers while CETP-Plus handles automatic balancing. 
Risk Disclosure
Trading involves significant risk and may result in losses exceeding your initial capital. The Canuck Trading Trader Strategy is provided for educational and informational purposes only. Users are responsible for their own trading decisions and should conduct thorough testing before using in live markets. The strategy’s high trade frequency requires reliable execution infrastructure to minimize slippage and latency.
Information Theory Market AnalysisINFORMATION THEORY MARKET ANALYSIS
OVERVIEW
This indicator applies mathematical concepts from information theory to analyze market behavior, measuring the randomness and predictability of price and volume movements through entropy calculations. Unlike traditional technical indicators, it provides insight into market structure and regime changes.
KEY COMPONENTS
Four Main Signals:
• Price Entropy (Deep Blue): Measures randomness in price movements
• Volume Entropy (Bright Blue): Analyzes volume pattern predictability  
• Entropy MACD (Purple): Shows relationship between price and volume entropy
• SEMM (Royal Blue): Stochastic Entropy Market Monitor - overall market randomness gauge
Market State Detection:
The indicator identifies seven distinct market states:
• Strong Trending (SEMM < 0.1)
• Weak Trending (0.1-0.2) 
• Neutral (0.2-0.3)
• Moderate Random (0.3-0.5)
• High Randomness (0.5-0.8)
• Very Random (0.8-1.0)
• Chaotic (>1.0)
KEY FEATURES
Advanced Analytics:
• Signal Strength Confluence: 0-5 scale measuring alignment of multiple factors
• Entropy Crossovers: Detects shifts between accumulation and distribution phases
• Extreme Readings: Identifies statistical outliers for potential reversals
• Trend Bias Analysis: Directional momentum assessment
Information Dashboard:
• Real-time entropy values and market state
• Signal strength indicator with visual highlighting
• Trend bias with directional arrows
• Color-coded alerts for extreme conditions
Customizable Display:
• Adjustable SEMM scaling (5x to 100x) for optimal visibility
• Multiple line styles: Smooth, Stepped, Dotted
• 9 table positions with 3 size options
• Professional blue color scheme with transparency controls
Comprehensive Alert System - 15 Alert Types Including:
• Extreme entropy readings (price/volume)
• Crossover signals (dominance shifts)
• Market state changes (trending ↔ random)
• High confluence signals (3+ factors aligned)
HOW TO USE
Reading the Signals:
• Entropy Values > ±25: Strong structural signals
• Entropy Values > ±40: Extreme readings, potential reversals
• SEMM < 0.2: Trending market favors directional strategies
• SEMM > 0.5: Random market favors range/scalping strategies
Signal Confluence:
Look for multiple factors aligning:
• Signal Strength ≥ 3.0 for higher probability setups
• Background highlighting indicates confluence
• Table shows real-time strength assessment
Timeframe Optimization:
• Short-term (1m-15m): Entropy Length 14-22, Sensitivity 3-5
• Swing Trading (1H-4H): Default settings optimal
• Position Trading (Daily+): Entropy Length 34-55, Sensitivity 8-12
EDUCATIONAL APPLICATIONS
Market Structure Analysis:
• Understand when markets are trending vs. ranging
• Identify accumulation and distribution phases
• Recognize extreme market conditions
• Measure information content in price movements
Information Theory Concepts:
• Binary entropy calculations applied to financial data
• Probability distribution analysis of returns
• Statistical ranking and percentile analysis
• Momentum-adjusted randomness measurement
TECHNICAL DETAILS
Calculations:
• Uses binary entropy formula: - 
• Percentile ranking across multiple timeframes
• Volume-weighted probability distributions
• RSI-adjusted momentum entropy (SEMM)
Customization Options:
• Entropy Length: 5-100 bars (default: 22)
• Average Length: 10-200 bars (default: 88)
• Sensitivity: 1.0-20.0 (default: 5.0, lower = more sensitive)
• SEMM Scaling: 5.0-100.0x (default: 30.0)
IMPORTANT NOTES
Risk Considerations:
• Indicator measures probabilities, not certainties
• High SEMM values (>0.5) suggest increased market randomness
• Extreme readings may persist longer than expected
• Always combine with proper risk management
Educational Purpose:
This indicator is designed for:
• Market structure analysis and education
• Understanding information theory applications in finance
• Developing probabilistic thinking about markets
• Research and analytical purposes
Performance Tips:
• Allow 200+ bars for proper initialization
• Adjust scaling and transparency for optimal visibility
• Use confluence signals for higher probability analysis
• Consider multiple timeframes for comprehensive analysis
DISCLAIMER
This indicator is for educational and analytical purposes. It does not constitute financial advice. Past performance does not guarantee future results. Always conduct your own research and consider your risk tolerance before making trading decisions.
Version: 5.0
Category: Oscillators, Volume, Market Structure
Best For: All timeframes, trending and ranging markets
Complexity: Intermediate to Advanced
[Stratégia] VWAP Mean Magnet v9 (Simple Alert)This strategy is specifically designed for a ranging (sideways-moving) Bitcoin market.
A trade is only opened and signaled on the chart if all three of the following conditions are met simultaneously at the close of a candle:
Zone Entry
The price must cross into the signal zone: the red band for a Short (sell) position, or the green band for a Long (buy) position.
RSI Confirmation
The RSI indicator must also confirm the signal. For a Short, it must go above 65 (overbought condition). For a Long, it must fall below 25 (oversold condition).
Volume Filter
The volume on the entry candle cannot be excessively high. This safety filter is designed to prevent trades during risky, high-momentum breakouts.
Rsi bar, divergences, tether line, ema 20,50 -Ema 20,50
-Tether Line dominance
-Buy/sell pressure
-Rsi last candle
-byu sell signal
-rsi divergence
-macd divergence
-Coloured candles 25,30 rsi and 70 rsi 
simple trend Scanner Dashboard Script Does
- Calculates key metrics:
- Percent Change from previous day
- Relative Volume (% vs 10-bar average)
- RSI and ADX for strength/trend
- 20 EMA for dynamic support/resistance
- Classifies market condition:
- 🟢 Strong if RSI > 60 and ADX > 25
- 🔴 Weak if RSI < 40 and ADX < 20
- ⚪ Neutral otherwise
- Displays a table dashboard:
- Compact, color-coded summary of all metrics
- Easy to scan visually
- Plots visual signals:
- Arrows and triangles for percent change and volume spikes
- Data window plots for deeper inspection
Crypto Options Greeks & Volatility Analyzer [BackQuant]Crypto Options Greeks & Volatility Analyzer  
 Overview 
The Crypto Options Greeks & Volatility Analyzer is a comprehensive analytical tool that calculates Black-Scholes option Greeks up to the third order for Bitcoin and Ethereum options. It integrates implied volatility data from VOLMEX indices and provides multiple visualization layers for options risk analysis.
 Quick Introduction to Options Trading 
Options are financial derivatives that give the holder the right, but not the obligation, to buy or sell an underlying asset at a predetermined price (strike price) within a specific time period (expiration date). Understanding options requires grasping two fundamental concepts:
 Call Options : Give the right to buy the underlying asset at the strike price. Calls increase in value when the underlying price rises above the strike price.
 Put Options : Give the right to sell the underlying asset at the strike price. Puts increase in value when the underlying price falls below the strike price.
 The Language of Options: Greeks 
Options traders use "Greeks" - mathematical measures that describe how an option's price changes in response to various factors:
 
 Delta : How much the option price moves for each $1 change in the underlying
 Gamma : How fast delta changes as the underlying moves
 Theta : Daily time decay - how much value erodes each day
 Vega : Sensitivity to implied volatility changes
 Rho : Sensitivity to interest rate changes
 
 
These Greeks are essential for understanding risk. Just as a pilot needs instruments to fly safely, options traders need Greeks to navigate market conditions and manage positions effectively.
 Why Volatility Matters 
Implied volatility (IV) represents the market's expectation of future price movement. High IV means:
 
 Options are more expensive (higher premiums)
 Market expects larger price swings
 Better for option sellers
 
Low IV means:
 
 Options are cheaper
 Market expects smaller moves
 Better for option buyers
 
 
This indicator helps you visualize and quantify these critical concepts in real-time.
  Back to the Indicator 
 Key Features & Components 
 1. Complete Greeks Calculations 
The indicator computes all standard Greeks using the Black-Scholes-Merton model adapted for cryptocurrency markets:
 First Order Greeks: 
 
 Delta (Δ) : Measures the rate of change of option price with respect to underlying price movement. Ranges from 0 to 1 for calls and -1 to 0 for puts.
 Vega (ν) : Sensitivity to implied volatility changes, expressed as price change per 1% change in IV.
 Theta (Θ) : Time decay measured in dollars per day, showing how much value erodes with each passing day.
 Rho (ρ) : Interest rate sensitivity, measuring price change per 1% change in risk-free rate.
 
 
 Second Order Greeks: 
 
 Gamma (Γ) : Rate of change of delta with respect to underlying price, indicating how quickly delta will change.
 Vanna : Cross-derivative measuring delta's sensitivity to volatility changes and vega's sensitivity to price changes.
 Charm : Delta decay over time, showing how delta changes as expiration approaches.
 Vomma (Volga) : Vega's sensitivity to volatility changes, important for volatility trading strategies.
 
 
 Third Order Greeks: 
 
 Speed : Rate of change of gamma with respect to underlying price (∂Γ/∂S).
 Zomma : Gamma's sensitivity to volatility changes (∂Γ/∂σ).
 Color : Gamma decay over time (∂Γ/∂T).
 Ultima : Third-order volatility sensitivity (∂²ν/∂σ²).
 
 
 2. Implied Volatility Analysis 
The indicator includes a sophisticated IV ranking system that analyzes current implied volatility relative to its recent history:
 IV Rank : Percentile ranking of current IV within its 30-day range (0-100%)
 IV Percentile : Percentage of days in the lookback period where IV was lower than current
 IV Regime Classification : Very Low, Low, High, or Very High
 Color-Coded Headers : Visual indication of volatility regime in the Greeks table
Trading regime suggestions based on IV rank:
 
 IV Rank > 75%: "Favor selling options" (high premium environment)
 IV Rank 50-75%: "Neutral / Sell spreads"
 IV Rank 25-50%: "Neutral / Buy spreads"
 IV Rank < 25%: "Favor buying options" (low premium environment)
 
 
 3. Gamma Zones Visualization 
Gamma zones display horizontal price levels where gamma exposure is highest:
 Purple horizontal lines  indicate gamma concentration areas
 Opacity scaling : Darker shading represents higher gamma values
 Percentage labels : Shows gamma intensity relative to ATM gamma
 Customizable zones : 3-10 price levels can be analyzed
These zones are critical for understanding:
 
 Pin risk around expiration
 Potential for explosive price movements
 Optimal strike selection for gamma trading
 Market maker hedging flows
 
 
 4. Probability Cones (Expected Move) 
The probability cones project expected price ranges based on current implied volatility:
 1 Standard Deviation (68% probability) : Shown with dashed green/red lines
 2 Standard Deviations (95% probability) : Shown with dotted green/red lines
 Time-scaled projection : Cones widen as expiration approaches
 Lognormal distribution : Accounts for positive skew in asset prices
Applications:
Strike selection for credit spreads
Identifying high-probability profit zones
Setting realistic price targets
Risk management for undefined risk strategies
 5. Breakeven Analysis 
The indicator plots key price levels for options positions:
 White line : Strike price
 Green line : Call breakeven (Strike + Premium)
 Red line : Put breakeven (Strike - Premium)
These levels update dynamically as option premiums change with market conditions.
 6. Payoff Structure Visualization 
Optional P&L labels display profit/loss at expiration for various price levels:
Shows P&L at -2 sigma, -1 sigma, ATM, +1 sigma, and +2 sigma price levels
Separate calculations for calls and puts
Helps visualize option payoff diagrams directly on the chart
Updates based on current option premiums
 Configuration Options 
 Calculation Parameters 
 Asset Selection : BTC or ETH (limited by VOLMEX IV data availability)
 Expiry Options : 1D, 7D, 14D, 30D, 60D, 90D, 180D
 Strike Mode : ATM (uses current spot) or Custom (manual strike input)
 Risk-Free Rate : Adjustable annual rate for discounting calculations
 Display Settings 
 Greeks Display : Toggle first, second, and third-order Greeks independently
 Visual Elements : Enable/disable probability cones, gamma zones, P&L labels
 Table Customization : Position (6 options) and text size (4 sizes)
 Price Levels : Show/hide strike and breakeven lines
 Technical Implementation 
 Data Sources 
 Spot Prices :  INDEX:BTCUSD  and  INDEX:ETHUSD  for underlying prices
 Implied Volatility :  VOLMEX:BVIV  (Bitcoin) and  VOLMEX:EVIV  (Ethereum) indices
 Real-Time Updates : All calculations update with each price tick
 Mathematical Framework 
The indicator implements the full Black-Scholes-Merton model:
Standard normal distribution approximations using Abramowitz and Stegun method
Proper annualization factors (365-day year)
Continuous compounding for interest rate calculations
Lognormal price distribution assumptions
 Alert Conditions 
Four categories of automated alerts:
 
 Price-Based : Underlying crossing strike price
 Gamma-Based : 50% surge detection for explosive moves
 Moneyness : Deep ITM alerts when |delta| > 0.9
 Time/Volatility : Near expiration and vega spike warnings
 
 
 Practical Applications 
 For Options Traders 
 
 Monitor all Greeks in real-time for active positions
 Identify optimal entry/exit points using IV rank
 Visualize risk through probability cones and gamma zones
 Track time decay and plan rolls
 
 For Volatility Traders 
 
 Compare IV across different expiries
 Identify mean reversion opportunities
 Monitor vega exposure across strikes
 Track higher-order volatility sensitivities
 
 Conclusion 
The Crypto Options Greeks & Volatility Analyzer transforms complex mathematical models into actionable visual insights. By combining institutional-grade Greeks calculations with intuitive overlays like probability cones and gamma zones, it bridges the gap between theoretical options knowledge and practical trading application.
Whether you're:
 
 A directional trader using options for leverage
 A volatility trader capturing IV mean reversion
 A hedger managing portfolio risk
 Or simply learning about options mechanics
 
This tool provides the quantitative foundation needed for informed decision-making in cryptocurrency options markets.
Remember that options trading involves substantial risk and complexity. The Greeks and visualizations provided by this indicator are tools for analysis - they should be combined with proper risk management, position sizing, and a thorough understanding of options strategies.
As crypto options markets continue to mature and grow, having professional-grade analytics becomes increasingly important. This indicator ensures you're equipped with the same analytical capabilities used by institutional traders, adapted specifically for the unique characteristics of 24/7 cryptocurrency markets.
Time-Decaying Percentile Oscillator [BackQuant]Time-Decaying Percentile Oscillator 
 1. Big-picture idea 
Traditional percentile or stochastic oscillators treat every bar in the look-back window as equally important. That is fine when markets are slow, but if volatility regime changes quickly yesterday’s print should matter more than last month’s. The  Time-Decaying Percentile Oscillator  attempts to fix that blind spot by assigning an adjustable weight to every past price before it is ranked. The result is a percentile score that “breathes” with market tempo much faster to flag new extremes yet still smooth enough to ignore random noise.
 2. What the script actually does 
Build a weight curve
• You pick a look-back length (default 28 bars).
• You decide whether weights fall  Linearly ,  Exponentially , by  Power-law  or  Logarithmically .
• A decay factor (lower = faster fade) shapes how quickly the oldest price loses influence.
• The array is normalised so all weights still sum to 1.
Rank prices by weighted mass
• Every close in the window is paired with its weight.
• The pairs are sorted from low to high.
• The cumulative weight is walked until it equals your chosen percentile level (default 50 = median).
• That price becomes the  Time-Decayed Percentile .
Find dispersion with robust statistics
• Instead of a fragile standard deviation the script measures  weighted Median-Absolute-Deviation  about the new percentile.
• You multiply that deviation by the  Deviation Multiplier  slider (default 1.0) to get a non-parametric volatility band.
Build an adaptive channel
• Upper band = percentile + (multiplier × deviation)
• Lower band = percentile – (multiplier × deviation)
Normalise into a 0-100 oscillator
• The current close is mapped inside that band:
0 = lower band, 50 = centre, 100 = upper band.
• If the channel squeezes, tiny moves still travel the full scale; if volatility explodes, it automatically widens.
Optional smoothing
• A second-stage moving average (EMA, SMA, DEMA, TEMA, etc.) tames the jitter.
• Length 22 EMA by default—change it to tune reaction speed.
Threshold logic
•  Upper Threshold  70 and  Lower Threshold  30 separate standard overbought/oversold states.
•  Extreme bands  85 and 15 paint background heat when aggressive fade or breakout trades might trigger.
Divergence engine
• Looks back twenty bars.
• Flags  Bullish divergence  when price makes a lower low but oscillator refuses to confirm (value < 40).
• Flags  Bearish divergence  when price prints a higher high but oscillator stalls (value > 60).
 3. Component walk-through 
•  Source  – Any price series. Close by default, switch to typical price or custom OHLC4 for futures spreads.
•  Look-back Period  – How many bars to rank. Short = faster, long = slower.
•  Base Percentile Level  – 50 shows relative position around the median; set to 25 / 75 for quartile tracking or 90 / 10 for extreme tails.
•  Deviation Multiplier  – Higher values widen the dynamic channel, lowering whipsaw but delaying signals.
•  Decay Settings 
–  Type  decides the curve shape. Exponential (default 1.16) mimics EMA logic.
–  Factor  < 1 shrinks influence faster; > 1 spreads influence flatter.
– Toggle  Enable Time Decay  off to compare with classic equal-weight stochastic.
•  Smoothing Block  – Choose one of seven MA flavours plus length.
•  Thresholds  – Overbought / Oversold / Extreme levels. Push them out when working on very mean-reverting assets like FX; pull them in for trend monsters like crypto.
•  Display toggles  – Show or hide threshold lines, extreme filler zones, bar colouring, divergence labels.
•  Colours  – Bullish green, bearish red, neutral grey. Every gradient step is automatically blended to generate a heat map across the 0-100 range.
 4. How to read the chart 
• Oscillator creeping above 70 = market auctioning near the top of its adaptive range.
• Fast poke above 85 with no follow-through = exhaustion fade candidate.
• Slow grind that lives above 70 for many bars = valid bullish trend, not a fade.
• Cross back through 50 shows balance has shifted; treat it like a micro trend change.
• Divergence arrows add extra confidence when you already see two-bar reversal candles at range extremes.
• Background shading (semi-transparent red / green) warns of extreme states and throttles your position size.
 5. Practical trading playbook 
 Mean-reversion scalps 
 1. Wait for oscillator to reach your desired OB/ OS levels
 2. Check the slope of the smoothing MA—if it is flattening the squeeze is mature.
 3. Look for a one- or two-bar reversal pattern.
 4. Enter against the move; first target = midline 50, second target = opposite threshold.
 5. Stop loss just beyond the extreme band.
 Trend continuation pullbacks 
 1. Identify a clean directional trend on the price chart.
 2. During the trend, TDP will oscillate between midline and extreme of that side.
 3. Buy dips when oscillator hits OS levels, and the same for OB levels & shorting
 4. Exit when oscillator re-tags the same-side extreme or prints divergence.
 Volatility regime filter 
 • Use the  Enable Time Decay  switch as a regime test.
 • If equal-weight oscillator and decayed oscillator diverge widely, market is entering a new volatility regime—tighten stops and trade smaller.
 Divergence confirmation for other indicators 
 • Pair TDP divergence arrows with MACD histogram or RSI to filter false positives.
 • The weighted nature means TDP often spots divergence a bar or two earlier than standard RSI.
 Swing breakout strategy 
 1. During consolidation, band width compresses and oscillator oscillates around 50.
 2. Watch for sudden expansion where oscillator blasts through extreme bands and stays pinned.
 3. Enter with momentum in breakout direction; trail stop behind upper or lower band as it re-expands.
 6. Customising decay mathematics 
 Linear  – Each older bar loses the same fixed amount of influence. Intuitive and stable; good for slow swing charts.
 Exponential  – Influence halves every “decay factor” steps. Mirrors EMA thinking and is fastest to react.
 Power-law  – Mid-history bars keep more authority than exponential but oldest data still fades. Handy for commodities where seasonality matters.
 Logarithmic  – The gentlest curve; weight drops sharply at first then levels off. Mimics how traders remember dramatic moves for weeks but forget ordinary noise quickly.
Turn decay off to verify the tool’s added value; most users never switch back.
 7. Alert catalogue 
• TD Overbought / TD Oversold – Cross of regular thresholds.
• TD Extreme OB / OS – Breach of danger zones.
• TD Bullish / Bearish Divergence – High-probability reversal watch.
• TD Midline Cross – Momentum shift that often precedes a window where trend-following systems perform.
 8. Visual hygiene tips 
• If you already plot price on a dark background pick  Bullish Color  and  Bearish Color  default; change to pastel tones for light themes.
• Hide threshold lines after you memorise the zones to declutter scalping layouts.
• Overlay mode set to false so the oscillator lives in its own panel; keep height about 30 % of screen for best resolution.
 9. Final notes 
Time-Decaying Percentile Oscillator marries robust statistical ranking, adaptive dispersion and decay-aware weighting into a simple oscillator. It respects both recent order-flow shocks and historical context, offers granular control over responsiveness and ships with divergence and alert plumbing out of the box. Bolt it onto your price action framework, trend-following system or volatility mean-reversion playbook and see how much sooner it recognises genuine extremes compared to legacy oscillators.
Backtest thoroughly, experiment with decay curves on each asset class and remember: in trading, timing beats timidity but patience beats impulse. May this tool help you find that edge.
ATR % Line from LoD/HoDATR % Line Trading Indicator - Entry Filter Tool 
This Pine Script creates a sophisticated ATR (Average True Range) percentage-based entry filter indicator for TradingView that helps traders avoid buying overextended stocks and identify optimal entry zones based on volatility.
 Core Functionality - Entry Discipline 
The script calculates a maximum entry threshold by taking a percentage of the Average True Range (ATR) and projecting it from the current day's low. This creates a dynamic "no-buy zone" that adapts to market volatility, helping traders avoid purchasing stocks that have already moved too far from their daily base.
Key Calculation:
Measures the ATR over a specified period (default: 14 bars)
Takes a user-defined percentage of that ATR (default: 25%)
Projects this distance from the day's low to establish a maximum entry threshold
Entry Rule: Avoid buying when price exceeds this ATR% level from the daily low or high.
 Visual Features 
Entry Threshold Line:
Draws a horizontal line at the calculated maximum entry level
Line extends forward for clear visualization of the "no-buy zone"
Red zones above this line indicate overextended conditions
Fully customizable appearance with color, width, and style options
Smart Entry Alerts:
Optional labels show the ATR percentage threshold and exact price level
Visual confirmation when stocks are trading in acceptable entry zones vs. extended areas
Real-Time Monitoring Table:
Displays current distance from daily low as ATR percentage
Shows whether current price is in "safe entry zone" or "extended territory"
Customizable display options for clean chart analysis
 Practical Applications for Entry Management 
Avoiding Extended Entries:
Primary Use: Don't initiate long positions when price is more than X% ATR from the daily low
Prevents buying stocks that have already made their daily move
Reduces risk of buying at temporary tops within the trading session
Entry Zone Identification:
Price trading below the ATR% line = potential entry opportunity
Price trading above the ATR% line = wait for pullback or skip the trade
Combines volatility analysis with momentum discipline
Risk Management Benefits:
Improved Entry Timing: Enter closer to daily support levels
Better Risk/Reward: Shorter distance to stop loss (daily low)
Reduced Chasing: Systematic approach prevents FOMO-driven entries
Volatility Awareness: Higher volatility stocks get wider acceptable entry ranges
 Configuration for Entry Filtering 
Key Settings for Entry Management:
ATR Percentage: Set your maximum acceptable extension (15-30% common for day trading)
Reference Point: Use "Low" to measure extension from daily base
Line Style: Make highly visible to clearly see entry threshold
Alert Integration: Visual confirmation of entry-friendly zones
Typical Usage Scenarios:
Conservative Entries: 15-20% ATR from daily low
Moderate Extensions: 25-35% ATR for stronger momentum plays
Aggressive Setups: 40%+ ATR for breakout situations (use with caution)
 Entry Strategy Integration 
Pre-Market Planning:
Set ATR% threshold based on stock's typical volatility
Identify key levels where entries become unfavorable
Plan alternative entry strategies for extended stocks
Intraday Execution:
Monitor real-time ATR% extension from daily low
Avoid new long positions when threshold is exceeded
Wait for pullbacks to re-enter acceptable entry zones
This tool transforms volatility analysis into practical entry discipline, helping traders maintain consistent entry standards and avoid the costly mistake of chasing overextended stocks. By respecting ATR-based extension limits, traders can improve their entry timing and overall trade profitability.
Dynamic S/R System - Pivot + ChannelDynamic S/R System - Pivot + Channel 
 A comprehensive Support & Resistance indicator combining dual methodologies for institutional-grade price level analysis 
 📊 CORE FEATURES 
 Dual Detection System 
•  Pivot-Based Levels  - Historical turning points with intelligent touch counting
•  Dynamic Channel S/R  - Trend-aware linear regression boundaries
•  Smart Level Management  - Auto-merges similar levels, removes weak/outdated ones
 Volume Integration 
•  Multi-timeframe volume analysis  using EMA oscillator and spike detection
•  Volume confirmation  for all breakout signals to filter false moves
•  Real-time volume status  (Normal/High/Spike) in live information panel
 Intelligent Touch Counting 
•  Automatic level validation  through touch frequency analysis
•  Strength classification  with visual differentiation (colors/thickness)
•  Level labels  showing exact touch count (S3, R5, etc.)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 🎨 VISUAL ELEMENTS 
 Line System 
 Solid Lines:  Pivot-based S/R levels
 Dashed Lines:  Dynamic channel boundaries
 Color Coding: 
• 🔵 Blue/🔴 Red: Standard support/resistance
• 🟠 Orange: Strong levels (multiple touches)
• 🟣 Purple: Channel S/R levels
 Signal Labels 
•  "B"  - Pivot S/R breakout with volume confirmation
•  "CB"  - Channel boundary breakout
•  "Bull/Bear Wick"  - False breakout detection (wick rejections)
 Information Panel 
 Real-time analysis displays: 
• Total resistance/support levels detected
• Closest S/R levels to current price
• Volume status and position relative to levels
• Current market position assessment
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 ✅ KEY ADVANTAGES 
 Multi-Method Validation 
Combines historical pivot analysis with dynamic trend channels for comprehensive market view
 False Breakout Protection 
• Volume confirmation requirements
• Wick analysis to identify failed attempts
• Multiple validation criteria before signal generation
 Adaptive Level Management 
• Automatically updates as new pivots form
• Removes outdated/weak levels
• Maintains clean, relevant level display
 Institutional-Grade Analysis 
• Touch counting reveals institutional respect levels
• Volume integration shows smart money activity
• Strength classification identifies high-probability zones
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 ⏰ OPTIMAL USE CASES 
 Best Timeframes 
•  Daily  - Primary recommendation for swing trading
•  4-Hour  - Intraday analysis and entries
•  Weekly  - Long-term position planning
 Ideal Markets 
•  Crypto pairs  (especially ETH/BTC, BTC/USD)
•  Forex majors  with good volume data
•  Large-cap stocks  with institutional participation
 Trading Applications 
•  Entry/exit planning  around key S/R levels
•  Breakout confirmation  with volume validation
•  Risk management  using nearest S/R for stops
•  Trend analysis  through channel dynamics
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 ⚙️ CONFIGURATION GUIDELINES 
 Conservative Setup (Higher Confidence) 
 
Min Pivot Strength: 3-4
Volume Threshold: 25-30%
Max Levels: 6-8
 
 Aggressive Setup (More Signals) 
 
Min Pivot Strength: 2
Volume Threshold: 15-20%
Max Levels: 10-12
 
 🔔 ALERT SYSTEM 
 Breakout Alerts 
• Resistance/Support breaks with volume confirmation
• Channel boundary violations
• Approaching strong S/R levels
 Advanced Notifications 
• Strong level approaches (within 0.5% of price)
• False breakout detection
• Volume spike confirmations
 📈 TRADING STRATEGY GUIDE 
 Entry Strategy 
1.  Wait  for price to approach identified S/R level
2.  Confirm  with volume analysis (spike/high volume preferred)
3.  Watch  for wick formations indicating rejection
4.  Enter  on confirmed breakout with volume or bounce with rejection
 Risk Management 
• Use nearest S/R level for stop placement
• Scale position size based on level strength (touch count)
• Monitor volume confirmation for exit signals
 Market Context 
• Combine with higher timeframe trend analysis
• Consider overall market sentiment and volatility
• Use channel direction for bias confirmation
 Transform complex S/R analysis into actionable trading intelligence with institutional-level insights for professional trading decisions. 
Momentum  DivergenceOverview 
The Momentum Divergence Oscillator is a valuable tool designed for traders who are familiar with basic charting but want to deepen their market insights. This indicator combines a momentum calculation with divergence detection, presenting the data in an intuitive way with a blue momentum line and colored divergence signals ("Bull" and "Bear"). It’s perfect for refining entry and exit points across various timeframes, especially for scalping or swing trading strategies.
 Understanding the Concepts 
What is Momentum?
Momentum measures the speed and strength of a price movement by comparing the current closing price to a previous close over a set period. In this indicator, it’s calculated as the difference between the current close and the close from a user-defined number of bars ago (default: 10). A rising momentum line indicates accelerating upward momentum, while a falling line suggests slowing momentum or a potential reversal. This helps you gauge whether a trend is gaining power or losing steam, making it a key indicator for spotting overbought or oversold conditions.
What is a Divergence?
A divergence occurs when the price action and the momentum indicator move in opposite directions, often signaling a potential trend reversal. The Momentum Divergence Oscillator highlights two types:
 
 Bullish Divergence: When the price forms a lower low (indicating weakness), but the momentum shows a higher low (suggesting underlying strength). This can foreshadow an upward reversal.
  Bearish Divergence: When the price reaches a higher high (showing strength), but the momentum records a lower high (indicating fading momentum). This may hint at an impending downward turn.
 
 How the Indicator Works 
The indicator plots a momentum line in a separate pane below your chart, giving you a clear view of price momentum over time. It also scans for divergences using adjustable lookback periods (default: 5 bars left and right) and a range window (default: 5-60 bars) to ensure relevance. When a divergence is detected, it’s visually highlighted, and you can customize the sensitivity through input settings like the momentum length and pivot lookback. Alerts are included to notify you of new divergence signals in real-time, saving you from constant monitoring.
 How to Apply It 
 
  Identifying Opportunities: Use bullish divergences ("Bull") as a cue to consider long positions, especially when confirmed by support levels or a moving average crossover. Bearish divergences ("Bear") can signal short opportunities, particularly near resistance zones.
  Combining with Other Tools: Pair this oscillator with indicators like the Relative Strength Index (RSI) or volume analysis to filter out false signals and increase confidence in your trades. For example, a bullish divergence with rising volume can be a stronger buy signal.
  Timeframe Flexibility: Test it on shorter timeframes (e.g., 5-minute charts) for quick scalping trades or longer ones (e.g., 1-hour or 4-hour charts) for swing trading, adjusting the momentum length to suit the market’s pace.
  Alert Setup: Enable the built-in alerts to get notified when a divergence forms, allowing you to react promptly without staring at the screen all day.
 
 Strategy Example 
 
  Spot a bullish divergence on a 15-minute chart where the price hits a lower low, but the momentum rises.
  Confirm with a break above a 20-period EMA and increasing volume.
  Enter a long position with a stop-loss below the recent low and a take-profit near the next resistance level.
 
 Customization Tips 
 
  Adjust the "Momentum Length" (default: 10) to make the oscillator more or less sensitive—shorter lengths react faster, while longer ones smooth out noise.
  Tweak the "Pivot Lookback" settings to widen or narrow the divergence detection range based on your trading style.
  Use the "Range Upper/Lower" inputs to focus on divergences within a specific timeframe that matches your strategy.
 
 Important Considerations 
 
  b]This indicator is a technical analysis tool, not a guaranteed trading system. Always pair it with a solid strategy and strict risk management, such as setting stop-losses. 
  In strong trending markets, divergences can sometimes produce false signals. Consider adding a trend filter (e.g., ADX below 25) to avoid whipsaws.
  Experiment with the settings on a demo account or backtest to find what works best for your preferred markets and timeframes.
JHW Volume Based Buy and Sell MomentumThe JHW Volume-Based Buy and Sell Momentum indicator is a custom momentum oscillator designed to capture market sentiment based on volume dynamics and price rate of change (ROC). It aims to identify bullish or bearish momentum by analyzing how price reacts to increasing or decreasing trading volume.
Core Logic:
The indicator calculates the Rate of Change (ROC) of the closing price.
It then accumulates this ROC separately based on whether the current volume is lower or higher than the previous bar:
If volume decreases, the ROC is added to a "negative volume index" accumulator.
If volume increases, the ROC is added to a "positive volume index" accumulator.
These two accumulators are combined to form a net momentum line.
Smoothing:
A Simple Moving Average (SMA) is applied to both accumulators over a user-defined period (default: 25 bars).
The sum of these smoothed values forms the signal line.
Visualization:
The indicator plots:
The net momentum line (yellow).
The smoothed signal line (blue).
The area between the two lines is filled with color:
Yellow when momentum is above the signal (bullish).
Blue when momentum is below the signal (bearish).
Bar colors are also adjusted to reflect the current momentum state.
Use Case:
This indicator helps traders:
Detect volume-driven momentum shifts.
Identify potential buy or sell zones based on volume behavior.
Confirm trends or spot early reversals.
Supertrend with ADX & MTF MA Filter# **Supertrend with ADX & MTF MA Filter - Comprehensive Explanation**
---
## **1. Purpose of This Indicator**
This indicator combines three powerful technical analysis tools to create a robust trading system:  
✅ **Supertrend** (Trend-following)  
✅ **ADX Filter** (Trend strength confirmation)  
✅ **MTF MA Filter** (Multi-timeframe trend direction confirmation)  
**Primary Goals:**  
✔ **Identify high-probability trend reversals** with confirmation from multiple indicators  
✔ **Filter out weak trends** using ADX (Average Directional Index)  
✔ **Add higher timeframe context** with MTF (Multi-TimeFrame) Moving Average  
✔ **Reduce false signals** by requiring confluence between all three components  
---
## **2. Core Logic & Components**
### **A. Supertrend (Base Indicator)**
- **Calculation:**  
  ```pine
  up = hl2 - (Multiplier * ATR(Periods))
  dn = hl2 + (Multiplier * ATR(Periods))
  ```
  - **Bullish trend** when price > `up` (green line)  
  - **Bearish trend** when price < `dn` (red line)  
- **Why Supertrend?**  
  - Simple yet effective trend-following system  
  - Adapts to volatility via ATR (Average True Range)  
---
### **B. ADX Filter (Trend Strength Confirmation)**
- **ADX Calculation:**  
  ```pine
    = calcADX(adxLength, adxSmoothing)
  strongTrend = adxVal >= adxThreshold
  ```
  - **ADX > Threshold (Default: 20)** = Strong trend  
  - **DI+ > DI-** = Bullish momentum  
  - **DI- > DI+** = Bearish momentum  
- **Why ADX?**  
  - Avoids trading in choppy markets (low ADX = weak trend)  
  - Confirms if Supertrend signals occur in a strong trend  
---
### **C. MTF MA Filter (Higher Timeframe Trend Alignment)**
- **Moving Average Calculation:**  
  ```pine
    = getMA(maSource, maLength, maType, maTF)
  ```
  - **MA Type:** SMA, EMA, WMA, or DEMA  
  - **Timeframe:** Any (1m, 5m, 1H, 4H, D, W, M)  
  - **Trend Direction:**  
    - **Buy Signal:** MA must be **rising**  
    - **Sell Signal:** MA must be **falling**  
- **Why MTF MA?**  
  - Aligns trades with the **higher timeframe trend**  
  - Reduces counter-trend entries  
---
## **3. How to Use This Indicator**
### **A. Buy Conditions (All Must Be True)**
1. **Supertrend turns bullish** (price crosses above `up` line)  
2. **ADX ≥ Threshold** (trend is strong)  
3. **Higher timeframe MA is rising** (confirms bullish bias)  
### **B. Sell Conditions (All Must Be True)**
1. **Supertrend turns bearish** (price crosses below `dn` line)  
2. **ADX ≥ Threshold** (trend is strong)  
3. **Higher timeframe MA is falling** (confirms bearish bias)  
### **C. Recommended Settings**
| Parameter | Recommended Value | Description |
|-----------|------------------|-------------|
| **ATR Period** | 14 | Sensitivity of Supertrend |
| **Multiplier** | 1.5-3.0 | Adjust for volatility |
| **ADX Threshold** | 20-25 | Higher = stricter trend filter |
| **MA Length** | 20-50 | Smoothness of trend filter |
| **MA Timeframe** | 1H/D | Align with trading style |
---
## **4. Trading Strategies**
### **A. Trend-Following Strategy**
- **Enter:** When all 3 conditions align (Supertrend + ADX + MA)  
- **Exit:** When Supertrend flips or ADX drops below threshold  
### **B. Pullback Strategy**
- **Wait for:**  
  - Supertrend in trend direction  
  - ADX remains strong  
  - MA still aligned  
- **Enter:** On pullback to Supertrend line  
### **C. Multi-Timeframe Confirmation**
- **Intraday traders:** Use 4H/D MA for trend bias  
- **Swing traders:** Use D/W MA for trend bias  
---
## **5. Advantages Over Standard Supertrend**
✔ **Fewer false signals** (ADX filters weak trends)  
✔ **Higher timeframe alignment** (avoids trading against larger trends)  
✔ **Customizable MA types** (SMA, EMA, WMA, DEMA)  
✔ **Works on all markets** (stocks, forex, crypto)  
---
### **Final Thoughts**
This indicator is designed for traders who want **high-confidence trend signals** by combining:  
🔹 **Supertrend** (entry trigger)  
🔹 **ADX** (trend strength filter)  
🔹 **MTF MA** (higher timeframe trend alignment)  
By requiring all three components to align, it significantly improves signal quality compared to standalone Supertrend systems.  
**→ Best for:** Swing trading, trend-following, and avoiding choppy markets.  
Reversal Point Dynamics⇋ Reversal Point Dynamics (RPD) 
 This is not an indicator; it is a complete system for deconstructing the mechanics of a market reversal.  Reversal Point Dynamics (RPD) moves far beyond simplistic pattern recognition, venturing into a deep analysis of the underlying forces that cause trends to exhaust, pause, and turn. It is engineered from the ground up to identify high-probability reversal points by quantifying the confluence of market dynamics in real-time.
 Where other tools provide a static signal, RPD delivers a dynamic probability.  It understands that a true market turning point is not a single event, but a cascade of failing momentum, structural breakdown, and a shift in market order. RPD's core engine meticulously analyzes each of these dynamic components—the market's underlying state, its velocity and acceleration, its degree of chaos (entropy), and its structural framework. These forces are synthesized into a single, unified Probability Score, offering you an unprecedented, transparent view into the conviction behind every potential reversal.
 This is not a "black box" system.  It is an open-architecture engine designed to empower the discerning trader. Featuring real-time signal projection, an integrated Fibonacci R2R Target Engine, and a comprehensive dashboard that acts as your  Dynamics Control Center , RPD gives you a complete, holistic view of the market's state.
 The Theoretical Core: Deconstructing Market Dynamics 
 RPD's analytical power is born from the intelligent synthesis of multiple, distinct theoretical models.  Each pillar of the engine analyzes a different facet of market behavior. The convergence of these analyses—the "Singularity" event referenced in the dashboard—is what generates the final, high-conviction probability score.
 1. Pillar One: Quantum State Analysis (QSA) 
 This is the foundational analysis of the market's current state within its recent context.  Instead of treating price as a random walk, QSA quantizes it into a finite number of discrete "states."
 Formulaic Concept:  The engine establishes a price range using the highest high and lowest low over the Adaptive Analysis Period. This range is then divided into a user-defined number of Analysis Levels. The current price is mapped to one of these states (e.g., in a 9-level system, State 0 is the absolute low, and State 8 is the absolute high).
 Analytical Edge:  This acts as a powerful foundational filter. The engine will only begin searching for reversal signals when the market has reached a statistically stretched, extreme state (e.g., State 0 or 8). The Edge Sensitivity input allows you to control exactly how close to this extreme edge the price must be, ensuring you are trading from points of maximum potential exhaustion.
 2. Pillar Two: Price State Roc (PSR) - The Dynamics of Momentum 
 This pillar analyzes the kinetic forces of the market: its velocity and acceleration.  It understands that it’s not just where the price is, but how it got there that matters.
 Formulaic Concept:  The psr function calculates two derivatives of price.
 Velocity:  (price - price ). This measures the speed and direction of the current move.
 Acceleration:  (velocity - velocity ). This measures the rate of change in that speed. A negative acceleration (deceleration) during a strong rally is a critical pre-reversal warning, indicating momentum is fading even as price may be pushing higher.
 Analytical Edge:  The engine specifically hunts for exhaustion patterns where momentum is clearly decelerating as price reaches an extreme state. This is the mechanical signature of a weakening trend.
 3. Pillar Three: Market Entropy Analysis - The Dynamics of Order & Chaos 
 This is RPD's chaos filter, a concept borrowed from information theory.  Entropy measures the degree of randomness or disorder in the market's price action.
 Formulaic Concept:  The calculateEntropy function analyzes recent price changes. A market moving directionally and smoothly has low entropy (high order). A market chopping back and forth without direction has high entropy (high chaos). The value is normalized between 0 and 1.
 Analytical Edge:  The most reliable trades occur in low-entropy, ordered environments. RPD uses the Entropy Threshold to disqualify signals that attempt to form in chaotic, unpredictable conditions, providing a powerful shield against whipsaw markets.
 4. Pillar Four: The Synthesis Engine & Probability Calculation 
 This is where all the dynamic forces converge.  The final probability score is a weighted calculation that heavily rewards confluence.
 Formulaic Concept:  The calculateProbability function intelligently assembles the final score:
A  Base Score  is established from trend strength and entropy.
An  Entropy Score  adds points for low entropy (order) and subtracts for high entropy (chaos).
A significant  Divergence Bonus  is awarded for a classic momentum divergence.
 RSI & Volume Bonuses  are added if momentum oscillators are in extreme territory or a volume spike confirms institutional interest.
 MTF & Adaptive Bonuses  add further weight for alignment with higher timeframe structure.
 Analytical Edge:  A signal backed by multiple dynamic forces (e.g., extreme state + decelerating momentum + low entropy + volume spike) will receive an exponentially higher probability score.  This is the very essence of analyzing reversal point dynamics. 
 The Command Center: Mastering the Inputs 
 Every input is a precise lever of control, allowing you to fine-tune the RPD engine to your exact trading style, market, and timeframe. 
 🧠 Core Algorithm 
 Predictive Mode (Early Detection): 
 What It Is:  Enables the engine to search for potential reversals on the current, unclosed bar.
 How It Works:  Analyzes intra-bar acceleration and state to identify developing exhaustion. These signals are marked with a ' ? ' and are tentative.
 How To Use It:  Enable for scalping or very aggressive day trading to get the earliest possible indication. Disable for swing trading or a more conservative approach that waits for full bar confirmation.
 Live Signal Mode (Current Bar): 
 What It Is:  A highly aggressive mode that plots tentative signals with a ' ! ' on the live bar based on projected price and momentum. These signals repaint intra-bar.
 How It Works:  Uses a linear regression projection of the close to anticipate a reversal.
 How To Use It:  For advanced users who use intra-bar dynamics for execution and understand the nature of repainting signals.
 Adaptive Analysis Period: 
 What It Is:  The main lookback period for the QSA, PSR, and Entropy calculations. This is the engine's "memory."
 How It Works:  A shorter period makes the engine highly sensitive to local price swings. A longer period makes it focus only on major, significant market structure.
 How To Use It:   Scalping (1-5m):  15-25.  Day Trading (15m-1H):  25-40.  Swing Trading (4H+):  40-60.
 Fractal Strength (Bars): 
 What It Is:  Defines the strength of the pivot detection used for confirming reversal events.
 How It Works:  A value of '2' requires a candle's high/low to be more extreme than the two bars to its left and right.
 How To Use It:  '2' is a robust standard. Increase to '3' for an even stricter definition of a structural pivot, which will result in fewer signals.
 MTF Multiplier: 
 What It Is:  Integrates pivot data from a higher timeframe for confluence.
 How It Works:  A multiplier of '4' on a 15-minute chart will pull pivot data from the 1-hour chart (15 * 4 = 60m).
 How To Use It:  Set to a multiple that corresponds to your preferred higher timeframe for contextual analysis.
 🎯 Signal Settings 
 Min Probability %: 
 What It Is:  Your master quality filter. A signal is only plotted if its score exceeds this threshold.
 How It Works:  Directly filters the output of the final probability calculation.
 How To Use It:   High-Quality (80-95):  For A+ setups only.  Balanced (65-75):  For day trading.  Aggressive (50-60):  For scalping.
 Min Signal Distance (Bars): 
 What It Is:  A noise filter that prevents signals from clustering in choppy conditions.
 How It Works:  Enforces a "cooldown" period of N bars after a signal.
 How To Use It:  Increase in ranging markets to focus on major swings. Decrease on lower timeframes.
 Entropy Threshold: 
 What It Is:  Your "chaos shield." Sets the maximum allowable market randomness for a signal.
 How It Works:  If calculated entropy is above this value, the signal is invalidated.
 How To Use It:   Lower values (0.1-0.5):  Extremely strict.  Higher values (0.7-1.0):  More lenient. 0.85 is a good balance.
 Adaptive Entropy & Aggressive Mode: 
 What It Is:  Toggles for dynamically adjusting the engine's core parameters.
 How It Works:  Adaptive Entropy can slightly lower the required probability in strong trends. Aggressive Mode uses more lenient settings across the board.
 How To Use It:  Keep Adaptive on. Use Aggressive Mode sparingly, primarily for scalping highly volatile assets.
 📊 State Analysis 
 Analysis Levels: 
 What It Is:  The number of discrete "states" for the QSA.
 How It Works:  More levels create a finer-grained analysis of price location.
 How To Use It:  6-7 levels are ideal. Increasing to 9 can provide more precision on very volatile assets.
 Edge Sensitivity: 
 What It Is:  Defines how close to the absolute top/bottom of the range price must be.
 How It Works:  '0' means price must be in the absolute highest/lowest state. '3' allows a signal within the top/bottom 3 states.
 How To Use It:  '3' provides a good balance. Lower it to '1' or '0' if you only want to trade extreme exhaustion.
 The Dashboard: Your Dynamics Control Center 
 The dashboard provides a transparent, real-time view into the engine's brain.  Use it to understand the context behind every signal and to gauge the current market environment at a glance.
 🎯 UNIFIED PROB SCORE 
 TOTAL SCORE:  The highest probability score (either Peak or Valley) the engine is currently calculating. This is your main at-a-glance conviction metric. The "Singularity" header refers to the event where market dynamics align—the event RPD is built to detect.
 Quality:  A human-readable interpretation of the Total Score.  "EXCEPTIONAL" (🌟)  is a rare, A+ confluence event.  "STRONG" (💪)  is a high-quality, tradable setup.
 📊 ORDER FLOW & COMPONENT ANALYSIS 
 Volume Spike:  Shows if the current volume is significantly higher than average (YES/NO). A 'YES' adds major confirmation.
 Peak/Valley Conf:  This breaks down the probability score into its directional components, showing you the separate confidence levels for a potential top (Peak) versus a bottom (Valley).
 🌌 MARKET STRUCTURE 
 HTF Trend:  Shows the direction of the underlying trend based on a Supertrend calculation.
 Entropy:  The current market chaos reading.  "🔥 LOW"  is an ideal, ordered state for trading.  "😴 HIGH"  is a warning of choppy, unpredictable conditions.
 🔮 FIB & R2R ZONE (Large Dashboard) 
 This section gives you the status of the Fibonacci Target Engine.  It shows if an Active Channel (entry zone) or Stop Zone (invalidation zone) is active and displays the precise price levels for the static entry, target, and stop calculated at the time of the signal.
 🛡️ FILTERS & PREDICTIVES (Large Dashboard) 
 This panel provides a status check on all the bonus filters.  It shows the current RSI Status, whether a Divergence is present, and if a Live Pending signal is forming.
 The Visual Interface: A Symphony of Data 
 Every visual element is designed for instant, intuitive interpretation of market dynamics. 
 Signal Markers:  These are the primary outputs of the engine.
▼/▲ b:  A fully confirmed signal that has passed all filters.
? b:  A tentative signal generated in Predictive Mode, indicating developing dynamics.
◈ b:  This diamond icon replaces the standard triangle when the signal is confirmed by a strong momentum divergence, highlighting it as a superior setup where dynamics are misaligned with price.
 Harmonic Wave:  The flowing, colored wave around the price.
 What It Represents:  The market's "flow dynamic" and volatility.
 How to Interpret It:  Expanding waves show increasing volatility. The color is tied to the "Quantum Color" in your theme, representing the underlying energy field of the market.
 Entropy Particles:  The small dots appearing above/below price.
 What They Represent:  A direct visualization of the "order dynamic."
 How to Interpret Them:   Their presence  signifies a low-entropy, ordered state ideal for trading.  Their color  indicates the direction of momentum (PSR velocity).  Their absence  means the market is too chaotic (high entropy).
 The Fibonacci Target Engine:  The dynamic R2R system appearing post-signal.
 Static Fib Levels:  Colored horizontal lines representing the market's "structural dynamic."
 The Green "Active Channel" Box:  Your  zone of consideration.  An area to manage a potential entry.
 Development Philosophy 
 Reversal Point Dynamics was engineered to answer a fundamental question: can we objectively measure the forces behind a market turn?  It is a synthesis of concepts from market microstructure, statistics, and information theory. The objective was never to create a "perfect" system, but to build a robust decision-support tool that provides a measurable, statistical edge by focusing on the principle of confluence.
 By demanding that multiple, independent market dynamics align simultaneously, RPD filters out the vast majority of market noise.  It is designed for the trader who thinks in terms of probability and risk management, not in terms of certainties. It is a tool to help you discount the obvious and bet on the unexpected alignment of market forces.
 "Markets are constantly in a state of uncertainty and flux and money is made by discounting the obvious and betting on the unexpected." 
—  George Soros 
Trade with insight. Trade with anticipation.
— Dskyz, for DAFE Trading Systems
Kase Convergence Divergence [BackQuant]Kase Convergence Divergence  
The  Kase Convergence Divergence   is a sophisticated oscillator designed to measure directional market strength through the lens of volatility-adjusted log return structures. Inspired by Cynthia Kase’s work on statistical momentum and price projection ranges, this unique indicator offers a hybrid framework that merges signal processing, multi-length sweep logic, and adaptive smoothing techniques.
Unlike traditional momentum oscillators like MACD or RSI, which rely on static moving average differences,  KCD   introduces a dual-process system combining:
 Kase-style statistical range projection  (via log returns and volatility),
A  sweeping loop of lookback lengths  for robustness,
 First and second derivative modes  to capture both velocity and acceleration of price movement.
 Core Logic & Computation 
The KCD calculation is centered on two volatility-normalized transforms:
 KSDI Up:  Measures how far the current high has moved relative to a past low, normalized by return volatility.
 KSDI Down:  Measures how far the current low has moved relative to a past high, also normalized.
For every length in a user-defined sweep range (e.g., 25–35), both KSDI_up and KSDI_dn are computed, and their  maximum values across the loop  are retained. The difference between these two max values produces the raw signal:
 KPO (Kase Projection Oscillator):  Measures directional skew.
 KCD (Kase Convergence Divergence):  Defined as KPO – MA(KPO) — similar in spirit to MACD but structurally different.
Users can choose to visualize either the  first derivative (KPO) , or the  second derivative (KCD) , depending on market conditions or strategy style.
 Key Features 
✅  Multi-Length Sweep Logic:  Improves signal reliability by aggregating statistical range projections across a set of lookbacks.
✅  Advanced Smoothing Modes:  Supports DEMA, HMA, TEMA, LINREG, WMA and more for dynamic adaptation.
✅  Dual Derivative Modes:  Choose between speed (first derivative) or smoothness (second derivative) to fit your trading regime.
✅  Color-Encoded Signal Bands:  Heatmap-style oscillator coloring enhances visual feedback on trend strength.
✅  Candlestick Painting:  Optional bar coloring makes it easy to spot trend shifts on the main chart.
✅  Adaptive Fill Zones:  Green and red fills between the oscillator and zero line help distinguish bullish and bearish regimes at a glance.
 Practical Applications 
📈  Trend Confirmation:  Use KCD as a secondary confirmation layer after breakout or pullback entries.
📉  Momentum Shifts:  Crossover and crossunder of the zero line highlight potential regime changes.
📊  Strategy Filters:  Incorporate into algos to avoid trendless or mean-reverting environments.
🧪  Derivative Switching:  Flip between KPO and KCD modes depending on whether you want to measure acceleration or deceleration of price flow.
 Alerts & Signals 
Two built-in alerts help you catch regime shifts in real time:
 Long Signal:  Triggered when the selected oscillator crosses above zero.
 Short Signal:  Triggered when it crosses below zero.
These events can be used to generate entries, exits, or trend validation cues in multi-layer systems.
 Conclusion 
The  Kase Convergence Divergence   goes beyond traditional oscillators by offering a volatility-normalized, derivative-aware signal engine with enhanced visual dynamics. Its sweeping architecture and dynamic fill logic make it especially powerful for identifying trending environments, filtering chop, and adding statistical rigor to your trading toolkit.
Whether you’re a discretionary trader seeking precision, or a quant looking to model more robust return structures, KCD offers a creative yet analytically grounded solution.
Pattern Detector [theUltimator5]🎯 Overview 
The Pattern Detector is a comprehensive technical analysis indicator that automatically identifies and visualizes multiple pattern types on your charts. Built with advanced ZigZag technology and sophisticated pattern recognition algorithms, this tool helps traders spot high-probability trading opportunities across all timeframes and markets.
 ✨ Key Features 
 🔍 Multi-Pattern Detection System 
 
 Harmonic Patterns: Butterfly, Gartley, Bat, and Crab patterns with precise Fibonacci ratios
 Classic Reversal Patterns: Head & Shoulders and Inverse Head & Shoulders
 Double Patterns: Double Tops and Double Bottoms with extreme validation
 Wedge Patterns: Rising and Falling Wedges with volume confirmation
 
 📊 Advanced ZigZag Engine 
 
 Customizable sensitivity (5-50 levels)
 Depth multiplier for multi-timeframe analysis
 Real-time pivot detection with noise filtering
 Option to display ZigZag lines only for pure price action analysis
 
 🎨 Visualization 
 
 Clean pattern lines with distinct color coding
 Point labeling system (X, A, B, C, D for harmonics / LS, H, RS for H&S)
 Pattern name displays with bullish/bearish direction
 Price target projections with arrow indicators
 Subtle pattern fills for enhanced visibility
 
 🛠️ Settings & Configuration 
 Core ZigZag Settings 
 
 ZigZag Sensitivity (5-50): Controls pattern detection sensitivity. Lower values detect more patterns but may include noise. Higher values focus on major swings only.
 ZigZag Depth Multiplier (1-5): Multiplies sensitivity for deeper analysis. Level 1 = most responsive, Level 5 = major swings only.
 
 Pattern Detection Toggles 
 
 Show ZigZag Lines Only: Displays pure ZigZag without pattern detection for price structure analysis
 Detect Harmonic Patterns: Enable/disable Fibonacci-based harmonic pattern detection
 Detect Head & Shoulders: Toggle classic reversal pattern identification
 Detect Double Tops/Bottoms: Enable double pattern detection with extreme validation
 Detect Wedge Patterns: Toggle wedge pattern detection with volume confirmation
 
 Display Options 
 
 Show Pattern Names:  Display pattern names directly on chart (e.g., "Butterfly (Bullish)")
 Show Point Labels:  Add lettered labels at key pattern points for structure identification
 Project Harmonic Targets:  Show projected completion points for incomplete harmonic patterns
 
 📈 Pattern Types Explained 
 Harmonic Patterns 🦋 
Advanced Fibonacci-based patterns that provide high-probability reversal signals:
 
 Butterfly:  AB=0.786 XA, BC=0.382-0.886 AB, CD=1.618-2.24 BC
 Gartley:  AB=0.618 XA, BC=0.382-0.886 AB, CD=1.272-1.618 BC
 Bat:  AB=0.382-0.50 XA, BC=0.382-0.886 AB, CD=1.618-2.24 BC
 Crab:  AB=0.382-0.618 XA, BC=0.382-0.886 AB, CD=2.24-3.618 BC
 
 Head & Shoulders 👤 
Classic three-peak reversal pattern indicating trend exhaustion:
 
 Standard H&S: Bearish reversal at tops
 Inverse H&S: Bullish reversal at bottoms
 Automatic neckline validation and price target calculation
 
 Double Patterns 📊 
Powerful reversal patterns with extreme validation:
 
 Double Top:  Two similar highs with valley between (bearish)
 Double Bottom:  Two similar lows with peak between (bullish)
 Includes lookback period validation to ensure patterns are significant extremes
 
 Wedge Patterns 📐 
Continuation/reversal patterns with converging trend lines:
 
 Rising Wedge:  Converging upward slopes (typically bearish)
 Falling Wedge:  Converging downward slopes (typically bullish)
 Volume confirmation required for increased accuracy
 
 🎯 Trading Applications 
 Entry Signals 
 
 Harmonic Patterns:  Enter at point D completion with targets at point A
 H&S Patterns:  Enter on neckline break with calculated targets
 Double Patterns:  Enter on support/resistance break with measured moves
 Wedge Patterns:  Enter on breakout direction with volume confirmation
 
 Risk Management 
 
 Use pattern structure for logical stop placement
 Pattern invalidation levels provide clear exit rules
 Multiple pattern confirmation increases probability
 
 Multi-Timeframe Analysis 
 
 Higher ZigZag depth for longer-term patterns
 Lower sensitivity for short-term trading patterns
 Combine with other timeframes for confluence
 
 ⚙️ Optimal Settings 
For Day Trading (1m-15m charts)
 
 ZigZag Sensitivity: 5-9
 Depth Multiplier: 1-2
 Enable all pattern types for maximum opportunities
 
For Swing Trading (1H-4H charts)
 
 ZigZag Sensitivity: 9-15
 Depth Multiplier: 2-3
 Focus on harmonic and H&S patterns
 
For Position Trading (Daily+ charts)
 
 ZigZag Sensitivity: 15-25
 Depth Multiplier: 3-5
 Emphasize major harmonic and double patterns
 
🔧 Technical Specifications
 
 Maximum Lookback:  5000 bars for comprehensive analysis
 Pattern Overlap Prevention:  Intelligent filtering prevents duplicate patterns
 Performance Optimized:  Efficient algorithms for real-time detection
 Volume Integration:  Advanced volume analysis for wedge confirmation
 Fibonacci Precision:  10% tolerance for harmonic ratio validation
 
📚 How to Use
 
 Add to Chart:  Apply indicator to any timeframe/market
 Configure Settings:  Adjust sensitivity based on trading style
 Enable Patterns:  Toggle desired pattern types
 Analyze Results:  Look for completed patterns with clear structure
 Plan Trades:  Use price targets and pattern invalidation for trade management
 
Perfect for both novice and experienced traders seeking systematic pattern recognition with visualization and entry/exit signals.
Risk Distribution HistogramStatistical risk visualization and analysis tool for any ticker 📊 
The Risk Distribution Histogram visualizes the statistical distribution of different risk metrics for any financial instrument. It converts risk data into histograms with quartile-based color coding, so that traders can understand their risk, tail-risks, exposure patterns and make data-driven decisions based on empirical evidence rather than assumptions.
The indicator supports multiple risk calculation methods, each designed for different aspects of market analysis, from general volatility assessment to tail risk analysis.
 Risk Measurement Methods 
 Standard Deviation 
Captures raw daily price volatility by measuring the dispersion of price movements. Ideal for understanding overall market conditions and timing volatility-based strategies.
Use case: Options trading and volatility analysis.
 Average True Range (ATR) 
Measures true range as a percentage of price, accounting for gaps and limit moves. Valuable for position sizing across different price levels.
Use case: Position sizing and stop-loss placement.
  
The chart above illustrates how ATR statistical distribution can be used by looking at the ATR % of price distribution. For example, 90% of the movements are below 5%.
 Downside Deviation 
Only considers negative price movements, making it ideal for checking downside risk and  capital protection rather than capturing upside volatility.
Use case: Downside protection strategies and stop losses.
 Drawdown Analysis 
Tracks peak-to-trough declines, providing insight into maximum loss potential during different market conditions.
Use case: Risk management and capital preservation.
  
The chart above illustrates tale risk for the asset (TQQQ), showing that it is possible to have drawdowns higher than 20%. 
 Entropy-Based Risk (EVaR) 
Uses information theory to quantify market uncertainty. Higher entropy values indicate more unpredictable price action, valuable for detecting regime changes.
Use case: Advanced risk modeling and tail-risk.
 VIX Histogram 
Incorporates the market's fear index directly into analysis, showing how current volatility expectations compare to historical patterns. The  CAPITALCOM:VIX  histogram is independent from the ticker on the chart. 
Use case: Volatility trading and market timing.
 Visual Features 
The histogram uses quartile-based color coding that immediately shows where current risk levels stand relative to historical patterns:
 
 Green (Q1): Low Risk (0-25th percentile)
 Yellow (Q2): Medium-Low Risk (25-50th percentile)
 Orange (Q3): Medium-High Risk (50-75th percentile)
 Red (Q4): High Risk (75-100th percentile)
 
The data table provides detailed statistics, including:
 
 Count Distribution: Historical observations in each bin
 PMF: Percentage probability for each risk level
 CDF: Cumulative probability up to each level
 Current Risk Marker: Shows your current position in the distribution
 
 Trading Applications 
When current risk falls into upper quartiles (Q3 or Q4), it signals conditions are riskier than 50-75% of historical observations. This guides position sizing and portfolio adjustments.
Key applications:
 
 Position sizing based on empirical risk distributions
 Monitoring risk regime changes over time
 Comparing risk patterns across timeframes
 
Risk distribution analysis improves trade timing by identifying when market conditions favor specific strategies.
 
 Enter positions during low-risk periods (Q1)
 Reduce exposure in high-risk periods (Q4)
 Use percentile rankings for dynamic stop-loss placement
 Time volatility strategies using distribution patterns
 Detect regime shifts through distribution changes
 Compare current conditions to historical benchmarks
 Identify outlier events in tail regions
 Validate quantitative models with empirical data
 
 Configuration Options 
Data Collection
 
 Lookback Period: Control amount of historical data analyzed
 Date Range Filtering: Focus on specific market periods
 Sample Size Validation: Automatic reliability warnings
 
Histogram Customization
 
 Bin Count: 10-50 bins for different detail levels
 Auto/Manual Bin Width: Optimize for your data range
 Visual Preferences: Custom colors and font sizes
 
 Implementation Guide 
Start with Standard Deviation on daily charts for the most intuitive introduction to distribution-based risk analysis.
 
 Method Selection: Begin with Standard Deviation
 Setup: Use daily charts with 20-30 bins
 Interpretation: Focus on quartile transitions as signals
 Monitoring: Track distribution changes for regime detection
 
The tool provides comprehensive statistics including mean, standard deviation, quartiles, and current position metrics like Z-score and percentile ranking.
Enjoy, and please let me know your feedback! 😊🥂
Pullback Pro Dow Strategy v7 (ADX Filter)
### **Strategy Description (For TradingView)**
#### **Title:** Pullback Pro: Dow Theory & ADX Strategy
---
#### **1. Summary**
This strategy is designed to identify and trade pullbacks within an established trend, based on the core principles of Dow Theory. It uses market structure (pivot highs and lows) to determine the trend direction and an Exponential Moving Average (EMA) to pinpoint pullback entry opportunities.
To enhance trade quality and avoid ranging markets, an ADX (Average Directional Index) filter is integrated to ensure that entries are only taken when the trend has sufficient momentum.
---
#### **2. Core Logic: How It Works**
The strategy's logic is broken down into three main steps:
**Step 1: Trend Determination (Dow Theory)**
* The primary trend is identified by analyzing recent pivot points.
* An **Uptrend** is confirmed when the script detects a pattern of higher highs and higher lows (HH/HL).
* A **Downtrend** is confirmed by a pattern of lower highs and lower lows (LH/LL).
* If neither pattern is present, the strategy considers the market to be in a range and will not seek trades.
**Step 2: Entry Signal (Pullback to EMA)**
* Once a clear trend is established, the strategy waits for a price correction.
* **Long Entry:** In a confirmed uptrend, a long position is initiated when the price pulls back and crosses *under* the specified EMA.
* **Short Entry:** In a confirmed downtrend, a short position is initiated when the price rallies and crosses *over* the EMA.
**Step 3: Confirmation & Risk Management**
* **ADX Filter:** To ensure the trend is strong enough to trade, an entry signal is only validated if the ADX value is above a user-defined threshold (e.g., 25). This helps filter out weak signals during choppy or consolidating markets.
* **Stop Loss:** The initial Stop Loss is automatically and logically placed at the last market structure point:
    * For long trades, it's placed at the `lastPivotLow`.
    * For short trades, it's placed at the `lastPivotHigh`.
* **Take Profit:** Two Take Profit levels are calculated based on user-defined Risk-to-Reward (R:R) ratios. The strategy allows for partial profit-taking at the first target (TP1), moving the remainder of the position to the second target (TP2).
---
#### **3. Input Settings Explained**
**① Dow Theory Settings**
* **Pivot Lookback Period:** Determines the sensitivity for detecting pivot highs and lows. A smaller number makes it more sensitive to recent price swings; a larger number focuses on more significant, longer-term pivots.
**② Entry Logic (Pullback)**
* **Pullback EMA Length:** Sets the period for the Exponential Moving Average used to identify pullback entries.
**③ Risk & Exit Management**
* **Take Profit 1 R:R:** Sets the Risk-to-Reward ratio for the first take-profit target.
* **Take Profit 1 (%):** The percentage of the position to be closed when TP1 is hit.
* **Take Profit 2 R:R:** Sets the Risk-to-Reward ratio for the final take-profit target.
**④ Filters**
* **Use ADX Trend Filter:** A master switch to enable or disable the ADX filter.
* **ADX Length:** The lookback period for the ADX calculation.
* **ADX Threshold:** The minimum ADX value required to confirm a trade signal. Trades will only be placed if the ADX is above this level.
---
#### **4. Best Practices & Recommendations**
* This is a trend-following system. It is designed to perform best in markets that exhibit clear, sustained trending behavior.
* It may underperform in choppy, sideways, or strongly ranging markets. The ADX filter is designed to help mitigate this, but no filter is perfect.
* **Crucially, you must backtest this strategy thoroughly** on your preferred financial instrument and timeframe before considering any live application.
* Experiment with the `Pivot Lookback Period`, `Pullback EMA Length`, and `ADX Threshold` to optimize performance for a specific market's characteristics.
---
#### **DISCLAIMER**
This script is provided for educational and informational purposes only. It does not constitute financial advice. All trading involves a high level of risk, and past performance is not indicative of future results. You are solely responsible for your own trading decisions. The author assumes no liability for any financial losses you may incur from using this strategy. Always conduct your own research and due diligence.
NY Open Breakout [ATR-5000]# **New York Open Breakout Indicator  **
## **📌 Overview**  
This **Pine Script** indicator identifies high-probability breakout opportunities at the **New York market open (13:30 UTC)** based on **volatility filters** using **customizable ATR periods and thresholds**.  
### **🔹 Key Features**  
✅ **Fully Customizable ATR Periods** (2 to **5000** bars)  
✅ **Adjustable Thresholds** (0.01% to 5.00%)  
✅ **Opening Range (OR) Filter** (0.01% to 5.00%)  
✅ **Clean Visuals** – Only highlights the **13:30 UTC candle** when conditions are met  
✅ **Real-Time Info Panel** – Displays current ATR & threshold settings  
✅ **Automatic Daily Reset** – Fresh signals every trading day  
---  
## **📊 How It Works**  
### **1️⃣ Volatility Check (13:25 UTC)**  
- Calculates **two ATR values** (user-defined periods)  
- Compares them against **custom % thresholds**  
- Only proceeds if **both ATRs exceed** their required volatility levels  
### **2️⃣ Opening Range Confirmation (13:30 UTC)**  
- Measures the **high-low range** of the 13:30 candle  
- Validates if the range meets the **minimum % threshold**  
- If all conditions pass → **Highlights the candle** in your chosen color  
### **3️⃣ Visual Feedback**  
- **🟣 Colored Candle** → Valid breakout signal  
- **📊 Info Table** → Shows current ATR settings & thresholds  
---  
## **⚙️ Customization Options**  
| **Setting**               | **Default** | **Adjustable Range** |  
|---------------------------|------------|----------------------|  
| **First ATR Period**      | 14         | **2–5000** bars      |  
| **Second ATR Period**     | 161        | **2–5000** bars      |  
| **First ATR Threshold**   | 0.42%      | **0.01%–5.00%**      |  
| **Second ATR Threshold**  | 0.40%      | **0.01%–5.00%**      |  
| **OR Range Threshold**    | 0.42%      | **0.01%–5.00%**      |  
| **Candle Color**          | Purple     | **Any color**        |  
---  
## **📈 Best Use Cases**  
✔ **Forex (EURUSD, GBPUSD)** – Captures NY session momentum  
✔ **Indices (SPX, NASDAQ)** – Works well with opening volatility  
✔ **Commodities (Gold, Oil)** – Filters out low-energy days  
---  
## **🔧 How to Adjust Settings**  
1. **Click the gear icon (⚙️)** on your TradingView chart  
2. **Modify ATR periods & thresholds** as needed  
3. **Change the candle color** for better visibility  
---  
## **🚀 Why This Indicator?**  
- **No repainting** – Signals lock in after candle close  
- **No clutter** – Only marks valid 13:30 candles  
- **Adaptable** – Works on **any market & timeframe**  
- **Fully automated** – No manual adjustments needed  
---
### **📥 Apply & Start Trading!**  
Simply **load the script** on TradingView and customize it to fit your strategy! 🚀






















