HTF Candles with PVSRA Volume Coloring (PCS Series)This indicator displays higher timeframe (HTF) candles using a PVSRA-inspired color model that blends price and volume strength, allowing traders to visualize higher-timeframe activity directly on lower-timeframe charts without switching screens.
 OVERVIEW 
This script visualizes higher-timeframe (HTF) candles directly on lower-timeframe charts using a custom PVSRA (Price, Volume & Support/Resistance Analysis) color model.
Unlike standard HTF indicators, it aggregates real-time OHLC and volume data bar-by-bar and dynamically draws synthetic HTF candles that update as the higher-timeframe bar evolves.
This allows traders to interpret momentum, trend continuation, and volume pressure from broader market structures without switching charts.
 INTEGRATION LOGIC 
This script merges higher-timeframe candle projection with PVSRA volume analysis to provide a single, multi-timeframe momentum view.
The HTF structure reveals directional context, while PVSRA coloring exposes the underlying strength of buying and selling pressure.
By combining both, traders can see when a higher-timeframe candle is building with strong or weak volume, enabling more informed intraday decisions than either tool could offer alone.
 HOW IT WORKS 
 
 Aggregates price data : Groups lower-timeframe bars to calculate higher-timeframe Open, High, Low, Close, and total Volume.
 Applies PVSRA logic : Compares each HTF candle’s volume to the average of the last 10 bars:
  • >200% of average = strong activity
  • >150% of average = moderate activity
  • ≤150% = normal activity
 Assigns colors :
  •  Green/Blue  = bullish high-volume
  •  Red/Fuchsia  = bearish high-volume
  •  White/Gray  = neutral or low-volume moves
 Draws dynamic outlines : Outlines update live while the current HTF candle is forming.
 Supports symbol override : Calculations can use another instrument for correlation analysis.
 
This multi-timeframe aggregation avoids repainting issues in  request.security()  and ensures accurate real-time HTF representation.
 FEATURES 
 
 Dual HTF Display : Visualize two higher timeframes simultaneously (e.g., 4H and 1D).
 Dynamic PVSRA Coloring : Volume-weighted candle colors reveal bullish or bearish dominance.
 Customizable Layout : Adjust candle width, spacing, offset, and color schemes.
 Candle Outlines : Highlight the forming HTF candle to monitor developing structure.
 Symbol Override : Display HTF candles from another instrument for cross-analysis.
 
 SETTINGS 
 
 HTF 1 & HTF 2 : enable/disable, set timeframes, choose label colors, show/hide outlines.
 Number of Candles : choose how many HTF candles to plot (1–10).
 Offset Position : distance to the right of the current price where HTF candles begin.
 Spacing & Width : adjust separation and scaling of candle groups.
 Show Wicks/Borders : toggle wick and border visibility.
 PVSRA Colors : enable or disable volume-based coloring.
 Symbol Override : use a secondary ticker for HTF data if desired.
 
 USAGE TIPS 
 
 Set the indicator’s visual order to “Bring to front.”
 Always choose HTFs higher than your active chart timeframe.
 Use PVSRA colors to identify strong momentum and potential reversals.
 Adjust candle spacing and width for your chart layout.
 Outlines are not shown on chart timeframes below 5 minutes.
 
 TRADING STRATEGY 
 
 Strategy Overview : Combine HTF structure and PVSRA volume signals to
 • Identify zones of high institutional activity and potential reversals.
 • Wait for confirmation through consolidation or a pullback to key levels.
 • Trade in alignment with dominant higher-timeframe structure rather than chasing volatility.
 Setup :
 • Chart timeframe: lower (5m, 15m, 1H)
 • HTF 1: 4H or 1D
 • HTF 2: 1D or 1W
 • PVSRA Colors: enabled
 • Outlines: enabled
 Entry Concept :
High-volume candles (green or red) often indicate  market-maker activity , such zones often reflect liquidity absorption by larger players and are not necessarily ideal entry points.
Wait for the next consolidation or pullback toward a support or resistance level before acting.
 Bullish scenario :
 • After a high-volume or rejection candle near a low, price consolidates and forms a higher low.
 • Enter long only when structure confirms strength above support.
 Bearish scenario :
 • After a high-volume or rejection candle near a top, price consolidates and forms a lower high.
 • Enter short once resistance holds and momentum weakens.
 Exit Guidelines :
 • Exit when next HTF candle shifts in color or momentum fades.
 • Exit if price structure breaks opposite to your trade direction.
 • Always use stop-loss and take-profit levels.
 Additional Tips :
 • Never enter directly on strong green/red high-volume candles, these are usually areas of institutional absorption.
 • Wait for market structure confirmation and volume normalization.
 • Combine with RSI, moving averages, or support/resistance for timing.
 • Avoid trading when HTF candles are mixed or low-volume (unclear bias).
 • Outlines hidden below 5m charts.
 Risk Management :
 • Use stop-loss and take-profit on all positions.
 • Limit risk to 1–2% per trade.
 • Adjust position size for volatility.
 
 FINAL NOTES 
This script helps traders synchronize lower-timeframe execution with higher-timeframe momentum and volume dynamics.
Test it on demo before live use, and adjust settings to fit your trading style.
 DISCLAIMER 
This script is for educational purposes only and does not constitute financial advice.
 SUPPORT & UPDATES 
Future improvements may include alert conditions and additional visualization modes. Feedback is welcome in the comments section.
 CREDITS & LICENSE 
Created by  @seoco  — open source for community learning.
Licensed under  Mozilla Public License 2.0 .
指標和策略
Mean Reversion Oscillator [Alpha Extract]An advanced composite oscillator system specifically designed to identify extreme market conditions and high-probability mean reversion opportunities, combining five proven oscillators into a single, powerful analytical framework.
By integrating multiple momentum and volume-based indicators with sophisticated extreme level detection, this oscillator provides precise entry signals for contrarian trading strategies while filtering out false reversals through momentum confirmation.
🔶 Multi-Oscillator Composite Framework
Utilizes a comprehensive approach that combines Bollinger %B, RSI, Stochastic, Money Flow Index, and Williams %R into a unified composite score. This multi-dimensional analysis ensures robust signal generation by capturing different aspects of market extremes and momentum shifts.
 // Weighted composite (equal weights)
normalized_bb = bb_percent
normalized_rsi = rsi
normalized_stoch = stoch_d_val
normalized_mfi = mfi
normalized_williams = williams_r
composite_raw = (normalized_bb + normalized_rsi + normalized_stoch + normalized_mfi + normalized_williams) / 5
composite = ta.sma(composite_raw, composite_smooth) 
🔶 Advanced Extreme Level Detection
Features a sophisticated dual-threshold system that distinguishes between moderate and extreme market conditions. This hierarchical approach allows traders to identify varying degrees of mean reversion potential, from moderate oversold/overbought conditions to extreme levels that demand immediate attention.
🔶 Momentum Confirmation System
Incorporates a specialized momentum histogram that confirms mean reversion signals by analyzing the rate of change in the composite oscillator. This prevents premature entries during strong trending conditions while highlighting genuine reversal opportunities.
 // Oscillator momentum (rate of change)
osc_momentum = ta.mom(composite, 5)
histogram = osc_momentum
// Momentum confirmation
momentum_bullish = histogram > histogram 
momentum_bearish = histogram < histogram 
// Confirmed signals
confirmed_bullish = bullish_entry and momentum_bullish
confirmed_bearish = bearish_entry and momentum_bearish 
🔶 Dynamic Visual Intelligence
The oscillator line adapts its color intensity based on proximity to extreme levels, providing instant visual feedback about market conditions. Background shading creates clear zones that highlight when markets enter moderate or extreme territories.
🔶 Intelligent Signal Generation
Generates precise entry signals only when the composite oscillator crosses extreme thresholds with momentum confirmation. This dual-confirmation approach significantly reduces false signals while maintaining sensitivity to genuine mean reversion opportunities.
How It Works
🔶 Composite Score Calculation
The indicator simultaneously tracks five different oscillators, each normalized to a 0-100 scale, then combines them into a smoothed composite score. This approach eliminates the noise inherent in single-oscillator analysis while capturing the consensus view of multiple momentum indicators.
 // Mean reversion entry signals
bullish_entry = ta.crossover(composite, 100 - extreme_level) and composite  < (100 - extreme_level)
bearish_entry = ta.crossunder(composite, extreme_level) and composite  > extreme_level
// Bollinger %B calculation
bb_basis = ta.sma(src, bb_length)
bb_dev = bb_mult * ta.stdev(src, bb_length)
bb_percent = (src - bb_lower) / (bb_upper - bb_lower) * 100 
🔶 Extreme Zone Identification
The system automatically identifies when markets reach statistically significant extreme levels, both moderate (65/35) and extreme (80/20). These zones represent areas where mean reversion has the highest probability of success based on historical market behavior.
🔶 Momentum Histogram Analysis
A specialized momentum histogram tracks the velocity of oscillator changes, helping traders distinguish between healthy corrections and potential trend reversals. The histogram's color-coded display makes momentum shifts immediately apparent.
🔶 Divergence Detection Framework
Built-in divergence analysis identifies situations where price and oscillator movements diverge, often signaling impending reversals. Diamond-shaped markers highlight these critical divergence patterns for enhanced pattern recognition.
🔶 Real-Time Information Dashboard
An integrated information table provides instant access to current oscillator readings, market status, and individual component values. This dashboard eliminates the need to manually check multiple indicators while trading.
🔶 Individual Component Display
Optional display of individual oscillator components allows traders to understand which specific indicators are driving the composite signal. This transparency enables more informed decision-making and deeper market analysis.
🔶 Adaptive Background Coloring
Intelligent background shading automatically adjusts based on market conditions, creating visual zones that correspond to different levels of mean reversion potential. The subtle color gradations make pattern recognition effortless.
1D
  
3D
  
🔶 Comprehensive Alert System
Multi-tier alert system covers confirmed entry signals, divergence patterns, and extreme level breaches. Each alert type provides specific context about the detected condition, enabling traders to respond appropriately to different signal strengths.
🔶 Customizable Threshold Management
Fully adjustable extreme and moderate levels allow traders to fine-tune the indicator's sensitivity to match different market volatilities and trading timeframes. This flexibility ensures optimal performance across various market conditions.
🔶 Why Choose AE - Mean Reversion Oscillator?
This indicator provides the most comprehensive approach to mean reversion trading by combining multiple proven oscillators with advanced confirmation mechanisms. By offering clear visual hierarchies for different extreme levels and requiring momentum confirmation for signals, it empowers traders to identify high-probability contrarian opportunities while avoiding false reversals. The sophisticated composite methodology ensures that signals are both statistically significant and practically actionable, making it an essential tool for traders focused on mean reversion strategies across all market conditions.
Historical Matrix Analyzer [PhenLabs]📊Historical Matrix Analyzer  
 Version:  PineScriptv6
 📌Description 
