Machine Learning Moving Average [BackQuant]Machine Learning Moving Average
A powerful tool combining clustering, pseudo-machine learning, and adaptive prediction, enabling traders to understand and react to price behavior across multiple market regimes (Bullish, Neutral, Bearish). This script uses a dynamic clustering approach based on percentile thresholds and calculates an adaptive moving average, ideal for forecasting price movements with enhanced confidence levels.
What is Percentile Clustering?
Percentile clustering is a method that sorts and categorizes data into distinct groups based on its statistical distribution. In this script, the clustering process relies on the percentile values of a composite feature (based on technical indicators like RSI, CCI, ATR, etc.). By identifying key thresholds (lower and upper percentiles), the script assigns each data point (price movement) to a cluster (Bullish, Neutral, or Bearish), based on its proximity to these thresholds.
This approach mimics aspects of machine learning, where we “train” the model on past price behavior to predict future movements. The key difference is that this is not true machine learning; rather, it uses data-driven statistical techniques to "cluster" the market into patterns.
Why Percentile Clustering is Useful
Clustering price data into meaningful patterns (Bullish, Neutral, Bearish) helps traders visualize how price behavior can be grouped over time.
By leveraging past price behavior and technical indicators, percentile clustering adapts dynamically to evolving market conditions.
It helps you understand whether price behavior today aligns with past bullish or bearish trends, improving market context.
Clusters can be used to predict upcoming market conditions by identifying regimes with high confidence, improving entry/exit timing.
What This Script Does
Clustering Based on Percentiles : The script uses historical price data and various technical features to compute a "composite feature" for each bar. This feature is then sorted and clustered based on predefined percentile thresholds (e.g., 10th percentile for lower, 90th percentile for upper).
Cluster-Based Prediction : Once clustered, the script uses a weighted average, cluster momentum, or regime transition model to predict future price behavior over a specified number of bars.
Dynamic Moving Average : The script calculates a machine-learning-inspired moving average (MLMA) based on the current cluster, adjusting its behavior according to the cluster regime (Bullish, Neutral, Bearish).
Adaptive Confidence Levels : Confidence in the predicted return is calculated based on the distance between the current value and the other clusters. The further it is from the next closest cluster, the higher the confidence.
Visual Cluster Mapping : The script visually highlights different clusters on the chart with distinct colors for Bullish, Neutral, and Bearish regimes, and plots the MLMA line.
Prediction Output : It projects the predicted price based on the selected method and shows both predicted price and confidence percentage for each prediction horizon.
Trend Identification : Using the clustering output, the script colors the bars based on the current cluster to reflect whether the market is trending Bullish (green), Bearish (red), or is Neutral (gray).
How Traders Use It
Predicting Price Movements : The script provides traders with an idea of where prices might go based on past market behavior. Traders can use this forecast for short-term and long-term predictions, guiding their trades.
Clustering for Regime Analysis : Traders can identify whether the market is in a Bullish, Neutral, or Bearish regime, using that information to adjust trading strategies.
Adaptive Moving Average for Trend Following : The adaptive moving average can be used as a trend-following indicator, helping traders stay in the market when it’s aligned with the current trend (Bullish or Bearish).
Entry/Exit Strategy : By understanding the current cluster and its associated trend, traders can time entries and exits with higher precision, taking advantage of favorable conditions when the confidence in the predicted price is high.
Confidence for Risk Management : The confidence level associated with the predicted returns allows traders to manage risk better. Higher confidence levels indicate stronger market conditions, which can lead to higher position sizes.
Pseudo Machine Learning Aspect
While the script does not use conventional machine learning models (e.g., neural networks or decision trees), it mimics certain aspects of machine learning in its approach. By using clustering and the dynamic adjustment of a moving average, the model learns from historical data to adjust predictions for future price behavior. The "learning" comes from how the script uses past price data (and technical indicators) to create patterns (clusters) and predict future market movements based on those patterns.
Why This Is Important for Traders
Understanding market regimes helps to adjust trading strategies in a way that adapts to current market conditions.
Forecasting price behavior provides an additional edge, enabling traders to time entries and exits based on predicted price movements.
By leveraging the clustering technique, traders can separate noise from signal, improving the reliability of trading signals.
The combination of clustering and predictive modeling in one tool reduces the complexity for traders, allowing them to focus on actionable insights rather than manual analysis.
How to Interpret the Output
Bullish (Green) Zone : When the price behavior clusters into the Bullish zone, expect upward price movement. The MLMA line will help confirm if the trend remains upward.
Bearish (Red) Zone : When the price behavior clusters into the Bearish zone, expect downward price movement. The MLMA line will assist in tracking any downward trends.
Neutral (Gray) Zone : A neutral market condition signals indecision or range-bound behavior. The MLMA line can help track any potential breakouts or trend reversals.
Predicted Price : The projected price is shown on the chart, based on the cluster's predicted behavior. This provides a useful reference for where the price might move in the near future.
Prediction Confidence : The confidence percentage helps you gauge the reliability of the predicted price. A higher percentage indicates stronger market confidence in the forecasted move.
Tips for Use
Combining with Other Indicators : Use the output of this indicator in combination with your existing strategy (e.g., RSI, MACD, or moving averages) to enhance signal accuracy.
Position Sizing with Confidence : Increase position size when the prediction confidence is high, and decrease size when it’s low, based on the confidence interval.
Regime-Based Strategy : Consider developing a multi-strategy approach where you use this tool for Bullish or Bearish regimes and a separate strategy for Neutral markets.
Optimization : Adjust the lookback period and percentile settings to optimize the clustering algorithm based on your asset’s characteristics.
Conclusion
The Machine Learning Moving Average offers a novel approach to price prediction by leveraging percentile clustering and a dynamically adapting moving average. While not a traditional machine learning model, this tool mimics the adaptive behavior of machine learning by adjusting to evolving market conditions, helping traders predict price movements and identify trends with improved confidence and accuracy.
Statistics
Vandan V2Vandan V2 is an automated trading strategy for NQ1! (E-mini Nasdaq-100) based on short-term mean reversion with dynamic risk control. It combines volatility filters and overbought/oversold signals to capture local market imbalances.
Backtested from 2015 to 2025, it achieved a +730% total return, Profit Factor of 1.40, max drawdown of only 1.61%, and over 106,000 trades. Designed for systematic scalping or intraday arbitrage with a limit of 3 simultaneous contracts.
Intraday Perpetual Premium & Z-ScoreThis indicator measures the real-time premium of a perpetual futures contract relative to its spot market and interprets it through a statistical lens.
It helps traders detect when funding pressure is building, when leverage is being unwound, and when crowding in the futures market may precede volatility.
How it works
• Premium (%) = (Perp – Spot) ÷ Spot × 100
The script fetches both spot and perpetual prices and calculates their percentage difference each minute.
• Rolling Mean & Z-Score
Over a 4-hour look-back, it computes the average premium and standard deviation to derive a Z-Score, showing how stretched current sentiment is.
• Dynamic ±2σ Bands highlight statistically extreme premiums or discounts.
• Rate of Change (ROC) over one hour gauges the short-term directional acceleration of funding flows.
Colour & Label Interpretation
Visual cue Meaning Trading Implication
🟢 Green bars + “BULL Pressure” Premium rising faster than mean Leverage inflows → momentum strengthening
🔴 Red bars + “BEAR Pressure” Premium shrinking Leverage unwind → pull-back or consolidation
⚠️ Orange “EXTREME Premium/Discount” Crowded trade → heightened reversal risk
⚪ Grey bars Neutral Balanced conditions
Alerts
• Bull Pressure Alert → funding & premium rising (momentum building)
• Bear Pressure Alert → premium falling (deleveraging)
• Extreme Premium Alert → crowded longs; potential top
• Extreme Discount Alert → capitulation; possible bottom
Use case
Combine this indicator with your Heikin-Ashi, RSI, and MACD confluence rules:
• Enter only when your oscillators are low → curling up and Bull Pressure triggers.
• Trim or exit when Bear Pressure or Extreme Premium appears.
• Watch for Extreme Discount during flushes as an early bottoming clue.
Yang-Zhang Volatility (YZVol) by CoryP1990 – Quant ToolkitThe Yang-Zhang Volatility (YZVol) estimator measures realized volatility using both overnight gaps and intraday moves. It combines three components: overnight returns, open-to-close returns, and the Rogers–Satchell term, weighted by Zhang’s k to reduce bias.
How to read it
Line color: Green when YZVol is rising (volatility expansion), Red when falling (volatility compression).
Background: Green tint = above High-vol threshold (active regime). Red tint = below Low-vol threshold (quiet regime).
Units: Displays Daily % by default on any timeframe (values are normalized to daily). An optional toggle shows Annualized % (√252 × Daily %).
Typical uses
Spot transitions between quiet and active regimes.
Compare realized vol vs implied vol or a risk-target.
Adapt position sizing to volatility clustering.
Defaults
Length = 20
High-vol threshold = 5% (Daily)
Low-vol threshold = 1% (Daily)
Optional: Annualized % display
Example — SPY (1D)
During the 2020 crash, YZVol surged to 5.8 % per day, capturing the height of pandemic-era volatility before compressing into a calm regime through 2021. Volatility re-expanded in 2022 due to reinflamed COVID fears and gradually stabilized through 2023. A sharp, liquidity-driven volatility event in August 2024 caused another brief YZVol surge, reflecting the historic one-day VIX spike triggered by market-wide risk-off flows and thin pre-market liquidity. A second, policy-driven expansion followed in April–May 2025, coinciding with the renewed U.S.–China tariff conflict and a sharp equity pullback. Since mid-2025, YZVol has settled near 1 % per day, with the red background confirming that realized volatility has once again compressed into a quiet, low-risk regime.
Part of the Quant Toolkit — transparent, open-source indicators for modern quantitative analysis. Built by CoryP1990.
Intraday Intensity Percent (IIP) by CoryP1990 – Quant ToolkitThe Intraday Intensity Percent (IIP) quantifies buying vs. selling pressure within each bar by combining price position inside the range and trading volume. It’s essentially a volume-weighted order-flow indicator, showing whether volume concentrates near highs (buying pressure) or lows (selling pressure).
How it works
Computes the Intraday Intensity (II) = ((Close − Low) − (High − Close)) / (High − Low) × Volume.
Then compares total “intensity” to total volume over a look-back window to produce a normalized percentage.
Lime line: IIP rising → accumulation / increasing buy pressure.
Red line: IIP falling → distribution / increasing sell pressure.
Background: Green tint = heavy buying, Red tint = heavy selling.
Use cases
Identify accumulation or distribution phases early.
Confirm momentum with volume-backed pressure.
Detect divergences between price and volume flow.
Defaults
Length = 14
High-pressure threshold = +5 %
Low-pressure threshold = −5 %
Example — AAPL (2H)
Late July into early August shows sustained distribution as IIP sinks below −5% (deep red), marking heavy sell pressure during the drop. From early to mid-August, IIP flips positive and holds > +5% (green background), aligning with the rebound. After a brief mid-September shakeout, late Sep–mid Oct features renewed accumulation with repeated green surges. Most recently, IIP prints around −33%, indicating dominant selling pressure into the latest two-hour bars.
Part of the Quant Toolkit — transparent, open-source indicators for modern quantitative analysis. Built by CoryP1990.
Fractal Dimension Index (FDI) by CoryP1990 – Quant ToolkitThe Fractal Dimension Index (FDI) quantifies how directional or choppy price movement is; in other words, it measures the “roughness” of a trend. FDI values near 1.0–1.3 indicate strong directional trends, while values near 1.5–2.0 reflect chaotic or range-bound behavior. This makes FDI a powerful tool for detecting trend vs. mean-reversion regimes.
How it works
Calculates the ratio of average price changes over full and half-length windows to estimate the fractal dimension of price movement.
Teal line = FDI decreasing → trending behavior (market smoother, more directional).
Orange line = FDI increasing → choppiness or consolidation.
Background:
Green tint = trend-friendly regime (FDI below low threshold).
Orange tint = choppy regime (FDI above high threshold).
Use cases
Detect when markets shift from trend-following to mean-reverting conditions.
Filter trades: favor trend strategies when FDI < 1.3 and reversion setups when FDI > 1.7.
Combine with momentum or volatility metrics to classify regimes.
Defaults
Length = 20
High-FDI threshold = 1.8
Low-FDI threshold = 1.2
Example — TSLA (1D, 2021)
Early 2021 trades choppy to sideways with FDI swinging up toward 1.5, then the index drops below 1.2 as Tesla transitions into a persistent trend-friendly regime through the second half of the year (green background). During the Q4 breakout, FDI holds ~1.0–1.2, confirming strong directionality; brief pullbacks lift FDI back toward the mid-range before trending pressure resumes. At the right edge, FDI sits well below the low threshold, signaling that price remains in a trend-supportive state.
Part of the Quant Toolkit — transparent, open-source indicators for modern quantitative analysis. Built by CoryP1990.
India Vix based Strangle StrikesA clean Nifty–VIX dashboard that converts India VIX into expected daily moves, price ranges, and suggested strangle strikes. Includes VIX %, expanded 1.2× range, and smart rounded strike levels for options trading.
This script provides a professional on-chart dashboard that converts India VIX into actionable trading levels for Nifty. It calculates the VIX-based expected daily move, projected price ranges, expanded 1.2× ranges, and suggested strangle strike prices. Includes clean formatting, color-coded sections, and real-time updates.
Ideal for traders using straddles, strangles, intraday volatility models, range-bound setups, and options-based risk management.
1.2x expanded range is better success probability, may keep 20% of strangle value as stop loss.
The vix based system is intended to give approx. 70%+ success rate.
Ulcer Index (UI) by CoryP1990 – Quant ToolkitThe Ulcer Index measures downside volatility, i.e. how deep and persistent drawdowns are from recent highs. Unlike standard deviation, which treats upside and downside equally, the Ulcer Index focuses purely on pain . It’s a favorite of risk-adjusted performance metrics like the Martin Ratio.
How it works
Computes the RMS (root-mean-square) of drawdowns over a look-back window.
Rising UI → drawdowns worsening (stress increasing).
Falling UI → drawdowns shrinking (recovery phase).
Red line = Ulcer Index rising.
Lime line = Ulcer Index falling.
Red background = High-risk regime (above threshold).
Green background = Low-risk regime (below threshold).
Use cases
Gauge portfolio stress levels and timing of recovery phases.
Identify “calm vs storm” periods for position sizing.
Combine with volatility or sentiment measures for regime classification.
Defaults
Length = 14
High-risk threshold = 10
Low-risk threshold = 5
Example — NVIDIA (NVDA, 1D)
During the sharp decline through 2022, the Ulcer Index repeatedly spiked above 10 while the background turned red, highlighting an extended high-stress drawdown phase. As NVDA began recovering in early 2023, the UI line switched to lime and drifted below 5, marking a transition into a low-risk regime. Throughout 2024–2025, the index stayed mostly sub-5 with brief red pulses on minor corrections, which is clear evidence that downside volatility has remained contained during the broader uptrend.
Part of the Quant Toolkit - a series of transparent, open-source indicators designed for professional-grade analytics and education. Built by CoryP1990.
korea time with 200 korea time
start time
08
09
17
18
23
00
This script makes it easier to look at the charts
The time automatically displays even if you don't bother to bring the mouse by hand
Now you can see the time intuitively
Run a very happy trading session
Simple Sector/MarketCapSimple Sector & Market Cap
A lightweight overlay that instantly shows Sector, Industry, and Market Cap classification for any ticker — right on your chart.
Features
Auto-detects sector and industry from TradingView data.
Calculates real-time market capitalization.
Categorizes stocks into Mega / Large / Mid / Small / Micro Cap groups.
Customizable colors for table background, text, and cap tiers.
Choose between vertical or horizontal layout and adjustable text size.
Purpose
Quick context without clutter — see what kind of company you’re trading and how it fits into the market hierarchy. Ideal for traders who like fast reference to fundamentals while scanning charts.
Notes
No external data sources are required. Values are derived from TradingView’s internal financial dataset.
Check-listThis Entry Checklist helps you stay objective in your trades. If you enter a position, it’s because you’ve checked off the boxes of your different confluences.
If you haven’t checked them, the checklist will immediately show you that.
Momentum Master v1Momentum Master v1 - Multi-Strategy Trading System
This script implements a trading system that integrates standard indicators (EMA, RSI, MACD, Bollinger Bands):
1. ADAPTIVE CONFIDENCE-BASED POSITION SIZING: Each signal receives a real-time confidence score (0-100%) calculated using a proprietary weighted algorithm. This confidence score dynamically adjusts stop loss distance (80%+ confidence = 1.2x stops, <60% = 0.9x stops), creating intelligent position sizing based on signal quality. This is NOT found in any standard indicator combination.
2. MULTI-LEVEL TP ANALYTICS WITH INDEPENDENT WIN RATE TRACKING: Each take profit level (TP1-TP6) maintains separate win rate statistics, enabling data-driven optimization. Traders can disable underperforming TP levels and focus on high-performers based on actual market data. This is NOT just multiple exit levels - it's a performance optimization system.
3. UNIVERSAL FILTER INTEGRATION: All filters (RSI, ADX, Volume, Divergence, Order Blocks) work identically across all 6 strategies using unified logic, creating a modular testing environment. This allows traders to test filter combinations on any strategy - a capability not found in standard scripts.
WHY THIS IS WORTH PAYING FOR (Despite Using Standard Indicators)
While this script uses standard indicators (EMA, RSI, MACD, BB), the value lies in the ORIGINAL INTEGRATION and PROPRIETARY SYSTEMS listed above. Standard indicators are used as INPUTS to these original systems, not as the core value. The proprietary confidence scoring algorithm, adaptive position sizing, and multi-level TP analytics are original innovations that cannot be found in free scripts or standard indicator combinations.
---
CORE INNOVATION: UNIFIED ARCHITECTURE
This script implements a TRUE UNIFIED SYSTEM where 6 independent trading strategies share:
- The SAME risk management system (not separate systems per strategy)
- The SAME universal filters (not strategy-specific filters)
- The SAME performance analytics (not separate tracking per strategy)
This unified architecture allows traders to:
- Switch between strategies without reconfiguring risk management
- Test filter combinations universally across all strategies
- Compare strategy performance using identical metrics
This is fundamentally different from scripts that simply display multiple indicators together. This is a unified system where components integrate to create intelligent trading decisions.
---
DETAILED METHODOLOGY (Specific Algorithms Used)
SIGNAL CONFIDENCE CALCULATION ALGORITHM
The proprietary confidence scoring system uses the following weighted algorithm:
Confidence Score = Base Strategy Signal (50 points)
+ Volume Confirmation Bonus (20 points if volume > threshold)
+ Volume Trend Bonus (10 points if volume increasing over 3 bars)
+ RSI Confirmation Bonus (10 points if RSI in neutral zone 30-70)
This creates a score from 0-100%. The score is then used to adjust stop loss distance:
IF confidence >= 80%: Stop Distance = ATR × Multiplier × 1.2
IF confidence >= 70%: Stop Distance = ATR × Multiplier × 1.1
IF confidence >= 60%: Stop Distance = ATR × Multiplier × 1.0
IF confidence < 60%: Stop Distance = ATR × Multiplier × 0.9
This adaptive system recognizes that high-confidence setups can withstand wider stops, while low-confidence setups need tighter risk control.
MULTI-LEVEL TAKE PROFIT SYSTEM WITH INDEPENDENT TRACKING
The script implements 6 progressive take profit levels (TP1-TP6) with the following risk/reward ratios:
- TP1: Entry ± (Stop Distance × 2.0) = 1:2 R/R
- TP2: Entry ± (Stop Distance × 4.0) = 1:4 R/R
- TP3: Entry ± (Stop Distance × 6.0) = 1:6 R/R
- TP4: Entry ± (Stop Distance × 8.0) = 1:8 R/R
- TP5: Entry ± (Stop Distance × 10.0) = 1:10 R/R
- TP6: Entry ± (Stop Distance × 12.0) = 1:12 R/R
ORIGINAL FEATURE: Each TP level maintains an independent array tracking wins and losses. The Performance Stats Table calculates separate win rates for:
- TP1 hits: Wins that reached TP1 / Total trades
- TP2 hits: Wins that reached TP2 (from trades that didn't stop at TP1) / Trades that reached TP2
- TP3 hits: Wins that reached TP3 (from trades that reached TP2) / Trades that reached TP3
- And so on for TP4-TP6
This allows traders to optimize which TP levels to enable based on actual market behavior. Example: If TP1 shows 65% win rate but TP2 shows 45%, disable TP2+ and focus on TP1 exits.
UNIVERSAL FILTER SYSTEM (Proprietary Integration)
All filters use identical logic across all 6 strategies:
RSI Filter Algorithm:
- Long entries: Only allowed when RSI < (Overbought Threshold - 5)
- Short entries: Only allowed when RSI > (Oversold Threshold + 5)
- This prevents entries at momentum extremes for ALL strategies
ADX Filter Algorithm:
- Checks if ADX > threshold (default 20) using Pine Script's built-in ADX calculation
- If enabled, ALL strategies (trend-following AND mean reversion) require ADX > threshold
- This ensures trades occur in trending markets, not choppy conditions
Volume Confirmation Algorithm:
- Requires volume > (Simple Moving Average of volume over 20 bars × multiplier)
- Applied identically to all strategies
- Ensures institutional participation
Divergence Filter Algorithm:
- Uses pivot detection (ta.pivotlow/pivothigh with 2-bar lookback)
- Compares price pivots to RSI/MFI pivots
- Requires minimum thresholds: RSI divergence >= 1.5, Price divergence >= 0.05
- Waits for divergence confirmation within lookback period (default 100 bars)
Order Block Filter Algorithm:
- Identifies last strong candle (body > 50% of range) before directional move
- Tracks direction: Bullish OB = strong bullish candle before upward move
- Filter: Only allows trades in direction of most recent Order Block
- This ensures alignment with institutional positioning
---
STRATEGY DETAILS (Specific Methods Used)
1. EMA CROSSOVER STRATEGY
Method: Exponential Moving Average Crossover with RSI Boundary Filtering
Algorithm:
- Fast EMA: Exponential Moving Average (close, period = 9 or custom)
- Slow EMA: Exponential Moving Average (close, period = 21 or custom)
- Entry Condition: Fast EMA crosses above Slow EMA (for longs)
- RSI Boundary Check: Entry only allowed if RSI < 70 (prevents overbought entries)
- Exit Condition: Fast EMA crosses below Slow EMA OR stop loss hit
Why This Method: Standard EMA crossovers generate false signals during choppy markets. The RSI boundary check (RSI < 70 for longs) prevents entries when momentum is already overextended, improving win rate by filtering out weak setups.
2. RSI MEAN REVERSION STRATEGY
Method: RSI Extreme Reversion with Candlestick Pattern Confirmation
Algorithm:
- RSI Calculation: Relative Strength Index (close, period = 14)
- Oversold Condition: RSI < 30 (default, configurable)
- Overbought Condition: RSI > 70 (default, configurable)
- Candlestick Filter: Requires bullish candle (close > open) for longs
- Volume Confirmation: Requires volume > (average × multiplier)
- Optional Price Level Filter: Requires price in bottom/top quartile of 10-bar range
Why This Method: Mean reversion works best when price is at true extremes AND showing reversal candles with volume. The optional filters add confluence, significantly improving win rate.
3. BREAKOUT STRATEGY
Method: Price Breakout with Volume Confirmation
Algorithm:
- Lookback Period: 20 bars (configurable)
- Breakout Condition: Close > highest high of last N bars (for longs)
- Volume Confirmation: Volume > Simple Moving Average of volume over 20 bars
- Entry: Triggers when price breaks recent high/low with volume
Why This Method: Breakouts signal momentum continuation. Volume confirmation ensures institutional participation, filtering false breakouts.
4. MACD CROSSOVER STRATEGY
Method: MACD Signal Crossover with Oversold/Overbought Entry Filter
Algorithm:
- MACD Calculation: Using Pine Script's ta.macd() with default periods (12, 26, 9)
- Entry Condition: MACD line crosses above signal line (for longs)
- Oversold Filter: Entry only when MACD < 0 (catches reversals, not late entries)
- Exit Condition: MACD crosses below signal line OR stop loss hit
Why This Method: Standard MACD crossovers can enter late in trends. Entering only when MACD is oversold (< 0) catches reversals rather than late trend entries, improving risk/reward.
5. BOLLINGER BANDS STRATEGY
Method: Bollinger Band Mean Reversion with RSI Confirmation
Algorithm:
- BB Calculation: Using Pine Script's ta.bb() with period 20, standard deviation 2.0
- Entry Condition: Price hits lower band (for longs)
- RSI Confirmation: Requires RSI < 40 (not extreme 30)
- Candlestick Filter: Requires bullish candle (close > open)
Why This Method: BB mean reversion works best with RSI confirmation. Using RSI 40/60 (not extreme 30/70) allows earlier entries while still confirming mean reversion.
6. VOLUME BREAKOUT STRATEGY
Method: Volume Surge with Price Strength Confirmation
Algorithm:
- Volume Surge: Volume > (average × 2.0 multiplier)
- Price Strength: |Close - Open| > (ATR × 0.5 multiplier)
- Direction: Bullish candle (close > open) for longs
- RSI Boundary: RSI < 70 (prevents overbought entries)
Why This Method: Institutional moves require both volume AND price movement. The ATR-based price strength filter ensures the move has momentum, not just volume noise.
---
ADVANCED MARKET ANALYSIS TOOLS (Integration Details)
FAIR VALUE GAPS (FVG)
Detection Algorithm: Identifies gaps between 3-candle sequences
- Bullish FVG: Low > High (gap between current low and high 2 bars ago)
- Bearish FVG: High < Low (gap between current high and low 2 bars ago)
- Size Filter: FVGs smaller than (ATR × 0.8 multiplier) are filtered out
- Integration: FVG boxes display on chart, but are NOT used in entry logic (display only)
ORDER BLOCKS
Detection Algorithm: Identifies last strong candle before directional move
- Strong Candle: Body > 50% of total range
- Bullish OB: Red candle followed by green candle with higher close
- Bearish OB: Green candle followed by red candle with lower close
- Integration: Order Block Filter aligns trade direction with most recent OB direction
LIQUIDITY ZONES
Detection Algorithm: Identifies swing highs/lows using pivot detection
- Buy-Side Liquidity: Swing highs (ta.pivothigh with configurable lookback)
- Sell-Side Liquidity: Swing lows (ta.pivotlow with configurable lookback)
- Integration: Display only - not used in entry logic
POINT OF CONTROL (POC) LEVELS
Calculation Methods:
1. Volume POC: Price level with highest volume in lookback period (recalculated every 5 bars)
2. Session POC: (High + Low + Close) / 3 of previous session
3. Daily POC: (High + Low + Close) / 3 of previous day
4. Weekly POC: (High + Low + Close) / 3 of previous week
- Integration: Display only - not used in entry logic
FIBONACCI EXTENSIONS
Calculation Method: 3-point swing-based extension
- Detects swing points using pivot detection (ta.pivothigh/pivotlow)
- Calculates extensions: 123.6%, 138.2%, 161.8%, 261.8%, etc.
- Golden Zone: Highlights 61.8%-78.6% retracement zone
- Integration: Display only - not used in entry logic
DIVERGENCE DETECTION
Algorithm: Pivot-based divergence detection
- RSI Divergence: Compares price pivots to RSI pivots using ta.pivotlow/pivothigh
- MFI Divergence: Same logic using Money Flow Index
- Thresholds: RSI divergence >= 1.5, Price divergence >= 0.05
- Integration: Divergence Filter waits for confirmation within lookback period
GANN FAN ANALYSIS
Algorithm: 9-angle fan with auto-adjustment
- Angles: 1x1, 1x2, 1x3, 2x1, 3x1, 4x1, 8x1, 1x4, 1x8
- Auto Timeframe Detection: Adjusts lookback (2D=120, 3D=150, 4D=160, 5D=180 bars)
- Auto Market Type Detection: Adjusts angle steepness (Crypto=15.0, Stock=10.0, etc.)
- Integration: Display only - not used in entry logic
---
PERFORMANCE ANALYTICS (Original System)
Three integrated display tables provide real-time analytics:
1. PERFORMANCE STATS TABLE
- Displays win rates for each TP level (TP1-TP6)
- Shows win count, loss count, and win rate percentage for each level
- Enables data-driven optimization of TP levels
2. SIGNAL OVERVIEW TABLE
- Real-time technical snapshot: RSI value, ATR, ADX, volume status
- Displays signal confidence score (0-100%)
- Shows volume trend direction
3. RISK MANAGEMENT TABLE
- Current trade direction (Long/Short/None)
- Consecutive losses counter
- Overall win rate
- Last 20 trade outcomes (visual W/L history)
All tables work identically regardless of which strategy is active, providing consistent analytics.
---
USAGE INSTRUCTIONS
Quick Start:
1. Select strategy from "Strategy Mode" dropdown
2. Configure risk (ATR length, SL multiplier)
3. Enable desired TP levels (TP1-TP3 recommended for beginners)
4. Add optional filters to reduce false signals
5. Configure display elements
Recommended Settings:
- Scalping (1m-5m): EMA Fast mode, RSI+ADX filters, TP1-3, SL 0.8-1.0x
- Swing (15m-4H): EMA Standard/Breakout, all filters, TP1-6, SL 1.0-1.5x
- Trend (Daily+): EMA Slow/MACD, ADX filter, TP4-6, SL 1.5-2.0x
---
TECHNICAL IMPLEMENTATION
Pine Script v6
Max Bars Back: 5000
Max Labels: 500
Data Structures:
- Arrays for trade tracking (entry, SL, TP1-6, direction, active status)
- Arrays for visual elements (lines, labels, boxes)
- State variables for signal processing
Performance Optimizations:
- Volume POC recalculated every 5 bars (not every bar)
- FVG/Order Block arrays limited to recent items
- Line extension system prevents excessive line creation
---
CONCLUSION
This script implements a unified trading system with three original innovations:
1. Adaptive confidence-based position sizing
2. Multi-level TP analytics with independent win rate tracking
3. Universal filter integration across all strategies
While standard indicators are used as inputs, the value lies in the proprietary integration and original systems that create intelligent position sizing and data-driven optimization capabilities not found in standard scripts.
---
For questions or access requests, visit the script page on TradingView.
Pristine Adaptive Alpha ScreenerThe Pristine Adaptive Alpha Screener allows users to screen for all of the trading signals embedded in our premium suite of TradingView tools🏆
▪ Pristine Value Areas & MGI
▪ Pristine Fundamental Analysis
▪ Pristine Volume Analysis
💠 Signals Overview
▪ HVY(highest volume in a year) -> Featured in Pristine Volume Analysis
▪ Trend Template -> Inspired by Mark Minervini's famous trend filters
▪ Rule of 100 -> Metrics from Pristine Fundamental Analysis
▪ Bullish 80% Rule -> Featured in Pristine Value Areas & MGI
▪ Bearish 80% Rule -> Featured in Pristine Value Areas & MGI
▪ Break Above VAH -> Featured in Pristine Value Areas & MGI
▪ Break Below VAL -> Featured in Pristine Value Areas & MGI
💠 Signals Decoded
▪ HVY(highest volume in a year)
Volume is an important metric to track when trading, because abnormally high volume tends to occur when a new trend is kicking off, or when an established trend is hitting a climax. Screen for HVY to quickly curate every stock that meets this condition
▪ Trend Template
Mark Minervini's gift to the trading world. Via his book "Think and Trade Like a Stock Market Wizard". Filter for trend template stocks using our tool.
▪ Rule of 100
Pristine Capital's gift to the trading world. The rule of 100 filters for stocks that meet the following condition: YoY EPS Growth + YoY Sales Growth >= 100%
▪ Bullish 80% Rule
If a security opens a period below the value area low , and subsequently closes above it, the bullish 80% rule triggers, turning the value area green. One can trade for a move to the top of the value area, using a close below the value area low as a potential stop!
In the below example, HOOD triggered the bullish 80% rule after it reclaimed the monthly value area!
HOOD proceeded to rally through the monthly value area and beyond in subsequent trading sessions. Finding the first stocks to trigger the bullish 80% rule after a market correction is key for spotting the next market leaders!
▪ Bearish 80% Rule
If a security opens a period above the value area high , and subsequently closes below it, the bearish 80% rule triggers, turning the value area red. One can trade for a move to the bottom of the value area, using a close above the value area high as a potential stop!
ES proceeded to follow through and test the value area low before trending below the weekly value area
▪ Break Above VAH
When a security is inside value, the auction is in balance. When it breaks above a value area, it could be entering a period of upward price discovery. One can trade these breakouts with tight risk control by setting a stop inside the value area! These breakouts can be traded on all chart timeframes depending on the style of the individual trader. Combining multiple timeframes can result in even more effective trading setups.
RBLX broke out from the monthly value area on 4/22/25👇
RBLX proceeded to rally +62.78% in 39 trading sessions following the monthly VAH breakout!
▪ Break Below VAL
When a security is inside value, the auction is in balance. When it breaks below a value area, it could be entering a period of downward price discovery. One can trade these breakdowns with tight risk control by setting a stop inside the value area! These breakouts can be traded on all chart timeframes depending on the style of the individual trader. Combining multiple timeframes can result in even more effective trading setups.
CHWY broke below the monthly value area on 7/20/23👇
CHWY proceeded to decline -53.11% in the following 64 trading sessions following the monthly VAL breakdown!
💠 Metric Columns
▪ %𝚫 - 1-day percent change in price
▪ YTD %𝚫 - Year-to-date percent change in price
▪ MTD %𝚫 - Month-to-date percent change in price
▪ MAx Moving average extension - ATR % multiple from the 50D SMA -Inspired by Jeff Sun
▪ 52WR - Measures where a security is trading in relation to it’s 52wk high and 52wk low. Readings near 100% indicate close proximity to a 52wk high and readings near 0% indicate close proximity to a 52wk low
▪ Avg $Vol - Average volume (50 candles) * Price
▪ Vol RR - Candle volume/ Avg candle volume
Krist1aqq - Premium Signal System (eng)To get the indicator, write to Telegram: @ASTRO_rou
Choose dynamic (ATR) for trading coins from 45 minutes to 1 hour, or static (%) depending on the performance of the current coin.
In TP1 (%) - Static is recommended to replace 1.5 with 1.
Mirpapa_Lib_SwingHighLowLibrary "Mirpapa_Lib_SwingHighLow"
스윙하이/로우 감지 및 관리 라이브러리
_SwingHigh(_price2, _price1, _price)
3개 캔들로 스윙하이 감지 (좌우 1개씩)
Parameters:
_price2 (float) : 2번째 이전 가격 (좌측 캔들)
_price1 (float) : 1번째 이전 가격 (중심 캔들, 스윙하이 후보)
_price (float) : 현재 가격 (우측 캔들)
Returns: bool 스윙하이 여부 (true: 스윙하이, false: 아님)
_SwingHigh(_price3, _price2, _price1, _price)
4개 캔들로 스윙하이 감지 (좌측 2개, 우측 1개)
Parameters:
_price3 (float) : 3번째 이전 가격 (좌측 첫번째)
_price2 (float) : 2번째 이전 가격 (좌측 두번째)
_price1 (float) : 1번째 이전 가격 (중심 캔들, 스윙하이 후보)
_price (float) : 현재 가격 (우측 캔들)
Returns: bool 스윙하이 여부 (true: 스윙하이, false: 아님)
_SwingHigh(_price4, _price3, _price2, _price1, _price)
5개 캔들로 스윙하이 감지 (좌우 2개씩)
Parameters:
_price4 (float) : 4번째 이전 가격 (좌측 첫번째)
_price3 (float) : 3번째 이전 가격 (좌측 두번째)
_price2 (float) : 2번째 이전 가격 (중심 캔들, 스윙하이 후보)
_price1 (float) : 1번째 이전 가격 (우측 첫번째)
_price (float) : 현재 가격 (우측 두번째)
Returns: bool 스윙하이 여부 (true: 스윙하이, false: 아님)
_SwingHigh(_price5, _price4, _price3, _price2, _price1, _price)
6개 캔들로 스윙하이 감지 (좌측 3개, 우측 2개)
Parameters:
_price5 (float) : 5번째 이전 가격 (좌측 첫번째)
_price4 (float) : 4번째 이전 가격 (좌측 두번째)
_price3 (float) : 3번째 이전 가격 (좌측 세번째)
_price2 (float) : 2번째 이전 가격 (중심 캔들, 스윙하이 후보)
_price1 (float) : 1번째 이전 가격 (우측 첫번째)
_price (float) : 현재 가격 (우측 두번째)
Returns: bool 스윙하이 여부 (true: 스윙하이, false: 아님)
_SwingLow(_price2, _price1, _price)
3개 캔들로 스윙로우 감지 (좌우 1개씩)
Parameters:
_price2 (float) : 2번째 이전 가격 (좌측 캔들)
_price1 (float) : 1번째 이전 가격 (중심 캔들, 스윙로우 후보)
_price (float) : 현재 가격 (우측 캔들)
Returns: bool 스윙로우 여부 (true: 스윙로우, false: 아님)
_SwingLow(_price3, _price2, _price1, _price)
4개 캔들로 스윙로우 감지 (좌측 2개, 우측 1개)
Parameters:
_price3 (float) : 3번째 이전 가격 (좌측 첫번째)
_price2 (float) : 2번째 이전 가격 (좌측 두번째)
_price1 (float) : 1번째 이전 가격 (중심 캔들, 스윙로우 후보)
_price (float) : 현재 가격 (우측 캔들)
Returns: bool 스윙로우 여부 (true: 스윙로우, false: 아님)
_SwingLow(_price4, _price3, _price2, _price1, _price)
5개 캔들로 스윙로우 감지 (좌우 2개씩)
Parameters:
_price4 (float) : 4번째 이전 가격 (좌측 첫번째)
_price3 (float) : 3번째 이전 가격 (좌측 두번째)
_price2 (float) : 2번째 이전 가격 (중심 캔들, 스윙로우 후보)
_price1 (float) : 1번째 이전 가격 (우측 첫번째)
_price (float) : 현재 가격 (우측 두번째)
Returns: bool 스윙로우 여부 (true: 스윙로우, false: 아님)
_SwingLow(_price5, _price4, _price3, _price2, _price1, _price)
6개 캔들로 스윙로우 감지 (좌측 3개, 우측 2개)
Parameters:
_price5 (float) : 5번째 이전 가격 (좌측 첫번째)
_price4 (float) : 4번째 이전 가격 (좌측 두번째)
_price3 (float) : 3번째 이전 가격 (좌측 세번째)
_price2 (float) : 2번째 이전 가격 (중심 캔들, 스윙로우 후보)
_price1 (float) : 1번째 이전 가격 (우측 첫번째)
_price (float) : 현재 가격 (우측 두번째)
Returns: bool 스윙로우 여부 (true: 스윙로우, false: 아님)
_SwingCheck(_isType, _price2, _price1, _price)
스윙 타입에 따른 감지 (통합 함수)
Parameters:
_isType (bool) : 스윙 타입 (true: 스윙하이, false: 스윙로우)
_price2 (float) : 2번째 이전 가격
_price1 (float) : 1번째 이전 가격
_price (float) : 현재 가격
Returns: bool 스윙 감지 여부
_CreateSwingBox(priceHigh, priceLow, barIndex, state, swingType)
스윙 박스 생성
Parameters:
priceHigh (float) : 박스 상단 가격
priceLow (float) : 박스 하단 가격
barIndex (int) : 생성 bar_index
state (string) : 스윙 상태 ("BASIC", "SWEEP", "ENTRY")
swingType (string) : 스윙 타입 ("HIGH", "LOW")
Returns: box 생성된 박스 객체
_ExtendSwingBox(boxObj)
박스 우측 확장
Parameters:
boxObj (box) : 박스 객체
Returns: void
_TerminateSwingBox(boxObj)
박스 종료 처리 (색상 변경)
Parameters:
boxObj (box) : 박스 객체
Returns: void
_AddSwingHigh(swingArray, priceHigh, priceLow, barIndex, state)
스윙하이 배열 추가
Parameters:
swingArray (array) : 스윙하이 배열
priceHigh (float) : 고가
priceLow (float) : 저가 (close)
barIndex (int) : 생성 bar_index
state (string) : 상태
Returns: bool 추가 성공 여부
_AddSwingLow(swingArray, priceHigh, priceLow, barIndex, state)
스윙로우 배열 추가
Parameters:
swingArray (array) : 스윙로우 배열
priceHigh (float) : 고가 (close)
priceLow (float) : 저가
barIndex (int) : 생성 bar_index
state (string) : 상태
Returns: bool 추가 성공 여부
_RemoveSwingHighByBarIndex(swingArray, targetBarIndex)
bar_index로 스윙하이 배열 요소 제거
Parameters:
swingArray (array) : 스윙하이 배열
targetBarIndex (int) : 제거할 bar_index
Returns: bool 제거 성공 여부
_RemoveSwingLowByBarIndex(swingArray, targetBarIndex)
bar_index로 스윙로우 배열 요소 제거
Parameters:
swingArray (array) : 스윙로우 배열
targetBarIndex (int) : 제거할 bar_index
Returns: bool 제거 성공 여부
_ExtendSwingHighBoxes(swingArray)
활성 스윙하이 박스들 확장
Parameters:
swingArray (array) : 스윙하이 배열
Returns: void
_ExtendSwingLowBoxes(swingArray)
활성 스윙로우 박스들 확장
Parameters:
swingArray (array) : 스윙로우 배열
Returns: void
_CheckSwingHighBreakout(swingArray, currentHigh, hideBreakoutBox)
스윙하이 돌파 체크 및 종료 처리
Parameters:
swingArray (array) : 스윙하이 배열
currentHigh (float) : 현재 고가
hideBreakoutBox (bool) : 돌파박스 감추기 옵션
Returns: void
_CheckSwingLowBreakout(swingArray, currentLow, hideBreakoutBox)
스윙로우 돌파 체크 및 종료 처리
Parameters:
swingArray (array) : 스윙로우 배열
currentLow (float) : 현재 저가
hideBreakoutBox (bool) : 돌파박스 감추기 옵션
Returns: void
_CleanupTerminatedSwings(swingHighArray, swingLowArray, maxKeepCount)
종료된 스윙들 정리 (메모리 절약)
Parameters:
swingHighArray (array) : 스윙하이 배열
swingLowArray (array) : 스윙로우 배열
maxKeepCount (int) : 유지할 최대 개수
Returns: void
SwingHigh
스윙하이 정보를 저장하는 타입
Fields:
_priceHigh (series float) : 스윙하이 가격 (high)
_priceLow (series float) : 스윙로우 가격 (close)
_barIndexStart (series int) : 생성시 bar_index
_box (series box) : 시각적 박스 객체
_state (series string) : 스윙 상태 ("BASIC", "SWEEP", "ENTRY", "TERMINATED")
SwingLow
스윙로우 정보를 저장하는 타입
Fields:
_priceHigh (series float) : 스윙하이 가격 (close)
_priceLow (series float) : 스윙로우 가격 (low)
_barIndexStart (series int) : 생성시 bar_index
_box (series box) : 시각적 박스 객체
_state (series string) : 스윙 상태 ("BASIC", "SWEEP", "ENTRY", "TERMINATED")
Directional Probability SystemDEVELOPED BY A FORMER GOLDMAN SACHS TRADER
Overview
Assigns a real-time probability of upward or downward continuation, turning historical distributions into forward-looking conviction estimates.
How It Works
Analyzes rolling return distributions and volatility-adjusted price dynamics to compute the probability of the next bar closing higher or lower, conditioned on the current regime.
Use Cases
Quantify confidence before entry
Filter trades — act only when directional probability exceeds a threshold (e.g., 65%)
Blend with Trend Exhaustion to detect when probabilities diverge from momentum strength
Interpretation Example
Example Output:
Upward probability: 72%
Meaning:
Moderate conviction for continuation; may justify partial entry or scaling up
Regime Detection engineDEVELOPED BY A FORMER GOLDMAN SACHS TRADER
Overview
Classifies the market into Trend or Chop environments using a machine-learning Hidden Markov Model.
How It Works
Trained offline on historical returns, volatility, and persistence metrics for each asset and timeframe. Outputs the current regime, trend probability, and expected duration before regime transition.
Use Cases
Disable or reduce trend-following systems during choppy phases
Increase conviction when regime probability confirms trending conditions
Adapt portfolio risk and forecast scaling dynamically
Interpretation Example
Example Output:
Regime: Trend, Probability 82%
Meaning:
Continue trading with directional bias active. If Chop with 68% probability, reduce position size or tighten stops
ML Regime / Covariance Hybrid SystemDEVELOPED BY A FORMER GOLDMAN SACHS TRADER
Overview
The MS-VAR Sensor maps dynamic leader–follower relationships between assets and detects how those connections evolve across market regimes. It combines Vector Autoregression (VAR) — which models how assets influence one another through time — with Markov-Switching state dynamics, allowing the relationships to shift between trend and chop conditions.
How It Works
The system estimates a VAR model across a defined cluster of assets, quantifying how each asset's returns are influenced by lagged returns of others. Then, a two-state Markov-Switching process (Trend vs Chop) determines which regime the system is currently in and adjusts the relationship map accordingly. For each detected pair, the table displays: Leader / Follower (which asset statistically leads and which reacts), Lag (number of bars by which the follower tends to react), Regime (current dominant state), and Prob (probability that the pair is operating within that regime). These relationships are recalculated periodically and refitted on rolling windows, ensuring they adapt to structural changes in cross-asset behaviour.
Use Cases
Anticipatory Trading: Use leader signals to pre-empt moves in followers (e.g., ES1! leads NQ1! by 2 bars)
Regime-Aware Correlation: Identify when normally correlated assets decouple under low-trend probability (chop regime)
Cross-Market Confirmation: Validate directional bias by checking if leadership clusters align with Combined Forecast direction
Signal Gating: In regime-filtered backtests, restrict trading to high-probability trend phases for improved Sharpe ratios
Interpretation Example
Example Output:
ES1! → NQ1! (Lag = 2, Regime = Trend, Prob = 82%) — CL1! → RB1! (Lag = 1, Regime = Trend, Prob = 77%)
Meaning:
Equity index leadership; follow ES1! for early momentum cues. Crude leading refined products; confirms energy cluster coherence.
"Learns which assets lead, which follow, and when those connections matter."
EMAC ForecastDEVELOPED BY A FORMER GOLDMAN SACHS TRADER
Overview
The EMAC Forecast (Exponential Moving Average Composite) measures trend acceleration and deceleration across multiple time constants.
How It Works
Combines several EMAs into a composite signal that adapts to volatility and persistence. Unlike a standard MA crossover, EMAC identifies momentum acceleration rather than lagging confirmation.
Use Cases
Detect early stages of trend ignition
Use in combination with the Combined Forecast for confirmation
Filter short-term noise by weighting smoother long-term components
Interpretation Example
Example Output:
EMAC rising sharply
Meaning:
Acceleration phase; confirms strong directional momentum
PCA SensorDEVELOPED BY A FORMER GOLDMAN SACHS TRADER
Overview
The PCA Sensor isolates the true underlying drivers of market movement by decomposing each asset's return into two parts — the factor (systemic, cluster-driven return) and the residual (asset-specific deviation). It's designed to detect when an asset's price diverges significantly from the behaviour of its correlated group — a signal that often precedes relative mean reversion or catch-up momentum.
How It Works
Using Principal Component Analysis (PCA), the system identifies the dominant return factors within a defined cluster (e.g., equity indices, bonds, metals, FX). Each asset's daily return is then expressed as: Total Return = Factor + Residual. Factor is the portion of return explained by common market drivers (systemic behaviour). Residual is the idiosyncratic return unexplained by those shared factors — the "deviation." The system tracks both components as basis points and percentage share of the total return, giving a clear picture of how much of each asset's movement is market-driven versus unique. When residuals grow large and persistent — especially when mean-reversion conditions are flagged — the system highlights those assets as potential opportunities.
Use Cases
Relative-Value Trades: Identify assets whose residuals deviate significantly from their cluster factor (e.g., long laggards / short leaders)
Cross-Asset Diagnostics: See which markets are currently factor-driven (macro regime dominant) vs. residual-driven (idiosyncratic dispersion)
Volatility & Correlation Monitoring: Detect when residual volatility spikes, signalling reduced correlation within clusters
Timing Mean Reversion: Combine with the Regime Detection Engine — trade reversion only during choppy or transitional regimes
Interpretation Example
Example Output:
ES1! — Factor: +9bp (7.8%), Residual: −107bp (92.2%) → USDJPY — Factor: +26bp (28.6%), Residual: +64bp (71.4%), Mean-Revert = Y
Meaning:
ES1! heavily residual-driven; potential for mean reversion if regime is choppy. USDJPY residual return dominant; watch for pullback or alignment with cluster.
"Quantifies when an asset is moving with the market — and when it's gone off on its own."
Kalman Adaptive Score Overlay [BackQuant]Kalman Adaptive Score Overlay
A powerful indicator that uses adaptive scoring to assess market conditions and trends, utilizing advanced filtering techniques to smooth price data, enhance trend-following precision, and predict future price movements based on past data. It is ideal for traders who need a dynamic and responsive trend analysis tool that adjusts to market fluctuations.
What is Adaptive Scoring?
Adaptive scoring is a technique that adjusts the weight or importance of certain price movements over time based on an ongoing assessment of market behavior. This indicator uses dynamic scoring to assess the strength and direction of price movements, providing insight into whether a trend is likely to continue or reverse. The score is recalculated continuously to reflect the most up-to-date market conditions, offering a responsive approach to trend-following.
How It Works
The core of this indicator is built on advanced filtering methods that smooth price data, adjusting the response to recent price changes. The filtering mechanism incorporates a Kalman filter to reduce noise and improve the accuracy of price signals. Combined with adaptive scoring, this creates a robust framework that automatically adjusts to both short-term fluctuations and long-term trends.
The indicator also uses a dynamic trend-following component that updates its analysis based on the direction of the market, with the option to visualize it through colored candles. When a strong trend is identified, the candles are painted to reflect the prevailing trend, helping traders quickly identify whether the market is in a bullish or bearish state.
Why Adaptive Scoring Is Important
Dynamic Response: Adaptive scoring allows the indicator to respond to changing market conditions. By adjusting its sensitivity to price fluctuations, it ensures that trends are captured accurately, without being overly influenced by short-term noise.
Trend Precision: By combining Kalman filtering with adaptive scoring, the indicator offers a precise and smooth trend-following mechanism. It helps traders stay aligned with the market direction and avoid false signals.
Versatility: The indicator works across multiple timeframes, making it adaptable to different trading strategies, from scalping to long-term trend-following.
Confidence in Market Moves: The adaptive scoring component provides traders with confidence in the strength of the trend, helping them determine when to enter or exit positions with greater certainty.
How Traders Use It
Trend-Following Strategy: Traders can use this indicator to confirm trends and refine their entries and exits. The colored candles and adaptive scoring offer a visual cue of trend strength and direction, making it easier to follow the prevailing market movement.
Multi-Timeframe Analysis: The script supports multi-timeframe analysis, allowing traders to analyze trends and scores across different timeframes (e.g., 1m, 5m, 15m, 30m, 1h, 4h, 12h). This is useful for traders who want to confirm trends on both short and long-term charts before making a trade.
Refining Entry Points: By utilizing the adaptive scoring, traders can identify potential entry points where the score indicates a high probability of trend continuation. Higher scores signal stronger trends, guiding decision-making.
Managing Risk: Traders can use the adaptive scoring system to assess trend stability and adjust their risk management strategies accordingly. For example, higher confidence in the trend allows for larger positions, while lower confidence may require smaller, more cautious trades.
Key Features and Benefits
Kalman Filter for Noise Reduction: The Kalman filter helps to smooth out market noise and allows for a clearer understanding of the underlying price movements. This is particularly useful in volatile markets where short-term fluctuations can cloud trend analysis.
Adaptive Scoring for Flexibility: Adaptive scoring ensures that the indicator remains responsive to changing market conditions. It automatically adjusts to the strength of price movements, enabling better detection of trends and reversals.
Visual Trend Signals: The indicator provides visual signals through candle coloring, making it easier to identify whether the market is in a bullish, neutral, or bearish phase.
Multi-Timeframe Display: The indicator’s multi-timeframe feature allows traders to see the trend and adaptive score on different timeframes simultaneously, providing a comprehensive view of the market.
Customizable Settings: Traders can customize the indicator’s settings, such as the filter parameters, scoring thresholds, and visualization options, tailoring it to their specific trading style and strategy.
Why This is Important for Traders
Improved Decision Making: The adaptive nature of the scoring system allows traders to make more informed decisions based on real-time market data, without being influenced by past volatility.
Market Clarity: By smoothing out price movements and scoring trends adaptively, the indicator provides a clearer picture of market behavior, which is essential for effective trend-following and timing entries and exits.
Increased Confidence in Signals: Adaptive scoring ensures that signals are based on the current market structure, reducing the likelihood of false positives. This boosts traders' confidence when acting on signals.
Conclusion
The Kalman Adaptive Score Overlay offers a dynamic and responsive trend-following tool that integrates Kalman filtering with adaptive scoring. By adjusting to market fluctuations in real time, it allows traders to identify and follow trends with greater precision. Whether you are trading on short or long timeframes, this tool helps you stay aligned with market momentum, ensuring that your entries and exits are based on the most up-to-date and reliable data available.
Cross-Sectional Relative MomentumDEVELOPED BY A FORMER GOLDMAN SACHS TRADER
Overview
The Cross-Sectional Momentum / Relative Value System measures and ranks assets against each other in real time to identify leaders (assets showing relative strength) and laggards (assets underperforming their cluster). It provides an institutional-style snapshot of relative momentum across a defined universe — highlighting where capital is flowing and where mean-reversion potential is building.
How It Works
The system continuously evaluates a cluster of correlated assets — such as FX pairs, equity indices, or commodities — and computes each instrument's standardized forecast value (typically scaled between −20 and +20). This creates a dispersion map of momentum within the group: When dispersion expands (the gap between leaders and laggards widens), it signals a momentum regime: markets are trending and leadership is clear. When dispersion compresses, it indicates convergence and an increased likelihood of mean-reversion. Each asset is then tagged dynamically as Leader or Laggard, based on its position within the cluster's distribution. This ranking helps you visualise market structure — which assets are driving the move and which are trailing.
Use Cases
Rotational Strategies: Shift exposure toward top-ranked assets (leaders) while fading underperformers (laggards)
Leadership Transitions: Detect when leadership flips (e.g., GBPUSD moving from laggard to leader), signalling rotation or regime change
Portfolio Diversification: Balance exposures by ensuring allocation across uncorrelated or complementary clusters
Confirmation Tool: Combine with regime or volatility systems to determine when relative momentum is statistically significant (momentum phase) or mean-reverting (consolidation phase)
Interpretation Example
Example Output:
Leader Assets: GBPCHF (+8.8), GBPUSD (+2.7) — Laggard Assets: EURUSD (−2.9), USDCAD (−3.6)
Meaning:
This configuration suggests GBP-linked strength relative to USD-linked weakness — a cross-pair rotation opportunity
"Ranks assets by strength and timing — revealing where leadership, rotation, and mean-reversion are statistically emerging."






