The Historical Matrix Analyzer is an advanced probabilistic trading tool that transforms technical analysis into a data-driven decision support system. By creating a comprehensive 56-cell matrix that tracks every combination of RSI states and multi-indicator conditions, this indicator reveals which market patterns have historically led to profitable outcomes and which have not.
At its core, the indicator continuously monitors seven distinct RSI states (ranging from Extreme Oversold to Extreme Overbought) and eight unique indicator combinations (MACD direction, volume levels, and price momentum). For each of these 56 possible market states, the system calculates average forward returns, win rates, and occurrence counts based on your configurable lookback period. The result is a color-coded probability matrix that shows you exactly where you stand in the historical performance landscape.
The standout feature is the Current State Panel, which provides instant clarity on your active market conditions. This panel displays signal strength classifications (from Strong Bullish to Strong Bearish), the average return percentage for similar past occurrences, an estimated win rate using Bayesian smoothing to prevent small-sample distortions, and a confidence level indicator that warns you when insufficient data exists for reliable conclusions.
 🚀Points of Innovation 
 
 Multi-dimensional state classification combining 7 RSI levels with 8 indicator combinations for 56 unique trackable market conditions
 Bayesian win rate estimation with adjustable smoothing strength to provide stable probability estimates even with limited historical samples
 Real-time active cell highlighting with “NOW” marker that visually connects current market conditions to their historical performance data
 Configurable color intensity sensitivity allowing traders to adjust heat-map responsiveness from conservative to aggressive visual feedback
 Dual-panel display system separating the comprehensive statistics matrix from an easy-to-read current state summary panel
 Intelligent confidence scoring that automatically warns traders when occurrence counts fall below reliable thresholds
 
 🔧Core Components 
 
 RSI State Classification:  Segments RSI readings into 7 distinct zones (Extreme Oversold <20, Oversold 20-30, Weak 30-40, Neutral 40-60, Strong 60-70, Overbought 70-80, Extreme Overbought >80) to capture momentum extremes and transitions
 Multi-Indicator Condition Tracking:  Simultaneously monitors MACD crossover status (bullish/bearish), volume relative to moving average (high/low), and price direction (rising/falling) creating 8 binary-encoded combinations
 Historical Data Storage Arrays:  Maintains rolling lookback windows storing RSI states, indicator states, prices, and bar indices for precise forward-return calculations
 Forward Performance Calculator:  Measures price changes over configurable forward bar periods (1-20 bars) from each historical state, accumulating total returns and win counts per matrix cell
 Bayesian Smoothing Engine:  Applies statistical prior assumptions (default 50% win rate) weighted by user-defined strength parameter to stabilize estimated win rates when sample sizes are small
 Dynamic Color Mapping System:  Converts average returns into color-coded heat map with intensity adjusted by sensitivity parameter and transparency modified by confidence levels
 
 🔥Key Features 
 
 56-Cell Probability Matrix:  Comprehensive grid displaying every possible combination of RSI state and indicator condition, with each cell showing average return percentage, estimated win rate, and occurrence count for complete statistical visibility
 Current State Info Panel:  Dedicated display showing your exact position in the matrix with signal strength emoji indicators, numerical statistics, and color-coded confidence warnings for immediate situational awareness
 Customizable Lookback Period:  Adjustable historical window from 50 to 500 bars allowing traders to focus on recent market behavior or capture longer-term pattern stability across different market cycles
 Configurable Forward Performance Window:  Select target holding periods from 1 to 20 bars ahead to align probability calculations with your trading timeframe, whether day trading or swing trading
 Visual Heat Mapping:  Color-coded cells transition from red (bearish historical performance) through gray (neutral) to green (bullish performance) with intensity reflecting statistical significance and occurrence frequency
 Intelligent Data Filtering:  Minimum occurrence threshold (1-10) removes unreliable patterns with insufficient historical samples, displaying gray warning colors for low-confidence cells
 Flexible Layout Options:  Independent positioning of statistics matrix and info panel to any screen corner, accommodating different chart layouts and personal preferences
 Tooltip Details:  Hover over any matrix cell to see full RSI label, complete indicator status description, precise average return, estimated win rate, and total occurrence count
 
 🎨Visualization 
 
 Statistics Matrix Table:  A 9-column by 8-row grid with RSI states labeling vertical axis and indicator combinations on horizontal axis, using compact abbreviations (XOverS, OverB, MACD↑, Vol↓, P↑) for space efficiency
 Active Cell Indicator:  The current market state cell displays “⦿ NOW ⦿” in yellow text with enhanced color saturation to immediately draw attention to relevant historical performance
 Signal Strength Visualization:  Info panel uses emoji indicators (🔥 Strong Bullish, ✅ Bullish, ↗️ Weak Bullish, ➖ Neutral, ↘️ Weak Bearish, ⛔ Bearish, ❄️ Strong Bearish, ⚠️ Insufficient Data) for rapid interpretation
 Histogram Plot:  Below the price chart, a green/red histogram displays the current cell’s average return percentage, providing a time-series view of how historical performance changes as market conditions evolve
 Color Intensity Scaling:  Cell background transparency and saturation dynamically adjust based on both the magnitude of average returns and the occurrence count, ensuring visual emphasis on reliable patterns
 Confidence Level Display:  Info panel bottom row shows “High Confidence” (green), “Medium Confidence” (orange), or “Low Confidence” (red) based on occurrence counts relative to minimum threshold multipliers
 
 📖Usage Guidelines 
 RSI Period 
 
 Default: 14
 Range: 1 to unlimited
 Description: Controls the lookback period for RSI momentum calculation. Standard 14-period provides widely-recognized overbought/oversold levels. Decrease for faster, more sensitive RSI reactions suitable for scalping. Increase (21, 28) for smoother, longer-term momentum assessment in swing trading. Changes affect how quickly the indicator moves between the 7 RSI state classifications.
 
 MACD Fast Length 
 
 Default: 12
 Range: 1 to unlimited
 Description: Sets the faster exponential moving average for MACD calculation. Standard 12-period setting works well for daily charts and captures short-term momentum shifts. Decreasing creates more responsive MACD crossovers but increases false signals. Increasing smooths out noise but delays signal generation, affecting the bullish/bearish indicator state classification.
 
 MACD Slow Length 
 
 Default: 26
 Range: 1 to unlimited
 Description: Defines the slower exponential moving average for MACD calculation. Traditional 26-period setting balances trend identification with responsiveness. Must be greater than Fast Length. Wider spread between fast and slow increases MACD sensitivity to trend changes, impacting the frequency of indicator state transitions in the matrix.
 
 MACD Signal Length 
 
 Default: 9
 Range: 1 to unlimited
 Description: Smoothing period for the MACD signal line that triggers bullish/bearish state changes. Standard 9-period provides reliable crossover signals. Shorter values create more frequent state changes and earlier signals but with more whipsaws. Longer values produce more confirmed, stable signals but with increased lag in detecting momentum shifts.
 
 Volume MA Period 
 
 Default: 20
 Range: 1 to unlimited
 Description: Lookback period for volume moving average used to classify volume as “high” or “low” in indicator state combinations. 20-period default captures typical monthly trading patterns. Shorter periods (10-15) make volume classification more reactive to recent spikes. Longer periods (30-50) require more sustained volume changes to trigger state classification shifts.
 
 Statistics Lookback Period 
 
 Default: 200
 Range: 50 to 500
 Description: Number of historical bars used to calculate matrix statistics. 200 bars provides substantial data for reliable patterns while remaining responsive to regime changes. Lower values (50-100) emphasize recent market behavior and adapt quickly but may produce volatile statistics. Higher values (300-500) capture long-term patterns with stable statistics but slower adaptation to changing market dynamics.
 
 Forward Performance Bars 
 
 Default: 5
 Range: 1 to 20
 Description: Number of bars ahead used to calculate forward returns from each historical state occurrence. 5-bar default suits intraday to short-term swing trading (5 hours on hourly charts, 1 week on daily charts). Lower values (1-3) target short-term momentum trades. Higher values (10-20) align with position trading and longer-term pattern exploitation.
 
 Color Intensity Sensitivity 
 
 Default: 2.0
 Range: 0.5 to 5.0, step 0.5
 Description: Amplifies or dampens the color intensity response to average return magnitudes in the matrix heat map. 2.0 default provides balanced visual emphasis. Lower values (0.5-1.0) create subtle coloring requiring larger returns for full saturation, useful for volatile instruments. Higher values (3.0-5.0) produce vivid colors from smaller returns, highlighting subtle edges in range-bound markets.
 
 Minimum Occurrences for Coloring 
 
 Default: 3
 Range: 1 to 10
 Description: Required minimum sample size before applying color-coded performance to matrix cells. Cells with fewer occurrences display gray “insufficient data” warning. 3-occurrence default filters out rare patterns. Lower threshold (1-2) shows more data but includes unreliable single-event statistics. Higher thresholds (5-10) ensure only well-established patterns receive visual emphasis.
 
 Table Position 
 
 Default: top_right
 Options: top_left, top_right, bottom_left, bottom_right
 Description: Screen location for the 56-cell statistics matrix table. Position to avoid overlapping critical price action or other indicators on your chart. Consider chart orientation and candlestick density when selecting optimal placement.
 
 Show Current State Panel 
 
 Default: true
 Options: true, false
 Description: Toggle visibility of the dedicated current state information panel. When enabled, displays signal strength, RSI value, indicator status, average return, estimated win rate, and confidence level for active market conditions. Disable to declutter charts when only the matrix table is needed.
 
 Info Panel Position 
 
 Default: bottom_left
 Options: top_left, top_right, bottom_left, bottom_right
 Description: Screen location for the current state information panel (when enabled). Position independently from statistics matrix to optimize chart real estate. Typically placed opposite the matrix table for balanced visual layout.
 
 Win Rate Smoothing Strength 
 
 Default: 5
 Range: 1 to 20
 Description: Controls Bayesian prior weighting for estimated win rate calculations. Acts as virtual sample size assuming 50% win rate baseline. Default 5 provides moderate smoothing preventing extreme win rate estimates from small samples. Lower values (1-3) reduce smoothing effect, allowing win rates to reflect raw data more directly. Higher values (10-20) increase conservatism, pulling win rate estimates toward 50% until substantial evidence accumulates.
 
 ✅Best Use Cases 
 
 Pattern-based discretionary trading where you want historical confirmation before entering setups that “look good” based on current technical alignment
 Swing trading with holding periods matching your forward performance bar setting, using high-confidence bullish cells as entry filters
 Risk assessment and position sizing, allocating larger size to trades originating from cells with strong positive average returns and high estimated win rates
 Market regime identification by observing which RSI states and indicator combinations are currently producing the most reliable historical patterns
 Backtesting validation by comparing your manual strategy signals against the historical performance of the corresponding matrix cells
 Educational tool for developing intuition about which technical condition combinations have actually worked versus those that feel right but lack historical evidence
 
 ⚠️Limitations 
 
 Historical patterns do not guarantee future performance, especially during unprecedented market events or regime changes not represented in the lookback period
 Small sample sizes (low occurrence counts) produce unreliable statistics despite Bayesian smoothing, requiring caution when acting on low-confidence cells
 Matrix statistics lag behind rapidly changing market conditions, as the lookback period must accumulate new state occurrences before updating performance data
 Forward return calculations use fixed bar periods that may not align with actual trade exit timing, support/resistance levels, or volatility-adjusted profit targets
 
 💡What Makes This Unique 
 
 Multi-Dimensional State Space:  Unlike single-indicator tools, simultaneously tracks 56 distinct market condition combinations providing granular pattern resolution unavailable in traditional technical analysis
 Bayesian Statistical Rigor:  Implements proper probabilistic smoothing to prevent overconfidence from limited data, a critical feature missing from most pattern recognition tools
 Real-Time Contextual Feedback:  The “NOW” marker and dedicated info panel instantly connect current market conditions to their historical performance profile, eliminating guesswork
 Transparent Occurrence Counts:  Displays sample sizes directly in each cell, allowing traders to judge statistical reliability themselves rather than hiding data quality issues
 Fully Customizable Analysis Window:  Complete control over lookback depth and forward return horizons lets traders align the tool precisely with their trading timeframe and strategy requirements
 
 🔬How It Works 
 1. State Classification and Encoding 
 
 Each bar’s RSI value is evaluated and assigned to one of 7 discrete states based on threshold levels (0: <20, 1: 20-30, 2: 30-40, 3: 40-60, 4: 60-70, 5: 70-80, 6: >80)
 Simultaneously, three binary conditions are evaluated: MACD line position relative to signal line, current volume relative to its moving average, and current close relative to previous close
 These three binary conditions are combined into a single indicator state integer (0-7) using binary encoding, creating 8 possible indicator combinations
 The RSI state and indicator state are stored together, defining one of 56 possible market condition cells in the matrix
 
 2. Historical Data Accumulation 
 
 As each bar completes, the current state classification, closing price, and bar index are stored in rolling arrays maintained at the size specified by the lookback period
 When the arrays reach capacity, the oldest data point is removed and the newest added, creating a sliding historical window
 This continuous process builds a comprehensive database of past market conditions and their subsequent price movements
 
 3. Forward Return Calculation and Statistics Update 
 
 On each bar, the indicator looks back through the stored historical data to find bars where sufficient forward bars exist to measure outcomes
 For each historical occurrence, the price change from that bar to the bar N periods ahead (where N is the forward performance bars setting) is calculated as a percentage return
 This percentage return is added to the cumulative return total for the specific matrix cell corresponding to that historical bar’s state classification
 Occurrence counts are incremented, and wins are tallied for positive returns, building comprehensive statistics for each of the 56 cells
 The Bayesian smoothing formula combines these raw statistics with prior assumptions (neutral 50% win rate) weighted by the smoothing strength parameter to produce estimated win rates that remain stable even with small samples
 
 💡Note: 
The Historical Matrix Analyzer is designed as a decision support tool, not a standalone trading system. Best results come from using it to validate discretionary trade ideas or filter systematic strategy signals. Always combine matrix insights with proper risk management, position sizing rules, and awareness of broader market context. The estimated win rate feature uses Bayesian statistics specifically to prevent false confidence from limited data, but no amount of smoothing can create reliable predictions from fundamentally insufficient sample sizes. Focus on high-confidence cells (green-colored confidence indicators) with occurrence counts well above your minimum threshold for the most actionable insights.
Fair Value Lead-Lag Model [BackQuant]Fair Value Lead-Lag Model  
 A cross-asset model that estimates where price "should" be relative to a chosen reference series, then tracks the deviation as a normalized oscillator. It helps you answer two questions: 1) is the asset rich or cheap vs its driver, and 2) is the driver leading or lagging price over the next N bars.
 Concept in one paragraph 
 Many assets co-move with a macro or sector driver. Think BTC vs DXY, gold vs real yields, a stock vs its sector ETF. This tool builds a rolling fair value of the charted asset from a reference series and shows how far price is above or below that fair value in standard deviation units. You can shift the reference forward or backward to test who leads whom, then use the deviation and its bands to structure mean-reversion or trend-following ideas.
 What the model does 
  
  Reference mapping : Pulls a reference symbol at a chosen timeframe, with an optional lead or lag in bars to test causality.
  Fair value engine : Converts the reference into a synthetic fair value of the chart using one of four methods:
  
  Ratio : price/ref with a rolling average ratio. Good when the relationship is proportional.
  Spread : price minus ref with a rolling average spread. Good when the relationship is additive.
  Z-Score : normalizes both series, aligns on standardized units, then re-projects to price space. Good when scale drifts.
  Beta-Adjusted : rolling regression style. Uses covariance and variance to compute beta, then builds a fair value = mean(price) + beta * (ref − mean(ref)).
  
  Deviation and bands : Computes a z-scored deviation of price vs fair value and plots sigma bands (±1, ±2, ±3) around the fair value line on the chart.
  Correlation context : Shows rolling correlation so you can judge if deviations are meaningful or just noise when co-movement is weak.
  Visuals :
  
  Fair value line on price chart with sigma envelopes.
  Deviation as a column oscillator and optional line.
  Threshold shading beyond user-set upper and lower levels.
  Summary table with reference, deviation, status, correlation, and method.
  
  
 Why this is useful 
  
  Mean reversion framework : When correlation is healthy and deviation stretches beyond your sigma threshold, probability favors reversion toward fair value. This is classic pairs logic adapted to a driver and a target.
  Trend confirmation : If price rides the fair value line and deviation stays modest while correlation is positive, it supports trend persistence. Pullbacks to negative deviation in an uptrend can be buyable.
  Lead-lag discovery : Shift the reference forward by +N bars. If correlation improves, the reference tends to lead. Shift backward for the reverse. Use the best setting for planning early entries or hedges.
  Regime detection : Large persistent deviations with falling correlation hint at regime change. The relationship you relied on may be breaking down, so reduce confidence or switch methods.
  
 How to use it step by step 
  
  Pick a sensible reference : Choose a macro, index, currency, or sector driver that logically explains the asset’s moves. Example: gold with DXY, a semiconductor stock with SOXX.
  Test lead-lag : Nudge Lead/Lag Periods to small positive values like +1 to +5 to see if the reference leads. If correlation improves, keep that offset. If correlation worsens, try a small negative value or zero.
  Select a method :
  
  Start with  Beta-Adjusted  when the relationship is approximately linear with drift.
  Use  Ratio  if the assets usually move in proportional terms.
  Use  Spread  when they trade around a level difference.
  Use  Z-Score  when scales wander or volatility regimes shift.
  
  Tune windows :
  
  Rolling Window controls how quickly fair value adapts. Shorter equals faster but noisier.
  Normalization Period controls how deviations are standardized. Longer equals stabler sigma sizing.
  Correlation Length controls how co-movement is measured. Keep it near the fair value window.
  
  Trade the edges :
  
  Mean reversion idea : Wait for deviation beyond your Upper or Lower Threshold with positive correlation. Fade back toward fair value. Exit at the fair value line or the next inner sigma band.
  Trend idea : In an uptrend, buy pullbacks when deviation dips negative but correlation remains healthy. In a downtrend, sell bounces when deviation spikes positive.
  
  Read the table : Deviation shows how many sigmas you are from fair value. Status tells you overvalued or undervalued. Correlation color hints confidence. Method tells you the projection style used.
  
 Reading the display 
  
  Fair value line  on price chart: the model’s estimate of where price should trade given the reference, updated each bar.
  Sigma bands  around fair value: a quick sense of residual volatility. Reversions often target inner bands first.
  Deviation oscillator : above zero means rich vs fair value, below zero means cheap. Color bins intensify with distance.
  Correlation line  (optional): scale is folded to match thresholds. Higher values increase trust in deviations.
  
 Parameter tips 
  
  Start with Rolling Window 20 to 30, Normalization Period 100, Correlation Length 50.
  Upper and Lower Threshold at ±2.0 are classic. Tighten to ±1.5 for more signals or widen to ±2.5 to focus on outliers.
  When correlation drifts below about 0.3, treat deviations with caution. Consider switching method or reference.
  If the fair value line whipsaws, increase Rolling Window or move to Beta-Adjusted which tends to be smoother.
  
 Playbook examples 
  
  Pairs-style reversion : Asset is +2.3 sigma rich vs reference, correlation 0.65, trend flat. Short the deviation back toward fair value. Cover near the fair value line or +1 sigma.
  Pro-trend pullback : Uptrend with correlation 0.7. Deviation dips to −1.2 sigma while price sits near the −1 sigma band. Buy the dip, target the fair value line, trail if the line is rising.
  Lead-lag timing : Reference leads by +3 bars with improved correlation. Use reference swings as early cues to anticipate deviation turns on the target.
  
 Caveats 
  
  The model assumes a stable relationship over the chosen windows. Structural breaks, policy shocks, and index rebalances can invalidate recent history.
  Correlation is descriptive, not causal. A strong correlation does not guarantee future convergence.
  Do not force trades when the reference has low liquidity or mismatched hours. Use a reference timeframe that captures real overlap.
  
 Bottom line 
This tool turns a loose cross-asset intuition into a quantified, visual fair value map. It gives you a consistent way to find rich or cheap conditions, time mean-reversion toward a statistically grounded target, and confirm or fade trends when the driver agrees.
NY 4H Wyckoff State Machine [CHE]  NY 4H Wyckoff State Machine  — Full (Re-Entry, Breakout, Wick, Re-Accum/Distrib, Dynamic Table) — One-Candle Wyckoff Re-Entry (OCWR)
  Summary 
OCWR operationalizes a one-candle session workflow: mark the first four-hour New York candle, fix its high and low as the session range when the window closes, and drive entries through a Wyckoff-style state machine on intraday bars. The script adds an ATR-scaled buffer around the range and requires multi-bar acceptance before treating breaks or re-entries as valid. Optional wick-cluster evidence, a proximity retest, and simple volume or RSI gates increase selectivity. Background tints expose regimes, shapes mark events, a dynamic table explains the current state, and hidden plots supply alert payloads. The design reduces random flips and makes state transitions auditable without higher-timeframe calls.
  Origin and name 
Method name: One-Candle Wyckoff Re-Entry (OCWR)
Transcript origin: The source idea is a “stupid simple one-candle scalping” routine: mark the first New York four-hour candle (commonly between one and five in the morning New York time), drop to five minutes, observe accumulation inside, wait for a manipulation move outside, then trade the re-entry back inside. Stops go beyond the excursion extreme; targets are either a fixed reward multiple or the opposite side of the range. Preference is given to several manipulation candles. This indicator codifies that workflow with explicit states, acceptance counters, buffers, and optional quality filters. Any external performance claims are not part of the code.
  Motivation: Why this design? 
Session levels are widely respected, yet single-bar breaches around them are noisy. OCWR separates range discovery from trade logic. It locks the range at the end of the window, applies an ATR-scaled buffer to ignore marginal oversteps, and requires acceptance over several bars for breaks and re-entries. Wick evidence and optional retest proximity help confirm that an excursion likely cleared liquidity rather than launched a trend. This yields cleaner transitions from test to commitment.
  What’s different vs. standard approaches? 
 Baseline: Static session lines or one-shot Wyckoff tags without process control.
 Architecture: Dual long and short state machines; ATR-buffered edges; multi-bar acceptance for breaks and re-entries; optional wick dominance and cluster checks; optional retest tolerance; direct and opposite breakout paths; cooldown after fires; distribution timeout; dynamic table with highlighted row.
 Practical effect: Fewer single-bar head-fakes, clearer hand-offs, and on-chart explanations of the machine’s view.
  Wyckoff structure by example — OCWR on five minutes 
One-candle setup:
On the four-hour chart, mark the first New York candle’s high and low, then switch to five minutes. Solid lines show the fixed range; dashed lines show ATR-buffered edges.
 Long path (verbal mapping): 
 Phase A, Stopping Action: Price stabilizes inside the range.
 Phase B, Consolidation: Sustained balance while the window is closed and after the range is fixed.
 Phase C, Test (Spring): Excursion below the buffered low with preference for several outside bars and dominant lower wicks, then a return inside.
 Re-entry acceptance: A required run of inside bars validates the test.
 Phase D, Breakout to Markup: Long signal fires; stop beyond the excursion extreme; objective is the opposite range or a fixed reward multiple.
 Phase E, Trend (Markup) and Re-Accumulation: Advance continues until target, stop, confirmation back against the box, or timeout. A pause inside trend may register as re-accumulation.
Short path mirrors the above: A UTAD-style move forms above the buffered high, then re-entry leads to Markdown and possible re-distribution.
 Variant map (verbal): 
 Accumulation after a downtrend: with Spring and Test, or without Spring; both proceed to Markup and may pause in Re-Accumulation.
 Distribution after an uptrend: with UTAD and Test, or without UTAD; both proceed to Markdown and may pause in Re-Distribution.
  Note: Phases A through E occur within each variant and are not separate variants.
  How it works (technical) 
 Session window: A configurable four-hour New York window records its high and low. At window end, the bounds are fixed for the session.
 ATR buffer: A margin above and below the fixed range discourages triggers from tiny oversteps.
 Inside and outside: Users choose close-based or wick-based detection. Overshoot requirements are expressed verbally as a fraction of the range with an optional absolute minimum.
 Manipulation tracking: The machine counts bars spent outside and records the side extreme.
 Re-entry acceptance: After a return inside, a specified number of inside bars must print before acceptance.
 Direct and opposite breakouts: Direct breakouts from accumulation and opposite breakouts after manipulation are supported, subject to acceptance and optional filters.
 Targets and exits: Choose the opposite boundary or a fixed reward multiple. Distribution ends on target, stop, confirmation back against the range, or timeout.
 Context filters (optional): Volume above a scaled SMA, RSI thresholds, and a trend SMA for simple regime context.
 Diagnostics: Background tints for regimes; arrows for re-entries; triangles for breakouts; table with row highlights; hidden plots for alert values.
  Central table (Wyckoff console) 
The table sits top-right and explains the machine’s stance. Columns: Structure label, plain-English description, active state pair for long and short, and human phase tags. Rows: Start and range building; accumulation branch with Spring and Test as well as direct breakout; Markup and re-accumulation; distribution branch with UTAD and Test as well as direct short breakout; Markdown and re-distribution. Only the active state cell is rewritten each last bar, for example “L_ACCUM slash S_ACCUM”. Row highlighting is context-aware: accumulation, Spring or UTAD, breakout, Markup or Markdown, and re-accumulation or re-distribution checks can highlight independently so users see simultaneous conditions. The table is created once, updated only on the last bar for efficiency, and functions as a read-only console to audit why a signal fired and where the path currently sits.
  Parameter Guide 
 Session window and time zone: First four hours of New York by default; time zone “America/New_York”.
 ATR length and buffer factor: Control buffer size; larger reduces sensitivity, smaller reacts faster.
 Minimum overshoot (fraction and absolute): Demand meaningful extension beyond the buffer.
 Break mode: Close-based is stricter; wick-based is more reactive.
 Acceptance counts: Separate counts for break, re-entry, and opposite breakout; higher values reduce noise.
 Minimum bars outside: Ensures manipulation is not a single spike.
 Wick detection and clusters (optional): Dominance thresholds and cluster size within a short window.
 Retest required and tolerance (optional): Gate re-entry by proximity to the buffered edge.
 Volume and RSI filters (optional): Simple gates on activity and momentum.
 TP mode and reward multiple: Opposite range or fixed multiple.
 Cooldown and distribution timeout: Rate-limit signals and prevent endless distribution.
 Visualization toggles: Background phases, labels, table, and helper lines.
  Reading & Interpretation 
Solid lines are the fixed session bounds; dashed lines are buffers. Backgrounds tint accumulation, manipulation, and distribution. Arrows show accepted re-entries; triangles show direct or opposite breakouts. Labels can summarize entry, stop, target, and risk. The table highlights the active row and the current state pair.
  Practical Workflows & Combinations 
 OCWR baseline: Each morning, mark the New York four-hour candle, move to five minutes, prefer multi-bar manipulation outside, then wait for a qualified re-entry inside. Stop beyond the excursion extreme. Target the opposite range for conservative management or a fixed multiple for uniform sizing.
 Trend following: Favor direct breakouts with trend alignment and no contradictory wick evidence.
 Quality control: When noise rises, increase acceptance, raise the buffer factor, enable retest, and require wick clusters.
 Discretionary confluences: Fair-value gaps and trend lines can be added by the user; they are not computed by this script.
  Behavior, Constraints & Performance 
Closed-bar confirmation is recommended when you require finality; live-bar conditions can change until close. The script does not call higher-timeframe data. It uses arrays, lines, labels, boxes, and a table; maximum bars back is five thousand; table updates are last-bar only. Known limits include compressed buffers in quiet sessions, unreliable wick evidence in thin markets, and session misalignment if the platform time zone is not New York.
  Sensible Defaults & Quick Tuning 
Start with ATR length fourteen, buffer factor near zero point fifteen, overshoot fraction near zero point ten, acceptance counts of two, minimum outside duration three, retest required on.
Too many flips: increase acceptance, raise buffer, enable retest, and tighten wick thresholds.
Too slow: reduce acceptance, lower buffer, switch to wick-based breaks, disable retest.
Noisy wicks: increase minimum wick ratio and cluster size, or disable wick detection.
  What this indicator is—and isn’t 
A session-anchored visualization and signal layer that formalizes a Wyckoff-style re-entry and breakout workflow derived from a single four-hour New York candle. It is not predictive and not a complete trading system. Use with structure analysis, risk controls, and position management.
  Disclaimer 
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Do not use this indicator on Heikin-Ashi, Renko, Kagi, Point-and-Figure, or Range charts, as these chart types can produce unrealistic results for signal markers and alerts.
 Best regards and happy trading
Chervolino 
Hyper Strength Index | QuantLapse🧠 Hyper Strength Index (HSI) | QuantLapse 
 Overview: 
The Hyper Strength Index (HSI) is a composite momentum oscillator designed to unify multiple strength measures into a single, adaptive framework. It combines the Relative Strength Index (RSI), Chande Momentum Oscillator (CMO), Money Flow Index (MFI), and Stochastic RSI to deliver a refined, multidimensional view of market momentum and overbought/oversold conditions.
Unlike traditional oscillators that rely on a single formula, the HSI averages four distinct momentum perspectives — price velocity, directional conviction, volume participation, and stochastic behavior — offering traders a more balanced and noise-resistant reading of market strength.
 ⚙️ Calculation Logic: 
The Hyper Strength Index is computed as the normalized average of:
 
 📈 RSI — classic measure of relative momentum.
 💪 CMO — captures directional bias and intensity of moves.
 💵 MFI — integrates volume and money flow pressure.
 🔄 Stochastic RSI (K-line) — identifies momentum extremes and short-term turning points.
 
This fusion creates a smoother, more comprehensive signal, mitigating the weaknesses of any single oscillator.
 🎯 Interpretation: 
Overbought Zone (Default: > 75):
Indicates potential exhaustion of bullish momentum — a cooling phase or reversal may follow.
Oversold Zone (Default: < 7):
Suggests bearish exhaustion — a rebound or accumulation phase may emerge.
Neutral Zone (Between 7 and 75):
Represents balanced market conditions or trend continuation phases.
Visual cues highlight key conditions:
🔺 Red Highlights — Overbought regions or downward inflection points.
🔻 Green Highlights — Oversold regions or upward inflection points.
Neutral zones are shaded with subtle gray backgrounds for clarity.
 💡 Key Features: 
🔹 Multi-factor strength analysis (RSI + CMO + MFI + StochRSI).
🔹 Adaptive overbought/oversold detection.
🔹 Visual alerts via colored backgrounds and bar markers.
🔹 Customizable smoothing and length parameters for fine-tuning sensitivity.
🔹 Intuitive visualization ideal for both short-term scalping and swing trading setups.
🧭 Usage Notes:
Works best as a momentum confirmation tool — pair with trend filters like EMA, SuperTrend, or ADX.
In trending markets, use crossovers from extreme zones as potential continuation or exhaustion signals.
In ranging markets, exploit overbought/oversold reversals for high-probability mean reversion trades.
📘 Summary:
The Hyper Strength Index | QuantLapse distills multiple dimensions of market strength into a single, cohesive oscillator. By merging price, volume, and directional momentum, it provides traders with a more robust, responsive, and context-aware perspective on market dynamics — a next-generation evolution beyond the limitations of RSI or CMO alone.
Relative Performance Tracker [QuantAlgo]🟢 Overview 
The  Relative Performance Tracker  is a multi-asset comparison tool designed to monitor and rank up to 30 different tickers simultaneously based on their relative price performance. This indicator enables traders and investors to quickly identify market leaders and laggards across their watchlist, facilitating rotation strategies, strength-based trading decisions, and cross-asset momentum analysis.
  
 🟢 Key Features 
 1. Multi-Asset Monitoring 
 
 Track up to 30 tickers across any market (stocks, crypto, forex, commodities, indices)
  
 Individual enable/disable toggles for each ticker to customize your watchlist
  
 Universal compatibility with any TradingView symbol format (EXCHANGE:TICKER)
 
 2. Ranking Tables (Up to 3 Tables) 
  
 
 Each ticker's percentage change over your chosen lookback period, calculated as:
 (Current Price - Past Price) / Past Price × 100 
 Automatic sorting from strongest to weakest performers 
  
 Rank: Position from 1-30 (1 = strongest performer)
 Ticker: Symbol name with color-coded background (green for gains, red for losses)
 % Change: Exact percentage with color intensity matching magnitude
  For example, Rank #1 has the highest gain among all enabled tickers, Rank #30 has the lowest (or most negative) return.
 
 3. Histogram Visualization 
  
 
 Adjustable bar count: Display anywhere from 1 to 30 top-ranked tickers (user customizable)
 Bar height = magnitude of percentage change.
 Bars extend upward for gains, downward for losses. Taller bars = larger moves.
 Green bars for positive returns, red for negative returns.
 
 4. Customizable Color Schemes 
 
 Classic: Traditional green/red for intuitive interpretation
  
 Aqua: Blue/orange combination for reduced eye strain
  
 Cosmic: Vibrant aqua/purple optimized for dark mode
  
 Custom: Full personalization of positive and negative colors
  
 
 5. Built-In Ranking Alerts 
Six alert conditions detect when rankings change:
 
 Top 1 Changed: New #1 leader emerges
 Top 3/5/10/15/20 Changed: Shifts within those tiers
  
 
 🟢 Practical Applications 
 → Momentum Trading:  Focus on top-ranked assets (Rank 1-10) that show strongest relative strength for trend-following strategies
 → Market Breadth Analysis:  Monitor how many tickers are above vs. below zero on the histogram to gauge overall market health
 → Divergence Spotting:  Identify when previously leading assets lose momentum (drop out of top ranks) as potential trend reversal signals
 → Multi-Timeframe Analysis:  Use different lookback periods on different charts to align short-term and long-term relative strength
 → Customized Focus:  Adjust histogram bars to show only top 5-10 strongest movers for concentrated analysis, or expand to 20-30 for comprehensive overview
VBE Pro - Advanced Volatility Bands with Zero Lag & PredictionVBE Pro: Zero-Lag Predictive Bands
A next-gen volatility envelope that blends zero-lag smoothing with forward-looking volatility models (EWMA/GARCH/HAR/ML) to keep bands tight in calm markets, responsive in shocks, and adaptive across regimes.
What it does
Builds volatility from multiple methods (ATR, StDev, Parkinson, Garman-Klass, Rogers-Satchell, Yang-Zhang).
Projects near-term vol with your choice of predictor, then blends it via a weight slider.
Applies zero-lag smoothing (ZLEMA/ZLMA/DEMA/TEMA/HMA/JMA/Ehlers/Kalman/T3) to cut delay without over-shoot.
Auto-adapts band width by regime (high/low/normal) and can expand dynamically with price acceleration.
Optional displacement to align with your execution style.
On-chart
Upper/Lower zero-lag bands with optional fill.
Middle line (ZL-smoothed source).
Regime-tinted background (High/Low).
Displacement marker (if used).
Compact top-right info table: current vs predicted vol, regime, squeeze, multiplier, methods, ZL gain, est. lag reduction.
Signals & Alerts
Break↑ / Break↓ when price crosses the bands.
Vol↑ / Vol↓ expansion/contraction sequences.
“Squeeze” when band width compresses vs its ZL average.
“ZL” marker when significant zero-lag is active.
Prediction divergence ⚠ when projected vol deviates > threshold.
Built-in alertconditions for all of the above.
Quick start
Method: ATR or Hybrid for robustness.
Smoothing: ZLEMA, length 5–8, ZL gain 2–3 (push higher only if you accept more projection).
Bands: Multiplier 2.0, Adaptive on, Dynamic off to start.
Prediction: EWMA, weight 0.25–0.35. Move to GARCH in mean-reverty tapes; HAR-RV for mixed regimes.
Regime lookback: 50.
PulseRPO Zero-Lag BandsPulseRPO is a momentum and volatility timing suite built on a zero-lag Relative Price Oscillator. It pairs an RPO (fast vs slow MA spread, in %) with adaptive volatility envelopes that tighten or widen as conditions change, so you can spot true momentum bursts, exhaustion and “quiet-before-the-move” squeezes—without the usual MA lag.
What it shows
Zero-Lag RPO: Choose EMA, SMA, WMA, RMA, HMA or ZLEMA for the base, then apply ZLEMA/DEMA/TEMA/HMA zero-lag smoothing to cut delay.
Adaptive Bands: StdDev, ATR, Range or Hybrid volatility; bands auto-tighten in high vol and widen in quiet regimes.
Dynamic OB/OS: Levels scale with current regime so extremes mean something even as volatility shifts.
Signal & Histogram: Classic signal cross plus histogram for quick read of acceleration vs deceleration.
Squeeze Paint: Subtle background highlight when band width compresses below its average.
Divergences & Triggers: Optional bullish/bearish divergence tags, plus band-cross and signal-cross alerts out of the box.
How to use it (general guide)
Momentum entries: Look for RPO crossing up its signal from below or snapping out of a squeeze; extra weight if it also re-enters from below the lower band.
Trend continuation: RPO riding outside the upper (or lower) band with rising histogram = power move; trail risk on pullbacks to the signal line.
Exhaustion / fades: Taps beyond dynamic OB/OS or band re-entries can mark mean-revert windows—confirm with price/volume.
Risk filter: During squeeze, size down and prepare for expansion; after expansion, respect extremes.
Tweak the MA type, band method and zero-lag strength to match your timeframe. PulseRPO is designed to be a self-contained read: regime → setup → trigger → alert.
Inside SwingsOverview 
The Inside Swings indicator identifies and visualizes "inside swing" patterns in price action. These patterns occur when price creates a series of pivots that form overlapping ranges, indicating potential consolidation or reversal zones.
 What are Inside Swings? 
Inside swings are specific pivot patterns where:
- HLHL Pattern: High-Low-High-Low sequence where the first high is higher than the second high, and the first low is lower than the second low
- LHLH Pattern: Low-High-Low-High sequence where the first low is lower than the second low, and the first high is higher than the second high
 Here an Example 
  
These patterns create overlapping price ranges that often act as:
- Support/Resistance zones
- Consolidation areas
- Potential reversal points
- Breakout levels
 Levels From the Created Range 
  
 Input Parameters 
 Core Settings 
- Pivot Lookback Length (default: 5): Number of bars on each side to confirm a pivot high/low
- Max Boxes (default: 100): Maximum number of patterns to display on chart
 Extension Settings 
- Extend Lines: Enable/disable line extensions - this extends the Extremes of the Swings to where a new Swing Started or Extended Right for the Latest Inside Swings
- Show High 1 Line: Display first high/low extension line
- Show High 2 Line: Display second high/low extension line  
- Show Low 1 Line: Display first low/high extension line
- Show Low 2 Line: Display second low/high extension line
 Visual Customization 
Box Colors
- HLHL Box Color: Color for HLHL pattern boxes (default: green)
- HLHL Border Color: Border color for HLHL boxes
- LHLH Box Color: Color for LHLH pattern boxes (default: red)
- LHLH Border Color: Border color for LHLH boxes
 Line Colors 
- HLHL Line Color: Extension line color for HLHL patterns
- LHLH Line Color: Extension line color for LHLH patterns
- Line Width: Thickness of extension lines (1-5)
 Pattern Detection Logic 
 HLHL Pattern (Bullish Inside Swing) 
Condition: High1 > High2 AND Low1 < Low2
Sequence: High → Low → High → Low
Visual: Two overlapping boxes with first range encompassing second
Detection Criteria:
1. Last 4 pivots form High-Low-High-Low sequence
2. Fourth pivot (first high) > Second pivot (second high)
3. Third pivot (first low) < Last pivot (second low)
 LHLH Pattern (Bearish Inside Swing) 
Condition: Low1 < Low2 AND High1 > High2  
Sequence: Low → High → Low → High
Visual: Two overlapping boxes with first range encompassing second
Detection Criteria:
1. Last 4 pivots form Low-High-Low-High sequence
2. Fourth pivot (first low) < Second pivot (second low)
3. Third pivot (first high) > Last pivot (second high)
 Visual Elements 
Boxes
- Box 1: Spans from first pivot to last pivot (larger range)
- Box 2: Spans from third pivot to last pivot (smaller range)
- Overlap: The intersection of both boxes represents the inside swing zone
 Extension Lines 
- High 1 Line: Horizontal line at first high/low level
- High 2 Line: Horizontal line at second high/low level
- Low 1 Line: Horizontal line at first low/high level
- Low 2 Line: Horizontal line at second low/high level
 Line Extension Behavior 
- Historical Patterns: Lines extend until the next pattern starts
- Latest Pattern: Lines extend to the right edge of chart
- Dynamic Updates: All lines are redrawn on each bar for accuracy
 Trading Applications 
Support/Resistance Levels
Inside swing levels often act as:
- Dynamic support/resistance
- Breakout confirmation levels
- Reversal entry points
Pattern Interpretation
- HLHL Patterns: Potential bullish continuation or reversal
- LHLH Patterns: Potential bearish continuation or reversal
- Overlap Zone: Key area for price interaction
Entry Strategies
1. Breakout Strategy: Enter on break above/below inside swing levels
2. Reversal Strategy: Enter on bounce from inside swing levels
3. Range Trading: Trade between inside swing levels
 Technical Implementation 
Data Structures
type InsideSwing
    int startBar        // First pivot bar
    int endBar          // Last pivot bar  
    string patternType  // "HLHL" or "LHLH"
    float high1         // First high/low
    float low1          // First low/high
    float high2         // Second high/low
    float low2          // Second low/high
    box box1            // First box
    box box2            // Second box
    line high1Line      // High 1 extension line
    line high2Line      // High 2 extension line
    line low1Line       // Low 1 extension line
    line low2Line       // Low 2 extension line
    bool isLatest       // Latest pattern flag
 Memory Management 
- Pattern Storage: Array-based storage with automatic cleanup
- Pivot Tracking: Maintains last 4 pivots for pattern detection
- Resource Cleanup: Automatically removes oldest patterns when limit exceeded
 Performance Optimization 
- Duplicate Prevention: Checks for existing patterns before creation
- Efficient Redraw: Only redraws lines when necessary
- Memory Limits: Configurable maximum pattern count
 Usage Tips 
 Best Practices 
1. Combine with Volume: Use volume confirmation for breakouts
2. Multiple Timeframes: Check higher timeframes for context
3. Risk Management: Set stops beyond inside swing levels
4. Pattern Validation: Wait for confirmation before entering
 Common Scenarios 
- Consolidation Breakouts: Inside swings often precede significant moves
- Reversal Zones: Failed breakouts at inside swing levels
- Trend Continuation: Inside swings in trending markets
 Limitations 
- Lagging Indicator: Patterns form after completion
- False Signals: Not all inside swings lead to significant moves
- Market Dependent: Effectiveness varies by market conditions
 Customization Options 
 Visual Adjustments 
- Modify colors for different market conditions
- Adjust line widths for visibility
- Enable/disable specific elements
 Detection Sensitivity 
- Increase pivot length for smoother patterns
- Decrease for more sensitive detection
- Balance between noise and signal
 Display Management 
- Control maximum pattern count
- Adjust cleanup frequency
- Manage memory usage
 Conclusion 
The Inside Swings indicator provides a systematic approach to identifying consolidation and potential reversal zones in price action. By visualizing overlapping pivot ranges
The indicator's strength lies in its ability to:
- Identify key price levels automatically
- Provide visual context for market structure
- Offer flexible customization options
- Maintain performance through efficient memory management
Torus Trend Bands — Windowed HammingTorus Trend Bands — Windowed Hamming 
This TradingView indicator creates dynamic support and resistance bands on your chart. It uses the mathematical model of a torus (a donut shape) to generate cyclical and responsive channel boundaries. The bands are further refined with an advanced smoothing method called a Hamming window to reduce noise and provide a clearer signal.
 How It Works 
 
 The Torus Model:  The indicator maps price action onto a geometric torus shape. This is defined by two key parameters:
 Major Radius (a):  The distance from the center of the torus to the center of the tube. This controls the overall size and primary cycle.
 Minor Radius (b):  The radius of the tube itself. This controls the secondary, faster "breathing" motion of the bands.
 Dual-Phase Engine:  The behavior of the bands is driven by two different cyclical inputs, or "phases":
 Major Rotation (φ):  A slow, time-based cycle (φ period) that governs the long-term oscillation of the bands.
 Minor Rotation (q):  A fast, momentum-based cycle derived from the Relative Strength Index (RSI). This makes the bands react quickly to price momentum, expanding and contracting as the market becomes overbought or oversold.
 Standard Technical Core : The torus model is anchored to the price chart using standard indicators:
 Midline : A central moving average that acts as the baseline for the channel. You can choose from EMA, SMA, HMA, or VWAP.
 Width Source:  A volatility measure that determines the fundamental width of the bands. You can choose between the Average True Range (ATR) or Standard Deviation.
 Hamming Window Smoothing:  This is a sophisticated weighted averaging technique (a Finite Impulse Response filter) used in digital signal processing. It provides exceptionally smooth results with less lag than traditional moving averages. You can apply this smoothing to the RSI, the midline, and the width source independently to filter out market noise.
 
 How to Interpret and Use the Indicator
 
 Dynamic Support & Resistance:  The primary use is to identify potential reversal or continuation points. The upper band acts as dynamic resistance, and the lower band acts as dynamic support.
 Trend Identification:  The color of the bands helps you quickly see the current trend. Teal bands indicate an uptrend (the midline is rising), while red bands indicate a downtrend (the midline is falling).
 Volatility Gauge:  When the bands widen, it signals an increase in market volatility. When they contract, it suggests volatility is decreasing.
 Alerts:  The indicator includes built-in alerts that can notify you when the price touches or breaks through the upper or lower bands, helping you stay on top of key price action.
 
 Key Settings
 
 
 Torus Parameters : Adjust Major radius a and Minor radius b to change the shape and cyclical behavior of the bands.
 Phase Controls: 
 φ period:  Controls the length of the main, slow cycle in bars.
 RSI length → q:  Sets the lookback for the RSI that drives the momentum-based cycle.
 Midline & Width:  Choose the type and length for the central moving average and the volatility source (ATR/StDev) that best fits your trading style.
 
 Width & Bias Shaping:
 
 Min/Max width ×:  Control how much the bands expand and contract.
 Bias ×: Shifts the entire  channel up or down based on RSI momentum, helping the bands better capture strong trends.
 Hamming Controls:  Enable or disable the advanced smoothing on different parts of the indicator and set the Hamming length (a longer length results in more smoothing).
 
This indicator provides a unique and highly customizable way to visualize market cycles, volatility, and trend, combining geometry with proven technical analysis tools.
Triple Stochastic RSITriple Stochastic RSI (TSRSI)
The  Triple Stochastic RSI  is a momentum visualization tool designed to help identify potential market tops and bottoms with greater clarity. This indicator stacks three layers of smoothed StochRSI —  Fast ,  Slow , and  Slowest  — each derived from increasingly longer RSI and Stochastic periods.
By analyzing how these layers interact, especially when the  Slow  (purple) and  Slowest  (orange) lines converge or cross near  overbought  or  oversold  zones, traders can spot high-probability reversal points. These moments often precede price turning points, and the signals gain strength when confirmed by  divergences  between price and indicator movement.
Key features include:
 
 Triple StochRSI smoothing to capture short- to long-term momentum shifts.
 Dynamic overbought/oversold signals with visual cross markers.
 Built-in trend sentiment and average streak statistics.
 Alerts for crossovers, trend shifts, and extended over/underperformance streaks.
 
 
Use it as a standalone momentum framework or as a supporting layer for divergence detection and market exhaustion analysis.
The stats table in your script provides insight into how long each Stochastic line (%K) typically stays above or below the 50 midline, and how the current streak compares to that average.
1. "Current" Column
This shows how many consecutive bars the %K has been:
Above 50 (▲)
OR Below 50 (▼)
It updates in real time on the last bar.
2. "Avg ▲ / Avg ▼" Column
These are historical averages based on your lookbackPeriod (default 1000 bars). It shows:
The average length of time %K stays above 50 (bullish bias)
The average time it stays below 50 (bearish bias)
Example Breakdown:
Let’s say the "Slow" row shows:
Current: 7 ▼
Avg ▲ / Avg ▼: 6 / 5
This means:
%K on the Slow lane has been below 50 for 7 bars
Historically, it only stays below 50 for about 5 bars on average
So, this bearish streak is already longer than usual
How to Use This Information:
A longer-than-average streak could imply a maturing move, potentially near exhaustion.
If current ▲ or ▼ streak is nearing or exceeding its average, it may warn of an upcoming shift.
Good for contextualizing trends and avoiding late entries.
Real Time UVXY Spike Level TrackerKey Features 
 Real Time All-Time Low Tracking: Continuously updates the ATL using daily timeframe data.
 Multiple Spike Levels: Displays +20%, +50%, +75%, and +100% levels above the ATL.
 Real-Time Spike Percentage: Shows current distance from ATL in an easy-to-read table.
 Understanding the Chart Lines 
 Red Line (ATL): The all-time low baseline. This is your reference point for measuring volatility spikes.
 Yellow Line (+20%): First level of moderate volatility increase. Minor market stress or routine volatility expansion.
 Blue Line (+50%): Significant volatility event. Indicates elevated market concern or technical dislocation.
 Purple Line (+75%): Major volatility spike. Typically coincides with substantial market selloffs or uncertainty.
 Fuchsia Line (+100%): Extreme volatility event. Rare occurrences associated with market crashes, black swan events, or severe panic.
 The Data Table Displays: Current Spike %: Real-time percentage showing how far price is above the ATL (highlighted in green)
 Level Column: Each spike threshold level
 Price Column: Exact price at each level for quick reference
 Understanding UVXY spike levels is valuable for several reasons:
 Market Timing & Entry/Exit Points UVXY typically experiences extreme spikes during market panics or crashes. Knowing historical spike levels helps you:
 Identify extreme fear levels - When UVXY hits unusually high levels, it often signals peak panic and potential market bottoms
 Avoid chasing volatility - Understanding what constitutes an "extreme" spike prevents buying in after the move is already exhausted Mean Reversion Trading 
UVXY has a strong tendency to decay over time due to its leveraged structure and the contango in VIX futures. Spike levels matter because:
 High probability reversals - When UVXY reaches extreme levels (say 2-3x normal), there's historically been a high probability of reversion
 Risk/reward assessment - You can better evaluate whether a short position or volatility-selling strategy makes sense Leveraged ETF enthusiasts and volatility traders often use specific spike percentages as triggers to open short positions. For example, some traders might short when UVXY spikes 5-50%+ in a week or reaches certain percentage thresholds, betting on the inevitable decay back down
HermesHERMES STRATEGY - TRADINGVIEW DESCRIPTION
 OVERVIEW 
Hermes is an adaptive trend-following strategy that uses dual ALMA (Arnaud Legoux Moving Average) filters to identify high-quality entry and exit points. It's designed for swing and position traders who want smooth, low-lag signals with minimal whipsaws.
Unlike traditional moving averages that operate on price, Hermes analyzes price returns (percentage changes) to create signals that work consistently across any asset class and price range.
 HOW IT WORKS 
DUAL ALMA SYSTEM
The strategy uses two ALMA lines applied to price returns:
• Fast ALMA (Blue Line): Short-term trend signal (default: 80 periods)
• Slow ALMA (Black Line): Long-term baseline trend (default: 250 periods)
ALMA is superior to simple or exponential moving averages because it provides:
• Smoother curves with less noise
• Significantly reduced lag
• Natural resistance to outliers and flash crashes
 TRADING LOGIC 
BUY SIGNAL:
• Fast ALMA crosses above Slow ALMA (bullish regime)
• Price makes new N-bar high (momentum confirmation)
• Optional: Price above 200 EMA (macro trend filter)
• Optional: ALMA lines sufficiently separated (strength filter)
SELL SIGNAL:
• Fast ALMA crosses below Slow ALMA (bearish regime)
• Optional: Price makes new N-bar low (momentum confirmation)
The strategy stays in position during the entire bullish regime, allowing you to ride trends for weeks or months.
 VISUAL INDICATORS 
LINES:
• Blue Line: Fast ALMA (short-term signal)
• Black Line: Slow ALMA (long-term baseline)
TRADE MARKERS:
• Green Triangle Up: Buy executed
• Red Triangle Down: Sell executed
• Orange "M": Buy blocked by momentum filter
• Purple "W": Buy blocked by weak crossover strength
KEY PARAMETERS
ALMA SETTINGS:
• Short Period (default: 30) - Fast signal responsiveness
• Long Period (default: 250) - Baseline stability
• ALMA Offset (default: 0.90) - Balance between lag and smoothness
• ALMA Sigma (default: 7.5) - Gaussian curve width
ENTRY/EXIT FILTERS:
• Buy Lookback (default: 7) - Bars for momentum confirmation (required)
• Sell Lookback (default: 0) - Exit momentum bars (0 = disabled for faster exits)
• Min Crossover Strength (default: 0.0) - Required ALMA separation (0 = disabled)
• Use Macro Filter (default: true) - Only enter above 200 EMA
BEST PRACTICES
RECOMMENDED ASSETS - Works well on:
• Cryptocurrencies (Bitcoin, Ethereum, etc.)
• Major indices (S&P 500, Nasdaq)
• Large-cap stocks
• Commodities (Gold, Oil)
RECOMMENDED TIMEFRAMES:
• Daily: Primary timeframe for swing trading
• 4-Hour: More active trading (increase trade frequency)
• Weekly: Long-term position trading
PARAMETER TUNING:
• More trades: Lower Short Period (60-80)
• Fewer trades: Raise Short Period (100-120)
• Faster exits: Set Sell Lookback = 0
• Safer entries: Enable Macro Filter (Use Macro Filter = true)
STRATEGY ADVANTAGES
1. Low Lag - ALMA provides faster signals than traditional moving averages
2. Smooth Signals - Minimal whipsaws compared to crossover strategies
3. Asset Agnostic - Same parameters work across different markets
4. Trend Capture - Stays positioned during entire bullish regimes
5. Risk Management - Multiple filters prevent poor entries
6. Visual Clarity - Easy to interpret regime and filter states
WHEN TO USE HERMES
BEST FOR:
• Trending markets (crypto bull runs, equity uptrends)
• Swing trading (hold days to weeks)
• Position trading (hold weeks to months)
• Clear trend identification
• Risk-managed exposure
NOT SUITABLE FOR:
• Ranging/sideways markets
• Scalping or day trading
• High-frequency trading
• Mean reversion strategies
RISK DISCLAIMER
This indicator is for educational purposes only. Past performance does not guarantee future results. Always use proper position sizing and risk management. Test thoroughly on historical data before live trading.
CREDITS
Inspired by Giovanni Santostasi's Power Law Volatility Indicator, generalized for universal application across all assets using adaptive ALMA filtering.
Strategy by Hermes Trading Systems
QUICK START
1. Add indicator to chart
2. Use on daily timeframe for best results
3. Look for green buy signals when blue line crosses above black line
4. Exit on red sell signals when blue line crosses below black line
5. Adjust parameters based on your trading style:
   • Conservative: Enable Macro Filter, increase Buy Lookback to 10
   • Aggressive: Disable Macro Filter, lower Short Period to 60
   • Default settings work well for most assets
Volume Profile Pro
Volume Profile Pro is an advanced market analysis tool that displays trading activity distribution across price levels. It identifies key market structure levels including Point of Control (POC), Value Area High (VAH), and Value Area Low (VAL) based on actual volume data.
ORIGINALITY & VALUE:
This indicator provides unique volume distribution analysis with intelligent timeframe detection, real-time profile development, and professional visualization. Unlike basic volume indicators, it calculates precise volume distribution across price levels and identifies high-volume nodes that act as dynamic support/resistance zones.
KEY FEATURES:
Smart Timeframe Detection - Automatically uses chart timeframe with manual override option
Value Area Calculation - Customizable percentage (68% recommended for standard deviation)
Real-time Profile Updates - Live developing profile during active trading sessions
Session Awareness - Adjusts for regular vs extended trading hours
Professional Visualization - Clean, customizable display with multiple placement options
Advanced Alert System - POC breach detection with multiple extension options
CORE COMPONENTS:
Point of Control (POC) - Price level with highest traded volume (market consensus price)
Value Area (VA) - Price range containing specified percentage of total volume
Value Area High (VAH) - Upper boundary of value area (Orange)
Value Area Low (VAL) - Lower boundary of value area (Bright Blue)
Volume Distribution - Visual histogram showing volume concentration at price levels
TRADING APPLICATIONS:
Dynamic Support/Resistance - POC and Value Area act as evolving S/R levels
Breakout Confirmation - Volume-backed breakouts from Value Area
Mean Reversion - Trading opportunities at Value Area boundaries
Market Structure - Understanding volume distribution and market acceptance
Risk Management - Using Value Area for strategic stop placement
SETUP INSTRUCTIONS:
Timeframe: Uses current chart timeframe by default (customizable in settings)
Value Area: Set to 68% for standard market profile or adjust based on volatility
Profile Placement: Choose Left for historical analysis or Right for current session
Alerts: Enable POC breach alerts for real-time trading signals
Visualization: Customize colors and widths to match your trading style
This indicator provides institutional-grade market structure analysis in an accessible format, helping traders identify high-probability trading zones based on actual volume data rather than just price action.
Golden Cross 50/200Simplicity characterizes each of my trading systems and methods. On this occasion, I present a trend-following strategy with simple rules and high profitability.
 System Rules: 
-Long entries when the 50 EMA crosses above the 200 EMA.
-Stop Loss (SL) placed at the low of 15 candles prior to the entry candle.
-Take Profit (TP) triggered when the 50 EMA crosses below the 200 EMA.
As with any trend-following system, we sacrifice win rate for profitability, and of course, we will focus on traditional markets with a consistent trend-following nature over time.
 Recommended Markets and Timeframes: 
 BTCUSDT H6 
August 17, 2017 - October 20, 2025  Total trades: 30  
Profitability: +1,682.99%  
Win rate: 40%  
Outperforms Buy & Hold
 BTCUSDT H4 
August 17, 2017 - October 20, 2025  Total trades: 42  
Profitability: +12,213.49% (high and stable performance curve)  
Win rate: 40%  
Outperforms Buy & Hold
 BTCUSDT H2 
August 17, 2017 - October 20, 2025  Total trades: 95  
Profitability: +2,363.80%  
Win rate: 24.21%  
Matches Buy & Hold
 BTCUSDT H1 
August 17, 2017 - October 20, 2025  Total trades: 203  
Profitability: +1,045% (stable performance curve)  
Win rate: 25.62%
 
BTCUSDT 30M 
August 17, 2017 - October 20, 2025  Total trades: 393  
Profitability: +4,205.51% (high and stable performance curve)  
Win rate: 27.74%  
Outperforms Buy & Hold
 BTCUSDT 15M 
August 17, 2017 - October 20, 2025  Total trades: 821  
Profitability: +1,311.97%  
Win rate: 23.14%
Timeframes such as Daily, 12-hour, 8-hour, and even 5-minute charts are profitable with this system, so feel free to experiment.
Other markets and timeframes to observe include:  
-XAUUSD (H1, H4, H6, H8, Daily)  
-SPX (Daily: +21,302% profitability since 1871 in 40 trades)  
-Tesla (H1, H2, H4, H6, especially M30 and M15)  
-Apple (M5, M15, M30, H1, H2, H4…)  
-Warner Bros (M5, M15, M30…)  
-GOOGL (M5, M15, M30, H1, H2, H4, H6…)  
-AMZN (M5, M15, M30, H2, H4, H6…)  
-META (M5, M15, M30, H1, H2, H4…)  
-NVDA (M5, M15, M30, H1, H2, H4…)
This system not only generates significant profitability but also performs very well in traditional markets, even on lower timeframes like 5-minute charts. In many cases, the returns far exceed Buy & Hold.
I hope this strategy is useful to you. Follow my Spanish-speaking profile if you want to see my market analyses, and send me your good vibes!
testLibLibrary   "testLib" 
TODO: add library description here
 mySMA(x) 
  TODO: add function description here
  Parameters:
     x (int) : TODO: add parameter x description here
  Returns: TODO: add what function returns
livremySMATestLibLibrary   "livremySMATestLib" 
TODO: add library description here
 mySMA(x) 
  TODO: add function description here
  Parameters:
     x (int) : TODO: add parameter x description here
  Returns: TODO: add what function returns
Smart Money Dynamics Blocks — Pearson MatrixSmart Money Dynamics Blocks — Pearson Matrix 
A structural fusion of Prime Number Theory, Pearson Correlation, and Cumulative Delta Geometry.
 1. Mathematical Foundation 
This indicator is built on the intersection of Prime Number Theory and the Pearson correlation coefficient, creating a structural framework that quantifies how price and time evolve together.
Prime numbers — unique, indivisible, and irregular — are used here as nonlinear time intervals. Each prime length (2, 3, 5, 7, 11…97) represents a regression horizon where correlation is measured between price and time. The result is a multi-scale correlation lattice — a geometric matrix that captures hidden directional strength and temporal bias beyond traditional moving averages.
 2. The Pearson Matrix Logic 
For every prime interval p, the indicator calculates the linear correlation:
 r_p = corr(price, bar_index, p) 
Each r_p reflects how closely price and time move together across a prime-defined window. All r_p values are then averaged to create avgR, a single adaptive coefficient summarizing overall structural coherence.
 - When avgR > 0.8 → strong positive correlation (labeled R+).
- When avgR < -0.8 → strong negative correlation (labeled R−). 
This approach gives a mathematically grounded definition of trend — one that isn’t based on pattern recognition, but on measurable correlation strength.
 3. Sequential Prime Slope and Median Pivot 
Using the ordered sequence of 25 prime intervals, the model computes sequential slopes between adjacent primes. These slopes represent the rate of change of structure between two prime scales. A robust median aggregator smooths the slopes, producing a clean, stable directional vector.
The system anchors this slope to the 41-bar pivot — the median of the first 25 primes — serving as the geometric midpoint of the prime lattice. The resulting yellow line on the chart is not an ordinary regression line; it’s a dynamic prime-slope function, adapting continuously with correlation feedback.
 4. Regression-Style Parallel Bands 
Around this prime-slope line, the indicator constructs parallel bands using standard deviation envelopes — conceptually similar to a regression channel but recalculated through the prime–Pearson matrix.
These bands adjust dynamically to:
 - Volatility, via standard deviation of residuals.
- Correlation strength, via avgR sign weighting. 
Together, they visualize statistical deviation geometry, making it easier to observe symmetry, expansion, and contraction phases of price structure.
 5. Volume and Cumulative Delta Peaks 
Below the geometric layer, the indicator incorporates a custom lower-timeframe volume feed — by default using 15-second data  (custom_tf_input_volume = “15S”).  This allows precise delta computation between up-volume and down-volume even on higher timeframe charts.
From this feed, the indicator accumulates delta over a configurable period (default: 100 bars). When cumulative delta reaches a local maximum or minimum, peak and trough markers appear, showing the precise bar where buying or selling pressure statistically peaked.
This combination of geometry and order flow reveals the intersection of market structure and energy — where liquidity pressure expresses itself through mathematical form.
 6. Chart Interpretation 
The primary chart view represents the live execution of the indicator. It displays the relationship between structural correlation and volume behavior in real time.
Orange “R+” and blue “R−” labels indicate regions of strong positive or negative Pearson correlation across the prime matrix. The yellow median prime-slope line serves as the structural backbone of the indicator, while green and red parallel bands act as dynamic regression boundaries derived from the underlying correlation strength. Peaks and troughs in cumulative delta — displayed as numerical annotations — mark statistically significant shifts in buying and selling pressure.
  
The secondary visualization (Prime Regression Concept) expands on this by illustrating how regression behavior evolves across prime intervals. Each colored regression fan corresponds to a prime number window (2, 3, 5, 7, …, 97), demonstrating how multiple regression lines would appear if drawn independently. The indicator integrates these into one unified geometric model — eliminating the need to plot tens of regression lines manually. It’s a conceptual tool to help visualize the internal logic: the synthesis of many small-scale regressions into a single coherent structure.
 7. Interpretive Insight 
This model is not a prediction tool; it’s an instrument of mathematical observation. By translating price dynamics into a prime-structured correlation space, it reveals how coherence unfolds through time — not as a forecast, but as a measurable evolution of structure.
It unifies three analytical domains:
 - Prime distribution — defines a nonlinear temporal architecture.
- Pearson correlation — quantifies statistical cohesion.
- Cumulative delta — expresses behavioral imbalance in order flow. 
The synthesis creates a geometric analysis of liquidity and time — where structure meets energy, and where the invisible rhythm of market flow becomes measurable.
 8. Contribution & Feedback 
Share your observations in the comments:
 - The time gap and alternation between R+ and R− clusters.
- How different timeframes change delta sensitivity or reveal compression/expansion.
- Prime intervals/clusters that tend to sit near turning points or liquidity shifts.
- How avgR behaves across assets or regimes (trending, ranging, high-vol).
- Notable interactions with the parallel bands (touches, breaks, mean-revert). 
Your field notes help others read the model more effectively and compare contexts.
 Summary
 - Primes define the structure.
- Pearson quantifies coherence.
- Slope median stabilizes geometry.
- Regression bands visualize deviation.
- Cumulative delta locates imbalance.
 Together, they construct a framework where mathematics meets market behavior. 
ORBs, EMAs, SMAs, AVWAPThis is an update to a previously published script. In short the difference is the added capability to adjust the length of EMAs. Also added 3 customizable SMAs. Enjoy! Let me know what you think of the script please. This is only second one I have ever done. Through practice and people like @LuxAlgo and other Pinescripters this isn't possible. Tedious hrs with ChatGPT to correct nuances, who doesnt seem to learn from (insert pronoun) mistakes
This all-in-one indicator combines key institutional tools into a unified framework for intraday and swing trading. Designed for traders who use multi-session analysis and dynamic levels, it automatically maps out global session breakouts, moving averages, and volume-weighted anchors with high clarity.
Features include:
🕓 Tokyo, London, and New York ORBs (Opening Range Breakouts) — 30-minute configurable range boxes that persist until the next New York open.
📈 Anchored VWAP with Standard Deviation Bands — dynamically anchorable to session, week, or month for institutional-grade price tracking.
📊 Exponential Moving Averages (9, 20, 113, 200) — for short-, mid-, and long-term momentum structure.
📉 Simple Moving Averages (20, 50, 100) — fully customizable lengths, colors, and visibility toggles for trend confirmation.
🏁 Prior High/Low Levels (PDH/PDL, PWH/PWL, PMH/PML) — automatically plotted from previous day, week, and month, with labels placed at each session’s midpoint.
🎛️ Session-Aligned Time Logic — all time calculations use New York session anchors with DST awareness.
💡 Clean Visualization Options — every component can be toggled on/off, recolored, or customized for your workflow.
Best used for:
ORB break-and-retest setups
VWAP and EMA rejections
Confluence-based trading around key session levels
Multi-session momentum tracking
Key Levels (PA, MAs, VWAPs, Volume Profile, rVWAPs)This indicator marks all kinds of key levels so that users can keep an overview of their specified levels in a convenient non chart cluttering way. It can highlight levels of confluence or display each level seperately.
The indicator includes markers for the following levels:
Price Action: Opens, Previous High/Low, Monday Range
Moving Averages: H4, D1 and W1 with customisable lengths
VWAPs: Developing and Previous VWAPs with their respective VAL/VAH (1 Standard Deviation)
Rolling VWAPs
Volume Profile: Developing and Previous VAL/VAH/POC
 What makes this indicator different is its vast customisation options and big library of levels… 
… users can choose to merge all levels that are aligned in a specified % threshold and additionally they can choose to color them the same color to highlight confluence levels.
… users have the choice between Full Label Markers or Abbreviations of those Labels.
… users have the choice of a few presets making level switching fast and convenient (Price Action, Volume Profile, VWAP, Volume or Custom).
… users can specify if they prefer to highlight Simple Moving Averages or Exponential Moving Averages. They have calculations available on three different timeframes and can change the lengths of each.
… users can color all levels the same with one click instead of having to manually change all of them.
… when users choose Volume Profile Levels they can either let the script auto calculate the row size making asset switching simple or they can manually input row size.
With the custom preset users can show and hide whichever levels they want.
(To have them the same every time you freshly load the indicator save your settings as default in the lower left corner of the settings tab).
 Purpose 
This indicator is designed to serve as a level visualisation tool that has the ability to highlight levels of confluence. It may assist in keeping an overview of where all levels are currently located but does not produce signals or trade recommendations.
ICT HTF Volume Candles (Based on HTF Candles by Fadi)# ICT HTF Volume Candles - Multi-Timeframe Volume Analysis
## Overview
This indicator provides multi-timeframe volume visualization designed to complement price action analysis. It displays volume data from up to 6 higher timeframes simultaneously in a separate panel, allowing traders to identify volume spikes, divergences, and institutional activity without switching between timeframes.
**Original Concept Credits:** This indicator builds upon the HTF Candles framework by Fadi, adapting it specifically for volume analysis with enhanced features including gap-filling for extended hours, multiple scaling methods, and advanced synchronization.
## What Makes This Script Original
### Key Innovations:
1. **Three Volume Scaling Methods:**
   - **Per-HTF Auto Scale:** Each timeframe scales independently for detailed comparison
   - **Global Auto Scale:** All timeframes use unified scale for relative volume comparison
   - **Manual Scale:** User-defined maximum for consistent analysis across sessions
2. **Bullish/Bearish Volume Differentiation:**
   - Volume bars colored based on price movement (close vs open)
   - Separate styling for bullish (green) and bearish (red) volume periods
   - Helps identify whether volume supports price direction
3. **Advanced Time Synchronization:**
   - Custom daily candle open times (Midnight, 8:30 AM, 9:30 AM ET)
   - Timezone-aware calculations for New York trading hours
   - Real-time countdown timers for each timeframe
   - **Gap-filling technology** for continuous display during extended hours and weekends
4. **Flexible Display Options:**
   - Configurable spacing and positioning
   - Label placement (top, bottom, or both)
   - Day-of-week or time interval labels on candles
   - Works reliably in backtesting and live trading
## How It Works
### Volume Calculation
The indicator uses `request.security()` with optimized parameters to fetch volume data from higher timeframes:
- **Volume Open/High/Low/Close (OHLC):** Tracks volume changes within each HTF candle
- **Color Logic:** Compares HTF close vs open prices to determine bullish/bearish classification
- **Alignment:** All volume bars share a common baseline for easy visual comparison
- **Gap Handling:** Uses `gaps=barmerge.gaps_off` to maintain continuity during non-trading hours
### Technical Implementation
```
1. Monitors HTF timeframe changes using request.security() with lookahead
2. Creates new VolumeCandle object when HTF bar opens
3. Updates current candle's volume H/L/C on each chart bar
4. Applies selected scaling method to normalize display height
5. Repositions all candles and labels on each bar update
6. Fills gaps automatically during extended hours for consistent display
```
### Scaling Methods Explained
**Method 1 - Auto Scale per HTF:**
Each timeframe displays volume relative to its own maximum. Best for identifying patterns within each individual timeframe.
**Method 2 - Global Auto Scale:**
All timeframes share the same scale based on the highest volume across all HTFs. Best for comparing relative volume strength between timeframes.
**Method 3 - Manual Scale:**
User sets maximum volume value. Best for maintaining consistent scale across different trading sessions or instruments.
## How to Use This Indicator
### Setup
1. Add indicator to your chart (it appears in a separate panel below price)
2. Configure up to 6 higher timeframes (default: 5m, 15m, 1H, 4H, 1D, 1W)
3. Set number of candles to display for each timeframe
4. Choose volume scaling method based on your analysis needs
5. Enable "Fix gaps in non-trading hours" for extended hours trading (enabled by default)
### Interpretation
**Volume Spikes:**
- Sudden increase in volume height indicates institutional activity or strong conviction
- Compare volume between timeframes to identify where the real money is moving
- Look for volume spikes that appear across multiple timeframes simultaneously
**Bullish vs Bearish Volume:**
- **Green volume bars:** Price closed higher (buying pressure)
- **Red volume bars:** Price closed lower (selling pressure)
- High green volume during uptrend = confirmation of strength
- High red volume during downtrend = confirmation of weakness
- High volume opposite to trend = potential reversal warning
**Multi-Timeframe Context:**
- **5m/15m:** Scalping and day trading activity
- **1H/4H:** Swing trading and intraday institutional flows
- **Daily/Weekly:** Major position building and long-term trends
**Divergences:**
- Price making new highs but volume declining = weakening trend
- Volume increasing while price consolidates = potential breakout brewing
- Price breaks level but volume doesn't confirm = likely false breakout
### Practical Examples
**Example 1 - Institutional Confirmation:**
Price breaks above resistance. Check volume across timeframes:
- 5m shows spike = retail interest
- 15m + 1H + 4H all show spikes = institutional confirmation
- **Trade confidence: HIGH**
**Example 2 - False Breakout Detection:**
Price breaks resistance with:
- High volume on 5m only
- Normal/low volume on 1H and 4H
- **Interpretation:** Likely retail trap, institutions not participating
- **Action:** Wait for pullback or avoid
**Example 3 - Accumulation Phase:**
Price ranges sideways but:
- Daily volume gradually increasing
- Weekly volume above average
- **Interpretation:** Smart money accumulating
- **Action:** Prepare for breakout in direction of volume
**Example 4 - Volume Divergence:**
Price makes new high:
- Current high has lower volume than previous high across all timeframes
- **Interpretation:** Weakening momentum
- **Action:** Consider profit-taking or reversal trade
## Configuration Parameters
### Timeframe Settings
- **HTF 1-6:** Select timeframes (must be higher than chart timeframe)
- **Max Display:** Number of candles to show per timeframe (1-50)
- **Limit to Next HTFs:** Display only first N enabled timeframes (1-6)
### Styling
- **Bull/Bear Colors:** Separate colors for body, border, and wick
- **Padding from current candles:** Distance offset from live price action
- **Space between candles:** Gap between individual volume bars
- **Space between Higher Timeframes:** Gap between different timeframe groups
- **Candle Width:** Thickness of volume bars (1-4, multiplied by 2)
### Volume Settings
- **Volume Scale Method:** Choose 1, 2, or 3
  - 1 = Auto Scale per HTF (each TF independent)
  - 2 = Global Auto Scale (all TF unified)
  - 3 = Manual Scale (user-defined max)
- **Auto Scale Volume:** Enable/disable automatic scaling
- **Manual Scale Max Volume:** Set maximum when using Method 3
### Label Settings
- **HTF Label:** Show/hide timeframe names with color and size options
- **Label Positions:** Display at Top, Bottom, or Both
- **Label Alignment:** Align centered or Follow Candles
- **Remaining Time:** Show countdown timer until next HTF candle
- **Interval Value:** Display day-of-week or time on each candle
### Custom Daily Candle
- **Enable Custom Daily:** Override default daily candle timing
- **Open Time Options:**
  - **Midnight:** Standard 00:00 ET daily open
  - **8:30 AM:** Align with economic data releases
  - **9:30 AM:** Align with NYSE market open
- Useful for specific trading strategies or market alignment
### Advanced Settings
- **Fix gaps in non-trading hours:** Maintains alignment during extended hours and weekends (recommended: ON)
  - Prevents visual gaps during forex weekend closures
  - Ensures consistent display during crypto 24/7 trading
  - Improves backtesting reliability
## Best Practices
1. **Pair with Price Action:** Use alongside HTF price candles indicator for complete picture
2. **Start Simple:** Enable 2-3 timeframes initially (e.g., 15m, 1H, 4H), add more as needed
3. **Match Settings:** Use same candle width/spacing as companion price indicator for visual alignment
4. **Scale Appropriately:** 
   - Use **Global scale** (Method 2) when comparing timeframes
   - Use **Per-HTF scale** (Method 1) for pattern analysis within each timeframe
   - Use **Manual scale** (Method 3) for consistent day-to-day comparison
5. **Watch for Volume Clusters:** High volume appearing simultaneously across multiple HTFs signals significant market events
6. **Confirm Breakouts:** Always check if volume supports the price movement across higher timeframes
7. **Extended Hours:** Keep "Fix gaps" enabled for 24/7 markets (Forex, Crypto) and weekend analysis
## Technical Notes
- **Timezone:** All calculations use America/New_York timezone for consistency
- **Real-time Updates:** Volume and timers update on each tick during market hours
- **Performance:** Optimized with max_bars_back=5000 for extensive historical analysis
- **Compatibility:** Works on all instruments with volume data (Stocks, Forex, Crypto, Futures)
- **Gap Handling:** Uses `barmerge.gaps_off` to fill data gaps during non-trading periods
- **Backtesting:** Uses `lookahead=barmerge.lookahead_on` for stable historical data without repainting
- **Data Continuity:** Automatically handles market closures, weekends, and extended hours
## Updates & Improvements
**Version 2.0 (Current):**
- ✅ Fixed alignment issues during extended hours and weekends
- ✅ Eliminated repainting in backtesting
- ✅ Added gap-filling technology for continuous display
- ✅ Improved data synchronization across all timeframes
- ✅ Enhanced NA value handling for data integrity
- ✅ Added advanced settings group for user control
## Support
For questions, suggestions, or feedback, please comment on the publication or message the author.
---
**Disclaimer:** This indicator is for educational and informational purposes only. It does not constitute financial advice. Past performance is not indicative of future results. Always perform your own analysis and implement proper risk management before making trading decisions.
  
Luxy Adaptive MA Cloud - Trend Strength & Signal Tracker V2Luxy Adaptive MA Cloud  - Professional Trend Strength & Signal Tracker
Next-generation moving average cloud indicator combining ultra-smooth gradient visualization with intelligent momentum detection. Built for traders who demand clarity, precision, and actionable insights.
 ═══════════════════════════════════════════════ 
  WHAT MAKES THIS INDICATOR SPECIAL? 
 ═══════════════════════════════════════════════ 
Unlike traditional MA indicators that show static lines, Luxy Adaptive MA Cloud creates a  living, breathing visualization  of market momentum. Here's what sets it apart:
 
 Exponential Gradient Technology 
This isn't just a simple fill between two lines. It's a professionally engineered gradient system with 26 precision layers using exponential density distribution. The result? An organic, cloud-like appearance where the center is dramatically darker (15% transparency - where crossovers and price action occur), while edges fade gracefully (75% transparency). Think of it as a visual "heat map" of trend strength.
  Dynamic Momentum Intelligence 
Most MA clouds only show  structure  (which MA is on top). This indicator shows  momentum strength  in real-time through four intelligent states:
- 🟢  Bright Green  = Explosive bullish momentum (both MAs rising strongly)
- 🔵  Blue  = Weakening bullish (structure intact, but momentum fading)
- 🟠  Orange  = Caution zone (bearish structure forming, weak momentum)
- 🔴  Deep Red  = Strong bearish momentum (both MAs falling)
The cloud literally  tells you  when trends are accelerating or losing steam.
  Conditional Performance Architecture 
Every calculation is optimized for speed. Disable a feature? It stops calculating entirely—not just hidden, but  not computed . The 26-layer gradient only renders when enabled. Toggle signals off? Those crossover checks don't run. This makes it one of the most efficient cloud indicators available, even with its advanced visual system.
  Zero Repaint Guarantee 
All signals and momentum states are based on  confirmed bar data only . What you see in historical data is  exactly  what you would have seen trading live. No lookahead bias. No repainting tricks. No signals that "magically" appear perfect in hindsight. If a signal shows in history, it would have triggered in real-time at that exact moment.
  Educational by Design 
Every single input includes comprehensive tooltips with:
- Clear explanations of what each parameter does
- Practical examples of when to use different settings
- Recommended configurations for scalping, day trading, and swing trading
- Real-world trading impact ("This affects entry timing" vs "This is visual only")
You're not just getting an indicator—you're learning  how to use it effectively .
 
  
 ═══════════════════════════════════════════════ 
  THE GRADIENT CLOUD - TECHNICAL DETAILS 
 ═══════════════════════════════════════════════ 
 Architecture: 
 
 26 precision layers  for silk-smooth transitions
 Exponential density curve  - layers packed tightly near center (where crossovers happen), spread wider at edges
 75%-15% transparency range  - center is highly opaque (15%), edges fade gracefully (75%)
 V-Gradient design  - emphasizes the action zone between Fast and Medium MAs
 
 The Four Momentum States: 
🟢  GREEN - Strong Bullish 
 
 Fast MA above Medium MA
 Both MAs rising with momentum > 0.02%
 Action: Enter/hold LONG positions, strong uptrend confirmed
 
🔵  BLUE - Weak Bullish 
 
 Fast MA above Medium MA
 Weak or flat momentum
 Action: Caution - bullish structure but losing strength, consider trailing stops
 
🟠  ORANGE - Weak Bearish 
 
 Medium MA above Fast MA
 Weak or flat momentum  
 Action: Warning - bearish structure developing, consider exits
 
🔴  RED - Strong Bearish 
 
 Medium MA above Fast MA
 Both MAs falling with momentum < -0.02%
 Action: Enter/hold SHORT positions, strong downtrend confirmed
 
 Smooth Transitions:  The momentum score is smoothed using an 8-bar EMA to eliminate noise and prevent whipsaws. You see the  true trend , not every minor fluctuation.
  
 ═══════════════════════════════════════════════ 
  FLEXIBLE MOVING AVERAGE SYSTEM 
 ═══════════════════════════════════════════════ 
 Three Customizable MAs: 
 
 Fast MA  (default: EMA 10) - Reacts quickly to price changes, defines short-term momentum
 Medium MA  (default: EMA 20) - Balances responsiveness with stability, core trend reference
 Slow MA  (default: SMA 200, optional) - Long-term trend filter, major support/resistance
 
 Six MA Types Available: 
 
 EMA  - Exponential; faster response, ideal for momentum and day trading
 SMA  - Simple; smooth and stable, best for swing trading and trend following
 WMA  - Weighted; middle ground between EMA and SMA
 VWMA  - Volume-weighted; reflects market participation, useful for liquid markets
 RMA  - Wilder's smoothing; used in RSI/ADX, excellent for trend filters
 HMA  - Hull; extremely responsive with minimal lag, aggressive option
 
 Recommended Settings by Trading Style: 
 Scalping (1m-5m): 
 
Fast: EMA(5-8)
Medium: EMA(10-15)
Slow: Not needed or EMA(50)
 
 Day Trading (5m-1h): 
 
Fast: EMA(10-12)
Medium: EMA(20-21)
Slow: SMA(200) for bias
 
 Swing Trading (4h-1D): 
 
Fast: EMA(10-20)
Medium: EMA(34-50)
Slow: SMA(200)
 
 Pro Tip:  Start with Fast < Medium < Slow lengths. The gradient works best when there's clear separation between Fast and Medium MAs.
  
 ═══════════════════════════════════════════════ 
  CROSSOVER SIGNALS - CLEAN & RELIABLE 
 ═══════════════════════════════════════════════ 
 Golden Cross  ⬆  LONG Signal 
 
 Fast MA crosses  above  Medium MA
 Classic bullish reversal or trend continuation signal
 Most reliable when accompanied by GREEN cloud (strong momentum)
 
 Death Cross  ⬇  SHORT Signal 
 
 Fast MA crosses  below  Medium MA  
 Classic bearish reversal or trend continuation signal
 Most reliable when accompanied by RED cloud (strong momentum)
 
 Signal Intelligence: 
 
 Anti-spam filter  - Minimum 5 bars between signals prevents noise
 Clean labels  - Placed precisely at crossover points
 Alert-ready  - Built-in ALERTS for automated trading systems
 No repainting  - Signals based on confirmed bars only
 
 Signal Quality Assessment: 
 High-Quality Entry: 
 
Golden Cross + GREEN cloud + Price above both MAs
= Strong bullish setup ✓
 
 Low-Quality Entry (skip or wait): 
 
Golden Cross + ORANGE cloud + Choppy price action
= Weak bullish setup, likely whipsaw ✗
 
  
 ═══════════════════════════════════════════════ 
  REAL-TIME INFO PANEL 
 ═══════════════════════════════════════════════ 
An at-a-glance dashboard showing:
 Trend Strength Indicator: 
 
 Visual display of current momentum state
 Color-coded header matching cloud color
 Instant recognition of market bias
 
 MA Distance Table: 
Shows percentage distance of price from each enabled MA:
 
 Green rows : Price ABOVE MA (bullish)
 Red rows : Price BELOW MA (bearish)
 Gray rows : Price AT MA (rare, decision point)
 
 Distance Interpretation: 
 
+2% to +5%: Healthy uptrend
+5% to +10%: Getting extended, caution
+10%+: Overextended, expect pullback
-2% to -5%: Testing support
-5% to -10%: Oversold zone
-10%+: Deep correction or downtrend
 
 Customization: 
 
 4 corner positions
 5 font sizes (Tiny to Huge)
 Toggle visibility on/off
 
 ═══════════════════════════════════════════════ 
  HOW TO USE - PRACTICAL TRADING GUIDE 
 ═══════════════════════════════════════════════ 
 STRATEGY 1: Trend Following 
 
 Identify trend : Wait for GREEN (bullish) or RED (bearish) cloud
 Enter on signal : Golden Cross in GREEN cloud = LONG, Death Cross in RED cloud = SHORT
 Hold position : While cloud maintains color
 Exit signals :
   • Cloud turns ORANGE/BLUE = momentum weakening, tighten stops
   • Opposite crossover = close position
   • Cloud turns opposite color = full reversal
 
 STRATEGY 2: Pullback Entries 
 
 Confirm trend : GREEN cloud established (bullish bias)
 Wait for pullback : Price touches or crosses below Fast MA
 Enter when : Price rebounds back above Fast MA with cloud still GREEN
 Stop loss : Below Medium MA or recent swing low
 Target : Previous high or when cloud weakens
 
 STRATEGY 3: Momentum Confirmation 
 
 Your setup triggers : (e.g., chart pattern, support/resistance)
 Check cloud color :
   • GREEN = proceed with LONG
   • RED = proceed with SHORT  
   • BLUE/ORANGE = skip or reduce size
 Use gradient as confluence : Not as primary signal, but as momentum filter
 
 Risk Management Tips: 
 
 Never enter against the cloud color (don't LONG in RED cloud)
 Reduce position size during BLUE/ORANGE (transition periods)
 Place stops beyond Medium MA for swing trades
 Use Slow MA (200) as final trend filter - don't SHORT above it in uptrends
 
  
 ═══════════════════════════════════════════════ 
  PERFORMANCE & OPTIMIZATION 
 ═══════════════════════════════════════════════ 
 Tested On: 
 
 Crypto: BTC, ETH, major altcoins
 Stocks: SPY, AAPL, TSLA, QQQ
 Forex: EUR/USD, GBP/USD, USD/JPY
 Indices: S&P 500, NASDAQ, DJI
 
 ═══════════════════════════════════════════════ 
  TRANSPARENCY & RELIABILITY 
 ═══════════════════════════════════════════════ 
 Educational Focus: 
 
 Detailed tooltips on every input
 Clear documentation of methodology
 Practical examples in descriptions
 Teaches you  why , not just  what 
 
 Open Logic: 
 
 Momentum calculation: (Fast slope + Medium slope) / 2
 Smoothing: 8-bar EMA to reduce noise
 Thresholds: ±0.02% for strong momentum classification
 Everything is transparent and explainable
 
 ═══════════════════════════════════════════════ 
  COMPLETE FEATURE LIST 
 ═══════════════════════════════════════════════ 
 Visual Components: 
 
 26-layer exponential gradient cloud
 3 customizable moving average lines
 Golden Cross / Death Cross labels
 Real-time info panel with trend strength
 MA distance table
 
 Calculation Features: 
 
 6 MA types (EMA, SMA, WMA, VWMA, RMA, HMA)
 Momentum-based cloud coloring
 Smoothed trend strength scoring
 Conditional performance optimization
 
 Customization Options: 
 
 All MA lengths adjustable
 All colors customizable (when gradient disabled)
 Panel position (4 corners)
 Font sizes (5 options)
 Toggle any feature on/off
 
 Signal Features: 
 
 Anti-spam filter (configurable gap)
 Clean, non-overlapping labels
 Built-in alert conditions
 No repainting guarantee
 
 ═══════════════════════════════════════════════ 
  IMPORTANT DISCLAIMERS 
 ═══════════════════════════════════════════════ 
 
 This indicator is for  educational and informational purposes only 
 Not financial advice - always do your own research
 Past performance does not guarantee future results
 Use proper risk management - never risk more than you can afford to lose
 Test on paper/demo accounts before using with real money
 Combine with other analysis methods - no single indicator is perfect
 Works best in trending markets; less effective in choppy/sideways conditions
 Signals may perform differently in different timeframes and market conditions
 The indicator uses historical data for MA calculations - allow sufficient lookback period
 
 ═══════════════════════════════════════════════ 
  CREDITS & TECHNICAL INFO 
 ═══════════════════════════════════════════════ 
 Version:  2.0
 Release:  October 2025
 Special Thanks: 
 
 TradingView community for feedback and testing
 Pine Script documentation for technical reference
 
 ═══════════════════════════════════════════════ 
  SUPPORT & UPDATES 
 ═══════════════════════════════════════════════ 
 Found a bug?  Comment below with:
 
 Ticker symbol
 Timeframe
 Screenshot if possible
 Steps to reproduce
 
 Feature requests?  I'm always looking to improve! Share your ideas in the comments.
 Questions?  Check the tooltips first (hover over any input) - most answers are there. If still stuck, ask in comments.
 ═══════════════════════════════════════════════ 
 Happy Trading!  
Remember: The best indicator is the one you understand and use consistently. Take time to learn how the cloud behaves in different market conditions. Practice on paper before going live. Trade smart, manage risk, and may the trends be with you! 🚀






















