Swing Structure Bands [ChartPrime]⯁ OVERVIEW
Swing Structure Bands is a structure-based trend and reaction indicator that builds adaptive price bands directly from swing highs and swing lows.
Instead of using fixed-length moving averages, the bands dynamically adjust their length based on how long price has been forming higher highs or lower lows, allowing the indicator to naturally align with real market structure.
This makes the tool especially effective for identifying swing-based support and resistance, trend continuation zones, and exhaustion reactions.
⯁ CORE CONCEPT
The indicator continuously tracks:
The most recent swing high and swing low over a configurable swing window.
How long price has been developing since each swing point.
Dynamic moving averages whose length grows with the swing itself.
As long as price respects the current swing direction, the bands extend and adapt.
When structure breaks, the system resets and starts forming new swing-based bands.
⯁ SWING DETECTION LOGIC
A Swing High is detected when price forms a local maximum relative to the swing lookback.
A Swing Low is detected when price forms a local minimum relative to the swing lookback.
Direction flips when price transitions from forming highs to forming lows, or vice versa.
Each confirmed swing is marked on the chart, giving clear structural context.
⯁ ADAPTIVE BAND CONSTRUCTION
Upper bands are derived from swing highs.
Lower bands are derived from swing lows.
Band length dynamically increases as the swing develops.
Multiple MA types can be used (SMA, EMA, SMMA/RMA, WMA, VWMA).
ATR is applied as an offset to create upper and lower envelopes around each band, forming a volatility-aware structure channel.
⯁ VOLATILITY FILTERING
If the band moves too aggressively relative to ATR, it is temporarily disabled.
This prevents unstable or noisy bands during sudden expansions.
Bands only remain active when price structure is stable.
This logic keeps the indicator focused on meaningful swings rather than short-term spikes.
⯁ REACTION & SIGNAL LOGIC
Sell signals appear when price crosses down from the upper swing band after sufficient stabilization.
Buy signals appear when price crosses up from the lower swing band after sufficient stabilization.
Cooldown logic prevents signal clustering.
Signals are designed as structure reactions , not momentum breakouts.
⯁ VISUAL STRUCTURE CLARITY
Separate bullish and bearish bands with customizable colors.
Optional band envelopes for visual depth.
Clear swing labels marking structural turning points.
Diamond markers highlight reaction zones.
The visualization emphasizes where price reacts to structure rather than where it accelerates.
⯁ HOW TO USE
Use upper bands as dynamic resistance during bearish or corrective phases.
Use lower bands as dynamic support during bullish phases.
Combine band reactions with higher-timeframe trend direction.
Look for confirmations near bands rather than mid-range entries.
The indicator works best as a structure framework rather than a standalone signal generator.
⯁ IDEAL MARKET CONDITIONS
Trending markets with clear swing development.
Markets transitioning from impulse to correction.
Crypto, forex, indices, and liquid stocks.
⯁ CONCLUSION
Swing Structure Bands offers a structurally grounded alternative to traditional moving average channels.
By anchoring bands to real swing behavior and adapting dynamically over time, it provides traders with a clearer view of where price is reacting, pausing, or potentially reversing within the broader market structure.
Indicateurs et stratégies
BuyLow SellHigh Bands | ProjectSyndicate________________________________________
📊 BuyLow SellHigh (BLSH) Bands
Comprehensive Trading Guide – by ProjectSyndicate
________________________________________
🔰 1. Introduction
The BuyLow SellHigh (BLSH) Bands indicator is a powerful technical analysis tool designed for the TradingView platform. Works with any symbol. Gold/FX/indices/oil/crypto/stocks.
It provides traders with a clear, visual representation of:
• 📈 Overbought conditions
• 📉 Oversold conditions
This makes it easier to identify high-probability entry and exit points.
The indicator is built on:
• Dynamic price channels
• Fibonacci-based zones
• Color-coded market structure
💡 While the BLSH Bands can be used on Forex, Crypto, and Futures, this guide focuses on Gold (XAUUSD) using:
• M5
• M15
• M30 timeframes
________________________________________
🧠 2. Core Concepts
The BLSH Bands structure is created using two key components:
________________________________________
📐 Dynamic Price Bands
• Upper and lower bands are calculated using the highest high and lowest low
• Based on a user-defined lookback period (fiboPeriod)
• Reflects recent volatility and price range
This creates a self-adjusting channel that adapts to market conditions.
________________________________________
🧮 Fibonacci Zones
The space between the bands is divided into six Fibonacci-based zones:
• 0.786
• 0.618
• 0.500
• 0.382
• 0.214
⚠️ These are not traditional retracements — they are used to grade price extremity within the channel.
________________________________________
🎨 Color-Coded Zones Overview
Zone (Fib Level) Color Market Condition Interpretation
1.000 – 0.786 🔴 Red Extreme Overbought High reversal / pullback probability
0.786 – 0.618 🟠 Orange Overbought Selling pressure building
0.618 – 0.500 🟡 Yellow Mildly Overbought Bullish momentum weakening
0.500 – 0.382 🟢 Aqua Mildly Oversold Bearish momentum weakening
0.382 – 0.214 🔵 Deep Sky Blue Oversold Strong buying interest
0.214 – 0.000 🔷 Blue Extreme Oversold High bounce / reversal probability
🖤 Solid black separator lines ensure clean visual separation between zones for precise price location.
________________________________________
🪙 3. Trading Strategies for XAUUSD (Gold)
Gold’s volatility and respect for technical levels make it ideal for BLSH Bands strategies.
________________________________________
⚡ M5 Timeframe – Scalping Strategy
Designed for fast mean-reversion trades from extreme zones.
🟢 BUY Setup
• Price enters Extreme Oversold (Blue) zone
• Bullish confirmation candle appears:
o Hammer
o Bullish engulfing
• Enter BUY
🔴 SELL Setup
• Price enters Extreme Overbought (Red) zone
• Bearish confirmation candle appears:
o Shooting star
o Bearish engulfing
• Enter SELL
🎯 Take Profit:
• Median band (between Yellow & Aqua)
🛑 Stop Loss:
• Just outside the outer band
________________________________________
📆 M15 Timeframe – Day Trading Strategy
Balanced timeframe for higher-probability reversals.
🟢 BUY Setup
• Price enters Oversold (Blue / Deep Sky Blue)
• Strong bullish reversal candle closes back inside bands
• Enter BUY after close
🔴 SELL Setup
• Price enters Overbought (Red / Orange)
• Bearish reversal candle closes back inside bands
• Enter SELL after close
🎯 Take Profit (Multi-Target):
1. Median band
2. Opposite extreme band
🛑 Stop Loss:
• Beyond high/low of confirmation candle
________________________________________
🔄 M30 Timeframe – Swing Trading Strategy
Used for identifying major swing points.
🔍 Trend Filter
• Use 100 or 200 EMA
• Trade only in trend direction
🟢 Uptrend
• Buy pullbacks into Oversold zones
🔴 Downtrend
• Sell rallies into Overbought zones
📉 Confirmation:
• Band rejection
• RSI or MACD divergence
🎯 Take Profit:
• Previous structure levels
• Opposite band extreme
🛑 Stop Loss:
• Below / above recent swing high or low
________________________________________
🚨 4. Alerts System
Alerts are disabled by default to keep charts clean.
✅ How to Enable
• Open indicator settings
• Check “Enable Alerts”
________________________________________
🔔 Available Alerts
🔴 Overbought Alert
• Trigger: Price crosses above 0.786
• Message:
🔴 SELL SIGNAL: Price entered Overbought Zone – Consider selling or taking profits
🟢 Oversold Alert
• Trigger: Price crosses below 0.214
• Message:
🟢 BUY SIGNAL: Price entered Oversold Zone – Consider buying or entering long
________________________________________
⏱ Alert Spacing Logic
• Default: 20/50 bars
• Prevents repeated alerts in choppy markets
• Filters for higher-quality signals
________________________________________
⚙️ 5. Customization Settings
Adjust the indicator in the Settings panel:
🔧 Core Inputs
• fiboPeriod → Band sensitivity
• extremes → Price source (High/Low or Close)
🔔 Alert Controls
• Enable / disable alerts
• Separate control for overbought & oversold
• Alert spacing (bars)
________________________________________
⭐ How You Can Support ProjectSyndicate (3 Steps)
1. ✅ Click “Add to Favorites” to save this script to your TradingView Favorites
2. 🔎 Check out our other scripts to complete your SMC toolkit
3. 👤 Follow ProjectSyndicate for the latest updates, upgrades, and new releases
________________________________________
⚠️ 6. Disclaimer
Trading involves significant risk and may not be suitable for all traders.
This indicator is a decision-support tool, not a standalone trading system.
Always apply:
• Proper risk management
• Additional confirmations
• Sound trading discipline
📉 Past performance does not guarantee future results.
Gamma of Gamma - AnticipationGamma of Gamma — Anticipation Engine
What if you could detect market inflections before they become obvious? Not react to momentum — anticipate the momentum itself.
"Gamma here refers to mathematical acceleration (2nd derivative), NOT options Gamma"
Gamma of Gamma (GoG) operates one abstraction layer above conventional indicators. While RSI tells you what momentum did , GoG tells you what momentum is about to do . This is the difference between chasing price and positioning ahead of it.
Core Innovation: Traditional indicators measure first-order effects (price change) or second-order effects (momentum/acceleration). This system measures the third derivative — the rate of change of acceleration itself. When Gamma-of-Gamma reaches extremes, it signals that pressure dynamics are about to flip — often 2-5 bars before price visibly reacts.
Target Users: Discretionary traders, scalpers, and swing traders who want early positioning signals with statistical rigor. Effective on stocks, crypto, forex, and futures with meaningful volume data.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WHY THIRD-DERIVATIVE ANALYSIS?
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The Hierarchy of Market Information
Most traders operate at the wrong level of abstraction:
• Price → What happened (lagging)
• Momentum → How fast it happened (still lagging)
• Gamma (2nd Derivative) → How momentum is changing (coincident)
• Gamma of Gamma (3rd Derivative) → How FAST that change is changing ( leading )
The third derivative captures inflection acceleration — the mathematical signature of regime transition. When GoG reaches extreme values, the market is telegraphing that current pressure dynamics are unsustainable.
Why This Beats RSI
RSI measures momentum magnitude. GoG measures momentum trajectory .
Consider this scenario: RSI reads 70 (overbought). Is the move exhausted or just getting started? RSI cannot tell you. GoG can — because it measures whether buying pressure is accelerating into the high RSI reading (continuation likely) or decelerating despite high RSI (reversal imminent).
RSI answers: "How strong was the move?"
GoG answers: "Is the move strengthening or weakening right now ?"
The first is historical. The second is predictive.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
MATHEMATICAL FOUNDATION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Layer 1: Cumulative Volume Delta (CVD)
The foundation is order flow approximation:
• Up bar (close > prior close): Volume classified as buying pressure
• Down bar (close < prior close): Volume classified as selling pressure
• CVD = Running sum of signed volume
Interpretation: Rising CVD indicates net aggressive buying. Falling CVD indicates net aggressive selling. CVD divergence from price often precedes reversals.
Layer 2: Gamma (Second Derivative)
Gamma measures acceleration of order flow:
Formula: Gamma = CVD - 2×CVD + CVD
This is the discrete second derivative — the rate of change of the rate of change. When Gamma spikes positive, buying pressure is accelerating . When Gamma spikes negative, selling pressure is accelerating.
Layer 3: Gamma of Gamma (Third Derivative)
GoG measures jerk — the acceleration of acceleration:
Formula: GoG = Gamma - 2×Gamma + Gamma
Critical insight: Extreme GoG readings indicate that current pressure dynamics are reaching an inflection point. The system is "overextended" in its current trajectory and will likely revert or reverse.
Layer 4: Z-Score Normalization
Raw GoG values are normalized against their 50-period distribution:
Formula: GoG_Z = (GoG - Mean_50) / StdDev_50
Benefit: Z-scores are regime-adaptive. A "2.0" reading always means "2 standard deviations from normal" regardless of whether you're trading a penny stock or ES futures. This makes thresholds consistent across instruments and timeframes.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SIGNAL GENERATION LOGIC
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Long Signal (Bullish Anticipation)
Triggers when:
• GoG Z-score < -Threshold (default -2.0)
• Volume > Average Volume × Minimum Multiple (default 1.2×)
Interpretation: Selling pressure acceleration has reached an extreme negative reading. The selling is "exhausting itself" — acceleration is peaking and will soon decelerate. Buyers are likely to step in.
Short Signal (Bearish Anticipation)
Triggers when:
• GoG Z-score > +Threshold (default +2.0)
• Volume > Average Volume × Minimum Multiple (default 1.2×)
Interpretation: Buying pressure acceleration has reached an extreme positive reading. The buying is "exhausting itself" — often occurs at blow-off tops, failed breakouts, or momentum climaxes.
Why Volume Confirmation?
Gamma acceleration in thin liquidity is meaningless noise. The volume filter ensures signals occur only when meaningful participation backs the pressure dynamics. This dramatically reduces false signals during low-activity periods.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CONFIDENCE ENGINE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Not all signals are equal. The Confidence Engine quantifies signal strength:
Confidence Calculation:
Confidence = 50 + ((|Z-Score| - Threshold) / Threshold) × 100
Capped at 100%
Visual Representation:
• Small orb = Low confidence (50-65%)
• Normal orb = Medium confidence (65-80%)
• Large orb = High confidence (80-100%)
Orb transparency also adjusts — high-confidence signals appear brighter and more prominent. This creates intuitive visual hierarchy where stronger signals demand more attention.
Practical Use:
• High confidence (>80%): Consider larger position size, tighter stops
• Medium confidence (50-80%): Standard position size
• Low confidence (<50%): Reduced size or wait for confirmation
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
INTEGRATED BACKTESTER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Every signal system needs accountability. The onboard backtester provides real-time performance tracking:
Core Metrics:
• Total Trades
• Win Rate
• Profit Factor
• Expectancy (average P&L per trade)
• Net P&L
• Max Drawdown
• Average Win / Average Loss
Methodology:
• Positions held for configurable bar count (default 10 bars)
• Forces objective evaluation independent of discretionary exits
• Updates in real-time as new trades complete
Optimizer Mode:
Enable for parameter tuning research:
• Stability Score (0-100 points): Composite evaluation of parameter robustness
• Trade Density : Signals per 1000 bars — monitors over/under-trading
• Parameter Display : Current settings for documentation
• Robustness Rating : ROBUST / STABLE / FRAGILE / OVERFIT
Stability Scoring Breakdown:
• Win Rate ≥55%: +25 points | ≥50%: +15 points | ≥45%: +5 points
• Expectancy >0.5%: +25 points | >0.1%: +15 points | >0%: +5 points
• Total Trades ≥30: +25 points | ≥20: +15 points | ≥10: +5 points
• Profit Factor ≥1.5: +25 points | ≥1.2: +15 points | ≥1.0: +5 points
Target: 60+ points indicates stable parameters. Below 40 suggests overfitting risk.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CHART EXECUTION SIGNALS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Unique feature: Entry and exit markers display directly on the price chart via force_overlay, even though the indicator runs in a separate pane.
Visual Markers:
• ▲ Green Triangle (below bar): Long entry at exact price level
• ▼ Red Triangle (above bar): Short entry at exact price level
• ✕ Gold X-Cross : Position exit after hold period
Benefit: Immediate visual correlation between GoG signals and price action. Review historical trades without switching between panes.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
DUAL DASHBOARD SYSTEM
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Main Dashboard — Real-Time State
Displays:
• Current GoG regime (EXTREME HIGH / EXTREME LOW / NEUTRAL)
• GoG Z-Score (numerical)
• Raw GoG value
• Gamma value
• CVD (Cumulative Volume Delta)
• Volume status (Active/Low with ratio)
• Signal state (Scanning / Long Signal / Short Signal / In Position)
• Confidence meter with visual bar
• Entry price when in position
Backtest Dashboard — Performance Metrics
Displays all backtester metrics in compact format. Switches to Optimizer view when Optimizer Mode enabled.
Both dashboards feature:
• Configurable position (6 locations including Middle Left/Right)
• Adjustable text size (Tiny/Small/Normal/Large)
• Transparency control for visual integration
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PARAMETER GUIDE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Calculation Settings
• GoG Extreme Threshold (default 2.0): Z-score level for signal generation. Higher = fewer but stronger signals. Range: 0.5-5.0
• Gamma Smoothing (default 3): SMA period for Gamma. Lower = more responsive, more noise. Higher = smoother, more lag. Range: 1-20
• GoG Smoothing (default 5): SMA period for GoG. Filters micro-spikes while preserving structural inflections. Range: 1-20
• Min Volume Multiple (default 1.2): Volume must exceed this multiple of 20-period average. Ensures signals have participation backing. Range: 0.5-3.0
Backtester Settings
• Backtest Hold Bars (default 10): Forced holding period for backtester evaluation. Adjust based on timeframe and trading style.
• Parameter Optimizer Mode : Enables extended metrics for tuning research.
Tuning by Timeframe
Scalping (1-5 min):
Threshold: 1.5-2.0 | Gamma Smooth: 2-3 | GoG Smooth: 3-4 | Hold: 5-8 bars
Day Trading (15-60 min):
Threshold: 2.0-2.5 | Gamma Smooth: 3-5 | GoG Smooth: 5-7 | Hold: 8-12 bars
Swing Trading (4H-Daily):
Threshold: 2.5-3.0 | Gamma Smooth: 5-7 | GoG Smooth: 7-10 | Hold: 10-15 bars
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
HOW TO USE: PRACTICAL WORKFLOW
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Step 1: Identify Regime
Watch the GoG Z-score line. Most of the time it oscillates within the neutral zone (between thresholds). This is "scanning" mode — no actionable signal.
Step 2: Wait for Extreme
When Z-score crosses threshold AND volume confirms, a signal fires. The orb appears in the indicator pane; the triangle appears on price chart.
Step 3: Assess Confidence
Check orb size and dashboard confidence reading:
• Large bright orb + 80%+ confidence = High conviction setup
• Small faint orb + <60% confidence = Requires additional confirmation
Step 4: Execute with Context
GoG signals anticipate — they don't confirm. Use price structure (support/resistance), higher timeframe trend, or other confirmation before entry.
Step 5: Manage Position
Exit markers show backtester exits. For live trading, consider:
• Time-based exit (signal's hold period)
• Opposite signal exit
• Fixed R:R targets
Step 6: Review Performance
Check Backtest Dashboard regularly. If Win Rate drops below 45% or Expectancy goes negative, reassess parameters or market conditions.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WHAT THIS INDICATOR IS — AND ISN'T
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
This Indicator IS:
✅ State-transition detector (balance → imbalance)
✅ Early warning system for momentum shifts
✅ Anticipation tool for pre-positioning
✅ Statistical framework with built-in accountability
This Indicator IS NOT:
❌ Mechanical buy/sell system (requires discretion)
❌ Trend-following indicator
❌ Reversal-only indicator
❌ Replacement for risk management
Best Use Cases:
• Detecting early reversals before obvious confirmation
• Anticipating breakouts during volatility compression
• Timing pullback entries in established trends
• Identifying exhaustion at momentum climaxes
Challenging Conditions:
• Extremely low volume environments
• News-driven gaps (no order flow to measure)
• Instruments with unreliable volume data
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ORIGINALITY STATEMENT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Innovation 1: Third-Derivative Order Flow Analysis
While first and second derivatives are common, applying third-derivative (jerk) analysis to cumulative volume delta is novel. This captures inflection points that lower-order analysis misses entirely.
Innovation 2: Z-Score Adaptive Thresholds
Rather than fixed thresholds that require per-instrument tuning, z-score normalization creates self-adapting signal levels that work consistently across any liquid instrument.
Innovation 3: Confidence-Weighted Visual System
Dynamic orb sizing and transparency based on signal strength provides intuitive visual hierarchy. Stronger signals literally appear larger and brighter.
Innovation 4: Integrated Accountability
Built-in backtester with optimizer mode enables parameter validation directly on chart. No external tools or spreadsheets required.
Innovation 5: Dual-Pane Execution Visualization
Force-overlay chart signals bridge the gap between indicator pane and price action, enabling immediate visual trade review.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
LIMITATIONS & DISCLAIMERS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Technical Limitations
• Volume classification uses bar direction (close vs prior close), not tick-level aggressor data. Precision loss estimated 10-15% vs institutional-grade data.
• CVD approximation assumes volume follows price direction. Works well in trending conditions; less precise in choppy markets.
• Backtester uses fixed hold period, not optimal exit logic. Real performance may vary with proper trade management.
Market Limitations
• Requires meaningful volume data. Avoid instruments with reported volume issues.
• Signals may cluster during high-volatility events. Not every signal should be traded.
• Anticipation signals appear early by design. Patience required — price may continue against signal briefly before reversing.
Risk Disclosure
• Trading involves risk of loss. Past performance does not guarantee future results.
• This indicator provides analysis tools, not financial advice.
• Always use proper position sizing and risk management.
• Backtest results are hypothetical and do not include slippage, commissions, or fees.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
RECOMMENDED SETTINGS BY MARKET
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Crypto (BTC, ETH, SOL)
Threshold: 1.8-2.2 | Gamma: 3 | GoG: 5 | Volume: 1.3x | TF: 15min-4H
Notes: Higher volatility produces more signals. Consider higher threshold to filter.
Forex Majors (EURUSD, GBPUSD)
Threshold: 2.0-2.5 | Gamma: 4 | GoG: 6 | Volume: 1.2x | TF: 5min-1H
Notes: Lower volatility requires patience. Volume proxy via tick volume works adequately.
Stocks (Large Cap)
Threshold: 2.0-2.5 | Gamma: 3-4 | GoG: 5-6 | Volume: 1.2x | TF: 15min-Daily
Notes: Real volume data provides cleanest signals. Watch for opening/closing auction distortions.
Futures (ES, NQ, CL)
Threshold: 2.0-2.3 | Gamma: 3 | GoG: 5 | Volume: 1.2x | TF: 5min-1H
Notes: Excellent volume data. Session boundaries may produce false signals — consider RTH only.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CONCLUSION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Gamma of Gamma represents a fundamental shift in signal philosophy: from reacting to momentum to anticipating momentum.
By operating at the third derivative of order flow, this system detects the mathematical signatures of regime transition — the moments when current pressure dynamics become unsustainable and reversal becomes probable.
This is not another oscillator telling you what already happened. This is an anticipation engine positioning you for what's about to happen.
Stop chasing. Start anticipating.
RSI tells you where momentum was. GoG tells you where it's going.
Taking you to school. - Dskyz , Trade with probability. Trade with anticipation. Trade with GoG
Regression Slope Oscillator [BigBeluga]🔵 OVERVIEW
The Regression Slope Oscillator is a trend–momentum tool that applies multiple linear regression slope calculations over different lookback ranges, then averages them into a single oscillator line. This design helps traders visualize when price is extending beyond typical regression behavior, as well as when momentum is shifting up or down.
🔵 CONCEPTS
Regression Slope – Measures the steepness and direction of price trends over a selected length.
f_log_regression(src, length) =>
float sumX = 0.0
float sumY = 0.0
float sumXSqr = 0.0
float sumXY = 0.0
for i = 0 to length - 1
val = math.log(src )
per = i + 1.0
sumX += per
sumY += val
sumXSqr += per * per
sumXY += val * per
slope = (length * sumXY - sumX * sumY) / (length * sumXSqr - sumX * sumX)
slope*-1
Multi–Sample Averaging – Instead of relying on one regression slope, the indicator loops through many lengths (from Min Range to Max Range with Step increments) and averages their slopes.
multiSlope(length)=>
// Get regression slope
slope = f_log_regression(close, length)
slopAvg.push(slope)
for i = minRange to maxRange by step
multiSlope(i)
Color Gradient – The oscillator and candles are colored dynamically from oversold (orange) to overbought (aqua), based on slope extremes observed within the user–defined Color Range.
Trend Oscillation – When the oscillator rises, price trend is strengthening; when it falls, momentum weakens.
🔵 FEATURES
Calculates regression slopes across a user–defined range (e.g., 10–100 with steps of 5).
Averages all sampled slopes into a single oscillator line.
Dynamic coloring of oscillator and chart candles based on slope values.
User–controlled Color Range :
High values (e.g., 50–100) → interpret as overbought vs oversold zones.
Low values (e.g., 2–5) → interpret as slope rising vs falling momentum shifts.
Dashboard table (top–right) displaying number of slope samples and current averaged slope value.
Candle coloring mode (optional) – candles take on the oscillator gradient color for at–a–glance reading of trend bias.
Signal Line (SMA) – A moving average of the slope oscillator used to identify momentum reversals.
Bullish Reversal Signal – Triggered when the oscillator crosses above the signal line while below zero, indicating downside momentum exhaustion and potential trend recovery.
Bearish Reversal Signal – Triggered when the oscillator crosses below the signal line while above zero, indicating upside momentum exhaustion and potential trend rollover.
Dual Placement Signals – Reversal signals are plotted both:
On the oscillator pane (for momentum context)
On the price chart (for execution alignment)
Confirmation Logic – Signals are only printed on confirmed bars to reduce repainting and false triggers.
🔵 HOW TO USE
Watch the oscillator cross above/below zero: signals shifts in regression slope direction.
Use the signal line crossovers near zero to identify early trend reversals.
Use high Color Range settings to identify potential overbought/oversold extremes in trend slope.
Use low Color Range settings for a faster, momentum–driven color change that tracks slope rising/falling.
Candle coloring highlights short–term trend pressure in sync with the oscillator.
Combine reversal signals with structure, support/resistance, or volume for higher–probability entries.
🔵 CONCLUSION
The Regression Slope Oscillator transforms raw regression slope data into a smooth, color–coded oscillator. By averaging across multiple regression lengths, it avoids the noise of single–range analysis while still capturing trend extensions and momentum shifts.
With the addition of signal line crossovers and confirmed reversal markers, the indicator now provides both trend context and actionable momentum signals within a single regression-based framework.
Professional Price Action AnalysisProfessional Price Action Analysis - Advanced S/R & Pattern Detection
A comprehensive technical analysis tool combining dynamic support/resistance zones, candlestick pattern recognition, trend analysis, and volume insights.
KEY FEATURES:
✓ Dynamic Support & Resistance Zones
- Automatically identifies swing highs/lows
- Classifies levels based on current price position
- Support zones display BELOW price (green)
- Resistance zones display ABOVE price (red)
- Adjustable zone thickness and lookback period
✓ Candlestick Pattern Detection
- Bullish/Bearish Engulfing patterns
- Pin bars (reversal signals)
- Inside bars (consolidation)
- Rejection candles (wick analysis)
- Visual markers on chart with labels
✓ Trend Analysis
- Customizable moving average (default 50-period SMA)
- Background color zones for trend direction
- Price vs MA percentage calculation
- Bullish/Bearish/Neutral classification
✓ Volume Analysis
- Volume spike detection (configurable multiplier)
- Highlights unusual volume with bar colors
- Helps identify institutional activity
✓ Information Dashboard
- Clean, readable display (top-right corner)
- Current trend status
- Distance to nearest support/resistance
- Volume status (High/Normal)
- Price deviation from moving average
✓ Alert System
- Alerts for all candlestick patterns
- Volume spike notifications
- Customizable alert conditions
CUSTOMIZABLE INPUTS:
• Swing detection length (3-50 bars)
• S/R lookback period (20-200 bars)
• Zone thickness percentage
• Maximum zones displayed
• Trend MA length
• Volume spike multiplier
• Toggle individual pattern types
BEST FOR:
- Swing traders identifying key levels
- Day traders spotting reversal patterns
- Price action enthusiasts
- Multi-timeframe analysis
This indicator does not repaint. All signals are confirmed after candle close. Suitable for all markets: stocks, forex, crypto, commodities.
Educational tool for technical analysis. Not financial advice.
Polynomial Trend Exhaustion & DivergencePolynomial Trend Exhaustion & Divergence
Overview
This indicator combines advanced polynomial regression analysis with momentum-based exhaustion detection and forecast-based divergence signals. It identifies potential trend reversals by analyzing when price momentum is fading (exhaustion) and when price direction conflicts with the mathematical trajectory projected by cubic polynomial forecasting (divergence).
The system uses optional source smoothing (Linear Regression Blend or Kalman filtering) to reduce noise before analysis, then applies two independent detection methods to generate high-probability reversal warnings.
Exhaustion Detection
What it detects: Trend exhaustion occurs when price is still moving in one direction but the underlying momentum is weakening—a classic early warning of potential reversal.
How it works:
The indicator calculates either a cubic polynomial regression or Kalman filter trend, then monitors the slope of that trend line. Exhaustion is detected when:
Bullish Exhaustion: The slope is positive (uptrend) but the rate of change of the slope is negative (momentum decelerating)
Bearish Exhaustion: The slope is negative (downtrend) but the rate of change of the slope is positive (momentum decelerating)
Signal filtering:
Consecutive Bars Required: Exhaustion conditions must persist for a configurable number of bars before triggering
Max Repeat Signals: Limits how many consecutive exhaustion signals can fire to prevent clustering
Cooldown Period: After hitting the max signal limit, the indicator pauses before allowing new signals
This produces clean, actionable warnings rather than noise during extended exhaustion phases.
Divergence Detection
What it detects: Divergence signals identify when the polynomial-projected future price path conflicts with current price direction—suggesting price may be overextended and due for a correction toward the forecast.
How it works:
The indicator fits a cubic polynomial to recent price data and extrapolates it forward by a configurable number of bars. It then compares:
Current price direction (rising or falling over the lookback period)
Forecast position (above or below current price)
Divergence triggers when:
Bullish Divergence: Price is falling but the polynomial forecast is above current price (suggesting upward reversion)
Bearish Divergence: Price is rising but the polynomial forecast is below current price (suggesting downward reversion)
Signal filtering:
Minimum Divergence (ATR): The forecast must be at least X ATRs away from price
Minimum Price Movement (ATR): Price must have moved at least X ATRs over the lookback period (filters out sideways noise)
Consecutive Bars Required: Divergence conditions must persist for X bars before triggering
Cooldown Period: Minimum bars between divergence signals of the same type
Key Features
Dual trend methods: Choose between Polynomial Regression or Kalman filtering for the base trend calculation
Source smoothing options: None, LinReg Blend, or Kalman filter applied to OHLC data before analysis
ATR-normalized thresholds: All filter thresholds adapt to current volatility
Anti-clustering logic: Built-in repeat limits and cooldowns prevent signal spam during extended conditions
Full alert support: All four signal types (Bull/Bear Exhaustion, Bullish/Bearish Divergence) have dedicated alert conditions
Advanced Market Structure [Rogman]Rogman's Advanced Market Structure Indicator
The Ultimate All-in-One Market Structure Analysis Tool for TradingView
Take your technical analysis to the next level with a comprehensive, professional-grade tool designed for traders who demand precision and clarity in their charts.
🎯 Who Is This For?
ICT/SMC Traders seeking liquidity zones and market structure analysis
Day Traders monitoring session-based price action and kill zones
Swing Traders identifying key higher timeframe levels
Price Action Traders analyzing structure breaks and trend changes
Any Serious Trader wanting a clean, comprehensive market structure overlay
✨ Key Features
📊 Market Sessions Visualization
Track the three major trading sessions with our unique bracket-style display:
Asia, London, and New York sessions are clearly marked
Sessions display as SESSION ════════════ below price action
Smart vertical stacking prevents overlapping when sessions have similar lows
Fully customizable session times for any timezone
Perfect for identifying session highs/lows and optimal kill zone timing
📈 Higher Timeframe (HTF) Levels
Never miss a key level again:
Display Daily and Weekly Open, High, and Low levels
Instant visual reference for HTF support and resistance
Separate color controls for lines and labels
Choose from Solid, Dashed, or Dotted line styles
Essential for determining HTF bias and key decision points
🔄 Automatic Swing Detection
Let the indicator do the heavy lifting:
Auto-detection of swing highs (▼) and swing lows (▲)
Configurable lookback period for sensitivity adjustment
Optional horizontal level lines extending from swing points
Customizable colors, widths, and line styles
Identify potential reversal points and structure levels instantly
💧 Liquidity Zone Mapping
See where the money is hiding:
Automatic identification of buy-side liquidity (above swing highs)
Automatic identification of sell-side liquidity (below swing lows)
Visual zones show where stop losses are clustered
Real-time tracking when liquidity gets swept
Swept zones change color — know when liquidity has been taken
📉 Multi-Method Trend Detection
Three powerful methods to confirm trend direction:
Swing Structure — Based on higher highs/lows or lower highs/lows
EMA — Trend based on price position relative to EMA
Supertrend — Uses the popular Supertrend indicator
Features include:
Optional background coloring for at-a-glance trend identification
Real-time trend status label (UPTREND/DOWNTREND/NEUTRAL)
Customizable colors and transparency
🏷️ HH/HL/LH/LL Labels
Automatic market structure labeling:
HH (Higher High) — Bullish continuation signal
HL (Higher Low) — Bullish continuation signal
LH (Lower High) — Bearish continuation signal
LL (Lower Low) — Bearish continuation signal
Color-coded for instant visual recognition
📋 Information Dashboard
All critical data at a glance:
Current ticker symbol
Trend direction and status
Daily and Weekly bias
Last swing high and low prices
Active liquidity zone count
Positionable in any corner of your chart
🔔 Built-in Alerts
Never miss a key event:
Trend change alerts (Bullish/Bearish)
Swing high/low formation alerts
Set up notifications for critical market structure changes
🎨 Fully Customizable
Every feature can be:
Toggled on/off individually via the Feature Toggles menu
Color customized to match your chart theme
Size adjusted for optimal visibility
Fine-tuned with sensitivity parameters
Organized settings groups make configuration intuitive and fast.
🚀 Why Choose This Indicator?
Feature: Benefit: All-in-One Solution. Replace multiple indicators with one comprehensive tool. Clean Design and Thoughtful visual hierarchy keep charts readable. Smart Overlap Prevention. Session bars automatically stack to avoid visual clutter. Real-Time Updates: All elements update dynamically as the price moves. Professional Quality-Built with best practices in Pine Script v6. Extensive Documentation, clear code comments, and an organized structure
📖 How to Use
Add the indicator to your TradingView chart
Enable/disable features using the Feature Toggles menu
Customize colors and settings to match your preferences
Adjust session times for your timezone
Set up alerts for trend changes and swing formations
Pro Tips:
Use session times to identify optimal entry windows during kill zones
Watch for price sweeping liquidity zones before looking for reversals
Combine HTF bias with lower timeframe entries for higher probability trades
Use swing levels as potential support/resistance for entries and targets
Monitor the dashboard for a quick market assessment before trading
⚠️ Disclaimer
This indicator is provided for educational and informational purposes only. It does not constitute financial advice. Trading involves substantial risk and is not suitable for all investors. Past performance is not indicative of future results. Always conduct your own analysis and consider your financial situation before making trading decisions.
[codapro] Elite Momentum & Smart Money Detector
Elite Momentum & Smart Money Detector
Overview
The Elite Detector is a non-repainting indicator that merges Smart Money Concepts, Adaptive Volatility-Based Momentum, and Multi-Timeframe Trend Confluence to identify high-probability trade setups. This tool helps confirm institutional intent and market pressure before triggering actionable signals.
Core Systems
Smart Money Concepts (SMC)
• Highlights institutional order blocks
• Detects equal highs/lows as liquidity zones
• Automatically cleans up outdated zones for clarity
Adaptive Momentum Engine
• Momentum calculated with volatility-adjusted smoothing
• Normalized scale from -100 to +100
• Candle coloring reflects trend strength dynamically
Squeeze Detection System
• Flags volatility contraction zones using Bollinger and Keltner channels
• Background shading highlights compression zones
• Histogram shows directional breakout pressure
Multi-Timeframe Trend Validation
• Aligns signals with higher timeframe momentum
• Built-in logic auto-selects appropriate HTF per chart
• Reduces false signals and improves timing
Signal Logic
Buy Signal appears when:
Momentum crosses from negative to positive
Squeeze condition is active
Higher timeframe confirms bullish trend
Sell Signal appears when:
Momentum crosses from positive to negative
Squeeze condition is active
Higher timeframe confirms bearish trend
All signals are non-repainting and appear only once all conditions are met.
Visual Dashboard (Top-Right Corner)
Displays real-time confirmation across five categories:
Momentum: Current trend direction and strength
Squeeze: Indicates if volatility is compressed
HTF Trend: Confirms higher-timeframe alignment
Volatility: Current volatility phase (low, normal, or high)
Signal Status: Buy, Sell, or Neutral (Wait)
Chart Visuals
Candle Colors:
• Bright green/red = Strong momentum
• Faded green/red = Weak momentum
Background Colors:
• Orange = Squeeze is active
• Clear = Normal market activity
Boxes:
• Green = Bullish order blocks
• Red = Bearish order blocks
Dashed Lines:
• Red = Equal highs (liquidity zones above)
• Green = Equal lows (liquidity zones below)
Alert Conditions
Includes three prebuilt alerts for automation and webhook systems:
Elite Buy Signal
Elite Sell Signal
Squeeze Activation
These alerts allow users to respond to market shifts in real time or integrate with automated trading workflows.
Best Practices
Wait for Confluence: Confirm all three systems (momentum, squeeze, HTF trend) before entering
Watch Order Blocks: Institutional zones often act as support/resistance
Monitor Liquidity Zones: Be cautious of stop hunts near equal highs/lows
Use Dashboard Cues: Let the HUD validate your setup
Always Use Risk Management: This tool increases probability, not certainty
Example Setup:
1. Squeeze background appears
2. Buy signal triangle confirms
3. Dashboard shows: Momentum strong up, Squeeze on, HTF trend up
4. Price bounces off green order block
→ High-probability long entry
Why It Works
This tool leverages multiple uncorrelated concepts to filter low-quality trades and highlight setups with real institutional backing:
Order Blocks and Liquidity Zones track smart money footprints
Volatility-adjusted Momentum captures real energy shifts
Multi-Timeframe Confluence confirms trades in the broader context
Non-repainting signals ensure reliability
Final Note
The Elite Detector is designed to show you:
Where smart money is positioned,
When the market is coiling for a move,
and Which direction is supported by momentum and trend.
Use it as your high-probability entry engine — across any market or timeframe.
Disclaimer
This tool was created using the CodaPro Pine Script architecture engine — designed to produce robust trading overlays, educational visuals, and automation-ready alerts. It is provided strictly for educational purposes and does not constitute financial advice. Always backtest and demo before applying to real capital.
Institutional Confluence Nexus [Pro]The Problem: Noise vs. Signal
In the world of Smart Money Concepts (SMC), traders are often overwhelmed by "chart clutter." Standard indicators blindly highlight every Fair Value Gap (FVG) and Order Block (OB), regardless of whether the market is trending, ranging, or dead. This leads to analysis paralysis and low-probability entries.
The Institutional Confluence Nexus was built to solve this. It is not just a structure detector; it is a filtering engine. It uses a multi-factor model to hide low-probability zones and only highlight setups where Structure, Volume, and Momentum align.
The "Quantum" Integration
This script includes a built-in Quantum Regression Oscillator (QRO) engine running in the background. Unlike standard RSI or MACD which are reactive (lagging), the QRO uses Linear Regression mathematics to project momentum trajectory.
By combining institutional structure (Price Action) with quantum momentum (Math), this tool generates specific high-probability signals that only appear when price action and momentum are in perfect agreement.
How It Works & Visual Guide
This indicator is a complete trading suite. Here is what every symbol and color on your chart represents:
1. The "Nexus" Reversal Signals (Triangles)
Symbol : Green Triangle (Up) / Red Triangle (Down) labeled NEXUS.
Logic : These appear when price taps a valid Order Block that aligns with the macro trend (200 EMA).
Meaning : These are your primary "Trend Join" setups. They indicate that the institutional trend is resuming after a retracement.
2. High-Volume Breakouts (Bar Colors)
Symbol : Yellow Candles (Bullish) / Orange Candles (Bearish).
Logic : The script detects when a Break of Structure (BOS) occurs with Above-Average Volume.
Meaning : A breakout without volume is often a fakeout. These colored bars confirm that institutions are fueling the move. If you see a Yellow bar, it means "Smart Money" is buying the breakout.
3. QRO Confluence Signals (Labels)
These are the most advanced signals in the suite, combining Price Action with the internal Oscillator:
SNIPER (Blue/Purple) : The strongest reversal signal.
Condition : Price taps a Fair Value Gap + The internal QRO is at extreme volatility bands (Oversold/Overbought).
PB BUY / PB SELL (Aqua/Orange) : A trend continuation signal.
Condition : Price pulls back into a Fair Value Gap + The internal QRO confirms momentum is still healthy (above/below midline).
Note : These signals automatically draw a Red Line at the invalidation point (Stop Loss) to help you manage risk immediately.
4. The Confluence Dashboard
A non-intrusive Heads-Up Display (HUD) in the corner gives you a snapshot of the market state:
Trend : Is price above/below the 200 EMA?
Volume : Is current volume anomalous (High) or normal?
Structure : Are we breaking up, down, or ranging?
Settings & Customization
Smart Money Structure: Toggle FVGs and Order Blocks on/off.
FVG Extend: Control how far the gap "zones" extend to the right to see them as support/resistance zones.
Volume Filter: Enable/Disable the volume requirement (Keep enabled for higher strike rate).
Risk Management: Adjust the "Lookback" period for the automatic Stop Loss lines.
For Developers (Open Source)
I have kept the code open-source to foster learning in the Pine Script community. You can study how:
ta.linreg is used to smooth RSI data for the internal QRO engine.
box.new and line.new are used for dynamic drawing and extending zones.
var variables are used to store historical FVG levels to detect precise crossovers.
Disclaimer:
This tool is designed to assist with technical analysis and educational purposes. It does not guarantee profits. Always manage your risk and use this in conjunction with your own analysis.
RSI Swing Indicator// This source code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
//
// DESCRIPTION:
// This is an improved version of the original RSI Swing Indicator created by BalintDavid.
// It highlights swing moves between RSI overbought/oversold extremes and updates swing labels
// as price pushes to new highs or lows inside the same RSI regime.
//
// HOW TO USE:
// 1) Set the RSI source, length, and overbought/oversold levels in Inputs.
// 2) Watch the swing lines connect the last oversold to overbought (and vice-versa).
// 3) Labels show structure: HH (higher high), LH (lower high), HL (higher low), LL (lower low).
// 4) Enable "Show only last connecting line" to keep just the most recent connection.
//
// CONTACT:
// ronbelson@gmail.com
//
Mobius Trend Pivot (NPR21 v6)Mobius Trend Pivot (NPR21 v6)
Overview
This indicator identifies trend pivots using higher highs with higher lows (bullish trends) and lower lows with lower highs (bearish trends). Originally created by Mobius (V01.01.29.2019) for ThinkOrSwim, this Pine Script conversion maintains the original logic while fixing critical rendering issues found in previous TradingView versions.
How It Works
The indicator tracks price trends over a user-defined lookback period (default n=5) to establish pivot points. When a valid trend pivot forms, the indicator plots:
Red zone (bearish): Upper pivot line with confirmation level below
Green zone (bullish): Lower pivot line with confirmation level above
White dashed lines: Risk-off levels for position management
Confirmation levels are calculated as a multiple (R_Mult, default 0.7) of the Average True Range at the pivot.
Trading Rules (from Mobius original code)
Entry: Trade when price crosses and closes outside the pivot confirmation line
Risk Management: Use the pivot line itself as your risk point - exit if crossed (avoid hard stops)
Risk-Off: Target an ATR multiple for initial profit taking to achieve a risk-free trade
Stop Management: Move mental stop to break-even once risk-off is achieved
Runner Management: Adjust mental stop to new support/resistance levels as they form
What Makes This Version Different
NPR21 v6 fixes critical bugs present in other TradingView versions:
✅ Consistent transparency - The red/green cloud fills maintain constant 85% transparency and no longer progressively darken over time
✅ No overlapping renders - Eliminated the issue where multiple indicator instances would layer on top of each other, creating visual clutter
✅ Proper memory management - Implements linefill deletion/recreation logic to prevent object accumulation
✅ Clean visual display - Matches the original ThinkOrSwim appearance with professional-looking zones
Key Features
Automatic pivot detection based on price structure
Dynamic support/resistance zones
Built-in risk management levels
Alert capability for pivot confirmation crossovers
Minimal lag - responds quickly to trend changes
Works on all timeframes and instruments
Settings
n (default 5): How many bars to look back for trend confirmation
R_Mult (default 0.7): Adjusts how far the confirmation lines sit from pivots
Lower n = more sensitive, more signals
Higher n = less sensitive, fewer signals
Color Scheme
Red lines/zones: Bearish pivots and short trade setups
Green lines/zones: Bullish pivots and long trade setups
White dashed lines: Risk-off target levels
Best Practices
Use 2+ contracts to implement the risk-off strategy
Combine with price action and volume for confirmation
Adjust n and R_Mult based on instrument volatility
Works best on liquid futures and forex pairs
Consider using higher timeframes for swing trades
Credits
Original indicator concept and logic: Mobius (ThinkOrSwim, January 2019)
Pine Script conversion and optimization: NPR21
Note: This indicator is for educational purposes. Past performance does not guarantee future results. Always practice proper risk management and position sizing.
Dynamic Zone TraderDynamic Zone Trader - MACD-based trading system with adaptive stop loss and take profit zones.
This indicator generates buy/sell signals from MACD histogram crossovers and automatically adjusts position sizing based on market conditions.
Key Features:
Detects breakout trades and expands targets to capture larger moves
Identifies choppy/ranging conditions and tightens stops to reduce risk
Shows supply and demand zones based on pivot highs/lows
Displays three take profit levels (TP1, TP2, TP3) that scale with trade quality
Entry signals filtered by 50 EMA to trade with the trend
Signal strength score displayed on each entry marker
How It Works:
The indicator analyzes recent price structure and movement to classify each trade:
Breakout trades (breaking recent highs/lows) get 1.6x larger zones
Normal trades get standard 1.0x sizing
Choppy weak signals get 0.75x smaller zones
This allows you to take bigger positions on high-conviction setups while limiting risk during low-quality trades.
Settings:
MACD parameters (default 8/21/5)
Base stop loss: 60 ticks
Base take profit: 80 ticks
EMA filter: 50 period
Optional ADX trend filter
Adjustable breakout detection sensitivity
Works on any timeframe and instrument, but optimized for index futures like NQ/MNQ.
Hooke's Law: Market ElasticityHooke's Law: Market Elasticity is a physics-based mean reversion system that models price action using the principles of Classical Mechanics.
Most technical indicators treat the market as a purely statistical entity. This script takes a different approach, treating the market as a physical object with Mass (Volume) and Stiffness (Volatility) . By adapting Hooke’s Law of Elasticity (𝐹=−𝑘𝑋), it visualizes the "Tensile Stress" between price and its equilibrium, identifying the exact moment when a trend becomes unsustainable and must "snap back."
The Physics of Trading
In physics, Hooke's Law states that the force needed to extend a spring is proportional to the distance it is stretched. We map this to financial markets using four key components:
Equilibrium (𝑋=0): The "Resting State" of the market, calculated using a Volume-Weighted Moving Average (VWMA) . This represents the fair value where buyers and sellers agree.
2. Displacement (𝑋): The distance price travels away from this equilibrium.
3. Spring Constant (𝑘): We use Volatility (Standard Deviation) to measure the market's "stiffness."
• Low Volatility: The spring is loose; price can wander far without snapping.
• High Volatility: The spring is stiff; even small deviations create massive tension.
4. Force (𝐹): The calculation is weighted by Relative Volume . A price spike on low volume has low force (easy to reverse), while a spike on high volume carries high momentum (harder to reverse).
Visual Guide & Signals
The indicator uses a hierarchy of visuals to guide you through the trade lifecycle:
1. The Elastic Ribbon (Heatmap)
Connects Price to the Baseline. As the ribbon turns Solid White , the market has reached its Elastic Limit (Critical Zone). This is your warning that a move is overextended.
2. The "Golden" Labels (LONG / SHORT)
These are your Entry Signals . They appear only when the physics "snap" is confirmed by an internal momentum filter and price action.
3. The Small Circles (Minor Reversions)
These dots represent "Minor Snaps." They occur when the elastic tension releases, but the momentum filter hasn't fully confirmed a major reversal.
• Usage: These are excellent Early Warning signs or Scale-In points for aggressive traders.
Strategy: Entries, Exits & Take Profits
This script is designed as a complete system. Here is how to manage the trade using the visual cues:
• Entry: Wait for a LONG or SHORT label to appear.
• Stop Loss: Use the Solid White Line that appears automatically with the signal. If price touches this line, the physics setup has failed—exit immediately.
• Take Profit 1 (The Equilibrium): The Gray Baseline represents the market's center of gravity. In mean reversion trading, price tends to snap back to this line. This is the statistically highest-probability target.
• Take Profit 2 (The Circles): If you are in a trade and a Circle appears in the opposite direction, it indicates the market is experiencing counter-tension. This is an ideal place to secure partial profits or trail your stop.
Settings & Configuration
• Baseline Length (Default: 34): The lookback period for the Center of Gravity.
• Elasticity Limit (Default: 2.618): The Golden Ratio is used as the standard deviation threshold for the "Critical Zone."
• Volume Weighting (Default: True): Recommended. Adds the "Mass" component to the physics calculation.
• Stop Loss Buffer (Default: 0.5): The distance (in Sigma) for the Stop Loss placement.
Risk Disclaimer
Not Financial Advice: This indicator is designed for educational and analytical purposes only. It visualizes market data based on mathematical formulas (Hooke's Law and Statistical Deviation) and does not guarantee future performance or profits.
Market Risks: Financial trading involves significant risk. The "Critical Zones" and "Signals" generated by this script identify statistical extremes, but markets can remain irrational or overextended for long periods ("Plastic Deformation").
Usage: Do not trade blindly based on these signals. Always use this tool in conjunction with your own analysis, risk management, and stop-losses. The author assumes no responsibility for any trading losses incurred while using this script.
ApEn Zones with Delta Confirmation MTF [PhenLabs]📊 ApEn Zones with Delta Confirmation MTF
Version: PineScript™ v6
📌 Description
The ApEn Zones with Delta Confirmation MTF indicator combines Approximate Entropy analysis with cumulative volume delta to identify high-probability support and resistance zones. Approximate Entropy (ApEn) measures the complexity and unpredictability in price data—when ApEn drops significantly, it signals a transition from chaotic to ordered market behavior, often preceding reversals or continuations.
This indicator goes beyond simple ApEn detection by integrating Delta confirmation, which validates zones using volume-based order flow analysis. When a zone forms with Delta confirmation, it indicates institutional participation aligning with the price structure. The multi-timeframe capability allows traders to detect zones forming on higher timeframes while executing on their preferred chart.
🚀 Points of Innovation
First indicator to combine ApEn complexity analysis with cumulative Delta confirmation for zone validation
Pre-built calculation presets eliminate guesswork—optimized parameters for scalping, day trading, and swing trading
Smart zone management automatically removes invalidated zones after two price rejections
Multi-timeframe architecture detects zones on configurable timeframes independent of chart timeframe
Visual style presets provide instant customization from high contrast to subtle overlays
Delta threshold system distinguishes between regular zones and institutionally-confirmed zones
🔧 Core Components
ApEn Calculator: Measures pattern regularity using embedding dimension (m=2) and tolerance factor (r) against price standard deviation to quantify market complexity
Delta Engine: Computes cumulative delta from volume and price movement, comparing against statistical thresholds to identify significant order flow divergence
Zone Generator: Creates visual box zones at signal points with dynamic sizing based on bar range and confirmation status
MTF Request Handler: Fetches ApEn calculations from user-specified timeframe using security() calls for higher timeframe alignment
Zone Manager: Tracks zone interactions, counts rejections, and automatically purges zones that have been tested twice
🔥 Key Features
Calculation Presets: Choose from Aggressive, Conservative, Scalping 1m, Strong Scalping, Swing Trading, or Default—each preset optimizes all parameters for specific trading styles
Visual Style Presets: Select Default, High Contrast, Subtle, Classic, Neutral, or Neutral Reverse to match your chart theme and preference
Delta Confirmation: Zones display with enhanced opacity when cumulative delta confirms institutional participation in the direction of the zone
Automatic Zone Cleanup: Zones self-destruct after two rejections, keeping your chart clean and focused on active levels
Alert System: Four alert conditions for buy zones, sell zones, strong buy signals, and strong sell signals
Maximum Zone Control: Limits display to 5 zones per direction to prevent chart clutter
🎨 Visualization
Buy Zones: Displayed as horizontal boxes at low points when ApEn crosses under threshold—lighter transparency indicates regular zone, darker indicates Delta confirmation
Sell Zones: Displayed as horizontal boxes at high points when ApEn crosses over threshold—visual confirmation follows same transparency logic
Zone Boundaries: Each zone extends 10% of bar range above and below the signal level, providing clear entry and stop areas
Dynamic Extension: All zones automatically extend rightward with each new bar until invalidated
📖 Usage Guidelines
Calculation Preset Selection
Scalping 1m / Strong Scalping: Use for 1-5 minute charts with faster signal generation and tighter thresholds (Length: 15, Zone Length: 5)
Aggressive: Shorter lookback (Length: 10) generates more zones with lower confirmation requirements—higher frequency, more noise
Default: Balanced parameters suitable for 5-15 minute charts (Length: 15, Zone Threshold: 0.5, Delta Length: 4)
Conservative: Extended lookback (Length: 30) with stricter thresholds—fewer but higher probability zones
Swing Trading: Longest parameters (Length: 40, Zone Length: 20) for 1H-4H charts capturing major structural zones
Visual Style Selection
High Contrast: Bright green/red for maximum visibility on any background
Subtle: Muted green/red with transparency for minimal chart distraction
Classic: Traditional lime green and crimson color scheme
Neutral / Neutral Reverse: Grayscale tones for non-directional bias visualization
Timeframe Configuration
Default timeframe is set to 1 minute—adjust based on your execution timeframe
For scalping: Set zone timeframe 1-3x your chart timeframe
For swing trading: Set zone timeframe to 4H or Daily while viewing 1H charts
✅ Best Use Cases
Identifying reversal zones during high-volatility market conditions
Confirming support/resistance levels with volume-based order flow validation
Scalping entries on lower timeframes with higher timeframe zone confluence
Filtering trade setups by requiring Delta confirmation before entry
Setting stop losses beyond zone boundaries after rejection tests
Swing trade positioning at zones detected on 4H/Daily timeframes
⚠️ Limitations
ApEn calculations are computationally intensive—may experience slower loading on very long chart histories
Delta estimation uses (close - open) * volume approximation, not actual order flow data
Zones require sufficient price history—indicator needs max_bars_back of 2000 bars for proper calculation
Low volume instruments may produce unreliable Delta confirmation signals
Zone rejections are counted based on price interaction, not candle close confirmation
Maximum of 5 zones per direction limits visibility during highly active markets
💡 What Makes This Unique
Entropy-Based Detection: Uses mathematical complexity analysis rather than simple price patterns to identify zones
Dual Confirmation System: Combines ApEn signals with Delta divergence for higher probability setups
Adaptive Presets: Six calculation presets and six visual styles create 36 possible configurations without manual parameter adjustment
Self-Managing Zones: Automatic invalidation after two rejections mimics how professional traders track level degradation
🔬 How It Works
Step 1 - ApEn Calculation: The indicator computes Approximate Entropy by measuring how often similar patterns of length m repeat within tolerance r multiplied by standard deviation—lower values indicate more predictable (ordered) price behavior
Step 2 - Signal Generation: Buy signals trigger when higher timeframe ApEn crosses under the average ApEn divided by threshold; sell signals trigger when ApEn crosses over average multiplied by threshold
Step 3 - Delta Confirmation: Cumulative delta is compared against its moving average plus/minus standard deviation times threshold—extreme readings confirm institutional order flow alignment
Step 4 - Zone Creation: Visual boxes are drawn at signal bars with dimensions based on bar range; confirmed zones receive enhanced opacity while unconfirmed zones appear more transparent
Step 5 - Zone Lifecycle: Active zones extend with each bar and track price interactions; after two rejections (price touches zone but reverses), the zone is automatically deleted
💡 Note:
This indicator works best when combined with trend analysis and market structure. Use calculation presets as starting points and adjust the Zone Timeframe setting to align with your trading methodology. Delta confirmation significantly improves zone reliability but requires volume data—instruments with low or unreported volume should rely primarily on ApEn signals alone. Always validate signals with price action context before executing trades.
BBMA By K1M4K-ID- Final Validated Re-Entry//@version=6
indicator("BBMA By K1M4K-ID- Final Validated Re-Entry", overlay=true, max_labels_count=500)
// === INPUT BB ===
lengthBB = input.int(20, title="BB Period")
devBB = input.float(2.0, title="Deviation")
src = input.source(close, title="Source")
bbColorMid = input.color(color.purple, title="Mid BB Color")
bbColorTop = input.color(color.purple, title="Top BB Color")
bbColorLow = input.color(color.purple, title="Low BB Color")
showFill = input.bool(true, title="Show BB Fill")
showReEntrySignals = input.bool(true, "Show Re-Entry Signals (✅)")
showSignalTable = input.bool(true, "Show Signal Table")
// === BB CALCULATION ===
basis = ta.sma(src, lengthBB)
dev = devBB * ta.stdev(src, lengthBB)
topBB = basis + dev
lowBB = basis - dev
// === PLOT BB ===
pMid = plot(basis, title="Mid BB", color=bbColorMid, linewidth=2)
pTop = plot(topBB, title="Top BB", color=bbColorTop, linewidth=2)
pLow = plot(lowBB, title="Low BB", color=bbColorLow, linewidth=2)
fill(pTop, pLow, color=showFill ? color.new(color.purple, 85) : na, title="BB Fill")
// === INPUT MA SETTING ===
ma_func(source, length) => ta.wma(source, length)
// === MA HIGH/LOW ===
ma5_high = ma_func(high, 5)
ma10_high = ma_func(high, 10)
ma5_low = ma_func(low, 5)
ma10_low = ma_func(low, 10)
// === PLOT MA ===
p_ma5_high = plot(ma5_high, title="MA 5 High", color=color.green, linewidth=2)
p_ma10_high = plot(ma10_high, title="MA 10 High", color=color.green, linewidth=2)
fill(p_ma5_high, p_ma10_high, color=color.new(color.green, 85), title="MA High Fill")
p_ma5_low = plot(ma5_low, title="MA 5 Low", color=color.red, linewidth=2)
p_ma10_low = plot(ma10_low, title="MA 10 Low", color=color.red, linewidth=2)
fill(p_ma5_low, p_ma10_low, color=color.new(color.red, 85), title="MA Low Fill")
// === EMA 50 ===
ema50 = ta.ema(close, 50)
plot(ema50, title="EMA 50", color=color.blue, linewidth=3)
// === CSA KUKUH (LOGIKA ASLI LU - TIDAK DIUBAH) ===
var bool hasCsaBuy = false
var bool hasCsaSell = false
isCsaKukuhBuy = close > ma5_high and close > ma10_high and close > basis
isCsaKukuhSell = close < ma5_low and close < ma10_low and close < basis
if isCsaKukuhBuy and not hasCsaBuy
hasCsaBuy := true
hasCsaSell := false
else if isCsaKukuhSell and not hasCsaSell
hasCsaSell := true
hasCsaBuy := false
showCsaBuy = isCsaKukuhBuy and not hasCsaBuy
showCsaSell = isCsaKukuhSell and not hasCsaSell
plotshape(showCsaBuy, title="CSA Kukuh Buy First", location=location.belowbar, color=color.green, style=shape.labelup, text="CSAK", textcolor=color.white, size=size.small)
plotshape(showCsaSell, title="CSA Kukuh Sell First", location=location.abovebar, color=color.red, style=shape.labeldown, text="CSAK", textcolor=color.white, size=size.small)
// === CSM (HANYA SAAT KELUAR DARI DALAM BB) ===
wasInsideBB = (close >= lowBB and close <= topBB )
csmBuySignal = wasInsideBB and close > topBB
csmSellSignal = wasInsideBB and close < lowBB
plotshape(csmBuySignal, title="CSM Buy", location=location.abovebar, color=color.green, style=shape.triangleup, text="CSM", size=size.tiny)
plotshape(csmSellSignal, title="CSM Sell", location=location.belowbar, color=color.red, style=shape.triangledown, text="CSM", size=size.tiny)
// === CSA (BREAKOUT TANPA MELEWATI MID BB) ===
isCsaBuy = close > ma5_high and close > ma10_high and close <= basis
isCsaSell = close < ma5_low and close < ma10_low and close >= basis
plotshape(isCsaBuy, title="CSA Buy", location=location.belowbar, color=color.new(color.green, 60), style=shape.circle, text="CSA", size=size.tiny)
plotshape(isCsaSell, title="CSA Sell", location=location.abovebar, color=color.new(color.red, 60), style=shape.circle, text="CSA", size=size.tiny)
// === EXTREME ===
basis_ext = ta.sma(close, 20)
dev_ext = 2 * ta.stdev(close, 20)
isExtremeBuy() => ta.wma(low, 5) < basis_ext - dev_ext
isExtremeSell() => ta.wma(high, 5) > basis_ext + dev_ext
plotshape(isExtremeBuy(), title="Extreme Buy", location=location.belowbar, color=color.green, style=shape.labelup, text="E", size=size.tiny, textcolor=color.white)
plotshape(isExtremeSell(), title="Extreme Sell", location=location.abovebar, color=color.red, style=shape.labeldown, text="E", size=size.tiny, textcolor=color.white)
// === ZZL MA ===
isZzlBuy = (ma5_high > basis and ma10_high > basis and ma5_low > basis and ma10_low > basis and
(ma5_high <= basis or ma10_high <= basis or ma5_low <= basis or ma10_low <= basis))
isZzlSell = (ma5_high < basis and ma10_high < basis and ma5_low < basis and ma10_low < basis and
(ma5_high >= basis or ma10_high >= basis or ma5_low >= basis or ma10_low >= basis))
var bool zzlBuyShown = false
var bool zzlSellShown = false
if isZzlBuy and not zzlBuyShown
label.new(bar_index, low, "Z", style=label.style_label_up, color=color.green, textcolor=color.white)
zzlBuyShown := true
if not isZzlBuy
zzlBuyShown := false
if isZzlSell and not zzlSellShown
label.new(bar_index, high, "Z", style=label.style_label_down, color=color.red, textcolor=color.white)
zzlSellShown := true
if not isZzlSell
zzlSellShown := false
// ===========================================
// === VALIDASI + RE-ENTRY (H4 & H1) ===
// ===========================================
// --- Ambil data ---
= request.security(syminfo.tickerid, "240", )
wasInside_h4 = request.security(syminfo.tickerid, "240", (close >= (ta.sma(close, lengthBB) - devBB * ta.stdev(close, lengthBB) ) and close <= (ta.sma(close, lengthBB) + devBB * ta.stdev(close, lengthBB) )))
csmBuy_h4 = wasInside_h4 and request.security(syminfo.tickerid, "240", close > (ta.sma(close, lengthBB) + devBB * ta.stdev(close, lengthBB)))
csmSell_h4 = wasInside_h4 and request.security(syminfo.tickerid, "240", close < (ta.sma(close, lengthBB) - devBB * ta.stdev(close, lengthBB)))
csakBuy_h4 = close_h4 > ma5h_h4 and close_h4 > ma10h_h4 and close_h4 > basis_h4
csakSell_h4 = close_h4 < ma5l_h4 and close_h4 < ma10l_h4 and close_h4 < basis_h4
csaBuy_h4 = close_h4 > ma5h_h4 and close_h4 > ma10h_h4 and close_h4 <= basis_h4
csaSell_h4 = close_h4 < ma5l_h4 and close_h4 < ma10l_h4 and close_h4 >= basis_h4
csmBuy_h1 = request.security(syminfo.tickerid, "60", (close >= (ta.sma(close, lengthBB) - devBB * ta.stdev(close, lengthBB) ) and close <= (ta.sma(close, lengthBB) + devBB * ta.stdev(close, lengthBB) )) and close > (ta.sma(close, lengthBB) + devBB * ta.stdev(close, lengthBB)))
csmSell_h1 = request.security(syminfo.tickerid, "60", (close >= (ta.sma(close, lengthBB) - devBB * ta.stdev(close, lengthBB) ) and close <= (ta.sma(close, lengthBB) + devBB * ta.stdev(close, lengthBB) )) and close < (ta.sma(close, lengthBB) - devBB * ta.stdev(close, lengthBB)))
csakBuy_h1 = request.security(syminfo.tickerid, "60", close > ta.wma(high,5) and close > ta.wma(high,10) and close > ta.sma(close, lengthBB))
csakSell_h1 = request.security(syminfo.tickerid, "60", close < ta.wma(low,5) and close < ta.wma(low,10) and close < ta.sma(close, lengthBB))
csaBuy_h1 = request.security(syminfo.tickerid, "60", close > ta.wma(high,5) and close > ta.wma(high,10) and close <= ta.sma(close, lengthBB))
csaSell_h1 = request.security(syminfo.tickerid, "60", close < ta.wma(low,5) and close < ta.wma(low,10) and close >= ta.sma(close, lengthBB))
csmBuy_m15 = request.security(syminfo.tickerid, "15", close > (ta.sma(close, lengthBB) + devBB * ta.stdev(close, lengthBB)))
csmSell_m15 = request.security(syminfo.tickerid, "15", close < (ta.sma(close, lengthBB) - devBB * ta.stdev(close, lengthBB)))
csakBuy_d = request.security(syminfo.tickerid, "D", close > ta.wma(high,5) and close > ta.wma(high,10) and close > ta.sma(close, lengthBB))
csakSell_d = request.security(syminfo.tickerid, "D", close < ta.wma(low,5) and close < ta.wma(low,10) and close < ta.sma(close, lengthBB))
csaBuy_d = request.security(syminfo.tickerid, "D", close > ta.wma(high,5) and close > ta.wma(high,10) and close <= ta.sma(close, lengthBB))
csaSell_d = request.security(syminfo.tickerid, "D", close < ta.wma(low,5) and close < ta.wma(low,10) and close >= ta.sma(close, lengthBB))
// --- Validasi ---
validCsakH4Buy = csakBuy_h4 and ta.highest(csmBuy_h1 ? 1 : 0, 4) == 1
validCsakH4Sell = csakSell_h4 and ta.highest(csmSell_h1 ? 1 : 0, 4) == 1
validCsakH1Buy = csakBuy_h1 and ta.highest(csmBuy_m15 ? 1 : 0, 4) == 1
validCsakH1Sell = csakSell_h1 and ta.highest(csmSell_m15 ? 1 : 0, 4) == 1
validCsmH1Buy = csmBuy_h1 and (csaBuy_h4 or csakBuy_h4) and ta.highest(csmBuy_m15 ? 1 : 0, 4) == 1
validCsmH1Sell = csmSell_h1 and (csaSell_h4 or csakSell_h4) and ta.highest(csmSell_m15 ? 1 : 0, 4) == 1
validCsmH4Buy = csmBuy_h4 and (csaBuy_d or csakBuy_d) and ta.highest(csmBuy_h1 or csmSell_h1 ? 1 : 0, 4) == 1
validCsmH4Sell = csmSell_h4 and (csaSell_d or csakSell_d) and ta.highest(csmBuy_h1 or csmSell_h1 ? 1 : 0, 4) == 1
// --- Re-Entry Area ---
inReEntryBuy = low <= math.max(ma5_low, ma10_low)
inReEntrySell = high >= math.min(ma5_high, ma10_high)
// --- Flag Valid + Hit Detection ---
var bool vCsakH4B = false, vCsakH4S = false
var bool vCsakH1B = false, vCsakH1S = false
var bool vCsmH4B = false, vCsmH4S = false
var bool vCsmH1B = false, vCsmH1S = false
var bool hitCsakH4B = false, hitCsakH4S = false
var bool hitCsakH1B = false, hitCsakH1S = false
var bool hitCsmH4B = false, hitCsmH4S = false
var bool hitCsmH1B = false, hitCsmH1S = false
// Reset hit setiap candle
hitCsakH4B := false
hitCsakH4S := false
hitCsakH1B := false
hitCsakH1S := false
hitCsmH4B := false
hitCsmH4S := false
hitCsmH1B := false
hitCsmH1S := false
// Aktifkan flag saat valid
vCsakH4B := validCsakH4Buy ? true : vCsakH4B
vCsakH4S := validCsakH4Sell ? true : vCsakH4S
vCsakH1B := validCsakH1Buy ? true : vCsakH1B
vCsakH1S := validCsakH1Sell ? true : vCsakH1S
vCsmH4B := validCsmH4Buy ? true : vCsmH4B
vCsmH4S := validCsmH4Sell ? true : vCsmH4S
vCsmH1B := validCsmH1Buy ? true : vCsmH1B
vCsmH1S := validCsmH1Sell ? true : vCsmH1S
// Deteksi & reset saat re-entry
if vCsakH4B and inReEntryBuy
hitCsakH4B := true
vCsakH4B := false
if vCsakH4S and inReEntrySell
hitCsakH4S := true
vCsakH4S := false
if vCsakH1B and inReEntryBuy
hitCsakH1B := true
vCsakH1B := false
if vCsakH1S and inReEntrySell
hitCsakH1S := true
vCsakH1S := false
if vCsmH4B and inReEntryBuy
hitCsmH4B := true
vCsmH4B := false
if vCsmH4S and inReEntrySell
hitCsmH4S := true
vCsmH4S := false
if vCsmH1B and inReEntryBuy
hitCsmH1B := true
vCsmH1B := false
if vCsmH1S and inReEntrySell
hitCsmH1S := true
vCsmH1S := false
// --- Plot Re-Entry ---
//plotshape(showReEntrySignals and hitCsakH4B, location=location.belowbar, color=color.teal, style=shape.labelup, text="✅", size=size.normal)
//plotshape(showReEntrySignals and hitCsakH4S, location=location.abovebar, color=color.orange, style=shape.labeldown, text="✅", size=size.normal)
//plotshape(showReEntrySignals and hitCsakH1B, location=location.belowbar, color=color.green, style=shape.labelup, text="✅", size=size.small)
//plotshape(showReEntrySignals and hitCsakH1S, location=location.abovebar, color=color.red, style=shape.labeldown, text="✅", size=size.small)
//plotshape(showReEntrySignals and hitCsmH1B, location=location.belowbar, color=color.green, style=shape.labelup, text="✅ CSM", size=size.tiny)
//plotshape(showReEntrySignals and hitCsmH1S, location=location.abovebar, color=color.red, style=shape.labeldown, text="✅ CSM", size=size.tiny)
//plotshape(showReEntrySignals and hitCsmH4B, location=location.belowbar, color=color.teal, style=shape.labelup, text="✅ CSM", size=size.tiny)
//plotshape(showReEntrySignals and hitCsmH4S, location=location.abovebar, color=color.orange, style=shape.labeldown, text="✅ CSM", size=size.tiny)
// ===========================================
// === TABEL SIGNAL H1 & H4 (FINAL) ===
// ===========================================
var table sigTable = table.new(position.top_right, 4, 5, border_width=1)
if barstate.islast and showSignalTable
table.cell(sigTable, 0, 0, "TF", text_color=color.white, bgcolor=color.black)
table.cell(sigTable, 1, 0, "Signal", text_color=color.white, bgcolor=color.black)
table.cell(sigTable, 2, 0, "Status", text_color=color.white, bgcolor=color.black)
table.cell(sigTable, 3, 0, "Re-Entry", text_color=color.white, bgcolor=color.black)
table.cell(sigTable, 0, 1, "H4", text_color=color.white, bgcolor=color.black)
table.cell(sigTable, 1, 1, "CSAK Buy", text_color=color.green, bgcolor=color.new(color.green, 90))
table.cell(sigTable, 2, 1, vCsakH4B ? "✅ Valid" : "-", text_color=vCsakH4B ? color.green : color.gray, bgcolor=color.new(vCsakH4B ? color.green : color.gray, 90))
table.cell(sigTable, 3, 1, hitCsakH4B ? "✅ Hit" : "-", text_color=hitCsakH4B ? color.teal : color.gray, bgcolor=color.new(hitCsakH4B ? color.teal : color.gray, 90))
table.cell(sigTable, 0, 2, "H4", text_color=color.white, bgcolor=color.black)
table.cell(sigTable, 1, 2, "CSAK Sell", text_color=color.red, bgcolor=color.new(color.red, 90))
table.cell(sigTable, 2, 2, vCsakH4S ? "✅ Valid" : "-", text_color=vCsakH4S ? color.red : color.gray, bgcolor=color.new(vCsakH4S ? color.red : color.gray, 90))
table.cell(sigTable, 3, 2, hitCsakH4S ? "✅ Hit" : "-", text_color=hitCsakH4S ? color.orange : color.gray, bgcolor=color.new(hitCsakH4S ? color.orange : color.gray, 90))
table.cell(sigTable, 0, 3, "H1", text_color=color.white, bgcolor=color.black)
table.cell(sigTable, 1, 3, "CSM Buy", text_color=color.green, bgcolor=color.new(color.green, 90))
table.cell(sigTable, 2, 3, vCsmH1B ? "✅ Valid" : "-", text_color=vCsmH1B ? color.green : color.gray, bgcolor=color.new(vCsmH1B ? color.green : color.gray, 90))
table.cell(sigTable, 3, 3, hitCsmH1B ? "✅ Hit" : "-", text_color=hitCsmH1B ? color.teal : color.gray, bgcolor=color.new(hitCsmH1B ? color.teal : color.gray, 90))
table.cell(sigTable, 0, 4, "H1", text_color=color.white, bgcolor=color.black)
table.cell(sigTable, 1, 4, "CSM Sell", text_color=color.red, bgcolor=color.new(color.red, 90))
table.cell(sigTable, 2, 4, vCsmH1S ? "✅ Valid" : "-", text_color=vCsmH1S ? color.red : color.gray, bgcolor=color.new(vCsmH1S ? color.red : color.gray, 90))
table.cell(sigTable, 3, 4, hitCsmH1S ? "✅ Hit" : "-", text_color=hitCsmH1S ? color.orange : color.gray, bgcolor=color.new(hitCsmH1S ? color.orange : color.gray, 90))
Weinstein Stage AnalysisWeinstein Stage Analysis
This is an enhanced version of Stan Weinstein's classic Stage Analysis, optimized for visual clarity on dark themes. The indicator instantly colors your candlesticks based on the current Weinstein Stage using a bright, fully opaque color scheme that stands out strongly even on dark charts.
Key Features:
- Uses Weekly 30-period SMA (customizable length) as the primary reference line
- Supports "Within Range %" parameter – set to 0% for super-strong stocks that must stay clearly above/below the MA
- Four distinct stages with vivid colors:
• Stage 1 (Accumulation) – Bright Cyan (#00FFFF) – Stock is basing or consolidating near the MA
• Stage 2 (Uptrend) – Bright Green (#00CD00) – Strong uptrend, price clearly above the weekly MA
• Stage 3 (Topping) – Bright Orange (#FFAA00) – Price is still above MA but weakening (potential distribution)
• Stage 4 (Downtrend) – Bright Red (#FF0000) – Strong downtrend, price clearly below the weekly MA
- Automatic stage transition logic with perfect color persistence (no flickering)
- Super visible on both light and dark themes – colors are 100% opaque and highly saturated
- Plots the Weekly 30 SMA as a thick white line for easy reference
How to Use:
1. Add to any chart (works best on daily or weekly timeframes)
2. For very strong momentum stocks, set "Within Range %" to 0% – this forces the indicator to only show Stage 2 when price is clearly above the MA
3. Use default 30-period length or adjust based on your preference
4. Watch for clean stage transitions – especially the switch from Stage 3 (orange) to Stage 4 (red) as a strong sell signal, or Stage 1 (cyan) to Stage 2 (green) as a powerful buy signal
Adaptive RSI [BOSWaves]Adaptive RSI - Percentile-Based Momentum Detection with Dynamic Regime Thresholds
Overview
Adaptive RSI is a self-calibrating momentum oscillator that identifies overbought and oversold conditions through historical percentile analysis, constructing dynamic threshold boundaries that adjust to evolving market volatility and momentum characteristics.
Instead of relying on traditional fixed RSI levels (30/70 or 20/80) or static overbought/oversold zones, regime detection, threshold placement, and signal generation are determined through rolling percentile calculation, smoothed momentum measurement, and divergence pattern recognition.
This creates adaptive boundaries that reflect actual momentum distribution rather than arbitrary fixed levels - tightening during low-volatility consolidation periods, widening during trending environments, and incorporating divergence analysis to reveal momentum exhaustion or continuation patterns.
Momentum is therefore evaluated relative to its own historical context rather than universal fixed thresholds.
Conceptual Framework
Adaptive RSI is founded on the principle that meaningful momentum extremes emerge relative to recent price behavior rather than at predetermined numerical levels.
Traditional RSI implementations identify overbought and oversold conditions using fixed thresholds that remain constant regardless of market regime, often generating premature signals in strong trends or missing reversals in range-bound markets. This framework replaces static threshold logic with percentile-driven adaptive boundaries informed by actual momentum distribution.
Three core principles guide the design:
Threshold placement should correspond to historical momentum percentiles, not fixed numerical levels.
Regime detection must adapt to current market volatility and momentum characteristics.
Divergence patterns reveal momentum exhaustion before price reversal becomes visible.
This shifts oscillator analysis from universal fixed levels into adaptive, context-aware regime boundaries.
Theoretical Foundation
The indicator combines smoothed RSI calculation, rolling percentile tracking, adaptive threshold construction, and multi-pattern divergence detection.
A Hull Moving Average (HMA) pre-smooths the price source to reduce noise before RSI computation, which then undergoes optional post-smoothing using configurable moving average types. Confirmed oscillator values populate a rolling historical buffer used for percentile calculation, establishing upper and lower thresholds that adapt to recent momentum distribution. Regime state persists until the oscillator crosses the opposing threshold, preventing whipsaw during consolidation. Pivot detection identifies swing highs and lows in both price and oscillator values, enabling regular divergence pattern recognition through comparative analysis.
Five internal systems operate in tandem:
Smoothed Momentum Engine : Computes HMA-preprocessed RSI with optional post-smoothing using multiple MA methodologies (SMA, EMA, HMA, WMA, DEMA, RMA, LINREG, TEMA).
Historical Buffer Management : Maintains a rolling array of confirmed oscillator values for percentile calculation with configurable lookback depth.
Percentile Threshold Calculation : Determines upper and lower boundaries by extracting specified percentile values from sorted historical distribution.
Persistent Regime Detection : Establishes bullish/bearish/neutral states based on threshold crossings with state persistence between signals.
Divergence Pattern Recognition : Identifies regular bullish and bearish divergences through synchronized pivot analysis of price and oscillator values with configurable range filtering.
This design allows momentum interpretation to adapt to market conditions rather than reacting mechanically to universal thresholds.
How It Works
Adaptive RSI evaluates momentum through a sequence of self-calibrating processes:
Source Pre-Smoothing: Input price undergoes 4-period HMA smoothing to reduce bar-to-bar noise before oscillator calculation.
RSI Calculation: Standard RSI computation applied to smoothed source over configurable length period.
Optional Post-Smoothing: Raw RSI value undergoes additional smoothing using selected MA type and length for cleaner regime detection.
Historical Buffer Population: Confirmed oscillator values accumulate in a rolling array with size limit determined by adaptive lookback parameter.
Percentile Threshold Extraction: Array sorts on each bar to calculate upper percentile (bullish threshold) and lower percentile (bearish threshold) values.
Regime State Persistence: Bullish regime activates when oscillator crosses above upper threshold, bearish regime activates when crossing below lower threshold, neutral regime persists until directional threshold breach.
Pivot Identification: Swing highs and lows detected in both oscillator and price using configurable left/right parameters.
Divergence Pattern Matching: Compares pivot relationships between price and oscillator within min/max bar distance constraints to identify regular bullish (price LL, oscillator HL) and bearish (price HH, oscillator LH) divergences.
Together, these elements form a continuously updating momentum framework anchored in statistical context.
Interpretation
Adaptive RSI should be interpreted as context-aware momentum boundaries:
Bullish Regime (Blue): Activated when oscillator crosses above upper percentile threshold, indicating momentum strength relative to recent distribution favors upside continuation.
Bearish Regime (Red): Established when oscillator crosses below lower percentile threshold, identifying momentum weakness relative to recent distribution favors downside continuation.
Upper Threshold Line (Blue)**: Dynamic resistance level calculated from upper percentile of historical oscillator distribution - adapts higher during trending markets, lower during ranging conditions.
Lower Threshold Line (Red): Dynamic support level calculated from lower percentile of historical oscillator distribution - adapts lower during downtrends, higher during consolidation.
Regime Fill: Gradient coloring between oscillator and baseline (50) visualizes current momentum intensity - stronger color indicates greater distance from neutral.
Extreme Bands (15/85): Upper and lower extreme zones with strength-modulated transparency reveal momentum extremity - darker shading during powerful moves, lighter during moderate momentum.
Divergence Lines: Connect price and oscillator pivots when divergence pattern detected, appearing on both price chart and oscillator pane for confluence identification.
Reversal Markers (✦): Diamond signals appear at 80+ (bearish extreme) and sub-15 (bullish extreme) levels, marking potential exhaustion zones independent of regime state.
Percentile context, divergence confirmation, and regime persistence outweigh isolated oscillator readings.
Signal Logic & Visual Cues
Adaptive RSI presents four primary interaction signals:
Regime Switch - Long : Oscillator crosses above upper percentile threshold after previously being in bearish or neutral regime, suggesting momentum strength shift favoring bullish continuation.
Regime Switch - Short : Oscillator crosses below lower percentile threshold after previously being in bullish or neutral regime, indicating momentum weakness shift favoring bearish continuation.
Regular Bullish Divergence (𝐁𝐮𝐥𝐥) : Price forms lower low while oscillator forms higher low, revealing positive momentum divergence during downtrends - often precedes reversal or consolidation.
Regular Bearish Divergence (𝐁𝐞𝐚𝐫) : Price forms higher high while oscillator forms lower high, revealing negative momentum divergence during uptrends - often precedes reversal or correction.
Alert generation covers regime switches, threshold crossings, and divergence detection for systematic monitoring.
Strategy Integration
Adaptive RSI fits within momentum-informed and mean-reversion trading approaches:
Adaptive Regime Following : Use threshold crossings as primary trend inception signals where momentum confirms directional breakouts within statistical context.
Divergence-Based Reversals : Enter counter-trend positions when divergence patterns appear at extreme oscillator levels (above 80 or below 20) for high-probability mean-reversion setups.
Threshold-Aware Scaling : Recognize that tighter percentile spreads (e.g., 45/50) generate more signals suitable for ranging markets, while wider spreads (e.g., 30/70) filter for stronger trend confirmation.
Extreme Zone Confluence : Combine reversal markers (✦) with divergence signals for maximum-conviction exhaustion entries.
Multi-Timeframe Regime Alignment : Apply higher-timeframe regime context to filter lower-timeframe entries, taking only setups aligned with dominant momentum direction.
Smoothing Optimization : Increase smoothing length in choppy markets to reduce false signals, decrease in trending markets for faster response.
Technical Implementation Details
Core Engine : HMA-preprocessed RSI with configurable smoothing (SMA, HMA, EMA, WMA, DEMA, RMA, LINREG, TEMA)
Adaptive Model : Rolling percentile calculation over confirmed oscillator values with size-limited historical buffer
Threshold Construction : Linear interpolation percentile extraction from sorted distribution array
Regime Detection : State-persistent threshold crossing logic with confirmed bar validation
Divergence Engine : Pivot-based pattern matching with range filtering and duplicate prevention
Visualization : Gradient-filled regime zones, adaptive threshold lines, strength-modulated extreme bands, dual-pane divergence lines
Performance Profile : Optimized for real-time execution with efficient array management and minimal computational overhead
Optimal Application Parameters
Timeframe Guidance:
1 - 5 min : Micro-structure momentum detection for scalping and intraday reversals
15 - 60 min : Intraday regime identification with divergence-validated turning points
4H - Daily : Swing and position-level momentum analysis with macro divergence context
Suggested Baseline Configuration:
RSI Length : 18
Source : Close
Smooth Oscillator : Enabled
Smoothing Length : 20
Smoothing Type : SMA
Adaptive Lookback : 1000
Upper Percentile : 50
Lower Percentile : 45
Divergence Pivot Left : 15
Divergence Pivot Right : 15
Min Pivot Distance : 5
Max Pivot Distance : 60
These suggested parameters should be used as a baseline; their effectiveness depends on the asset's volatility profile, momentum characteristics, and preferred signal frequency, so fine-tuning is expected for optimal performance.
Parameter Calibration Notes
Use the following adjustments to refine behavior without altering the core logic:
Too many whipsaw signals : Widen percentile spread (e.g., 40/60 instead of 45/50) to demand stronger momentum confirmation, or increase "Smoothing Length" to filter noise.
Missing legitimate regime changes : Tighten percentile spread (e.g., 48/52 instead of 45/50) for earlier detection, or decrease "Smoothing Length" for faster response.
Oscillator too choppy : Increase "Smoothing Length" for cleaner readings, or switch "Smoothing Type" to RMA/TEMA for heavier smoothing.
Thresholds not adapting properly : Reduce "Adaptive Lookback" to emphasize recent behavior (500-800 bars), or increase it for more stable thresholds (1500-2000 bars).
Too many divergence signals : Increase "Pivot Left/Right" values to demand stronger swing confirmation, or widen "Min Pivot Distance" to space out detections.
Missing significant divergences : Decrease "Pivot Left/Right" for faster pivot detection, or increase "Max Pivot Distance" to compare more distant swings.
Prefer different momentum sensitivity : Adjust "RSI Length" - lower values (10-14) for aggressive response, higher values (21-28) for smoother trend confirmation.
Divergences appearing too late : Reduce "Pivot Right" parameter to detect divergences closer to current price action.
Adjustments should be incremental and evaluated across multiple session types rather than isolated market conditions.
Performance Characteristics
High Effectiveness:
Markets with mean-reverting characteristics and consistent momentum cycles
Instruments where momentum extremes reliably precede reversals or consolidations
Ranging environments where percentile-based thresholds adapt to volatility contraction
Divergence-driven strategies targeting momentum exhaustion before price confirmation
Reduced Effectiveness:
Extremely strong trending markets where oscillator remains persistently extreme
Low-liquidity environments with erratic momentum readings
News-driven or gapped markets where momentum disconnects from price temporarily
Markets with regime shifts faster than adaptive lookback can recalibrate
Integration Guidelines
Confluence : Combine with BOSWaves structure, volume analysis, or traditional support/resistance
Threshold Respect : Trust signals that occur after clean threshold crossings with sustained momentum
Divergence Context : Prioritize divergences appearing at extreme oscillator levels (80+/15-) over those in neutral zones
Regime Awareness : Consider whether current market regime matches historical momentum patterns used for calibration
Multi-Pattern Confirmation : Seek divergence patterns coinciding with reversal markers or threshold rejections for maximum conviction
Disclaimer
Adaptive RSI is a professional-grade momentum and divergence analysis tool. It uses percentile-based threshold calculation that adapts to recent market behavior but cannot predict future regime shifts or guarantee reversal timing. Results depend on market conditions, parameter selection, lookback period appropriateness, and disciplined execution. BOSWaves recommends deploying this indicator within a broader analytical framework that incorporates price structure, volume context, and comprehensive risk management.
High Volume S/R + VPA Entries + Broken Level Cleanup High Volume S/R + VPA Entries + Broken Level Cleanup
SWING ATR BasedWhat does this indicator do?
1. It identifies Market Swings The script monitors price action to detect when a trend changes direction.
It uses ATR (Average True Range) to measure volatility, ensuring it doesn't get tricked by small, insignificant price movements.
To validate a change in direction (from bullish to bearish, or vice versa), it waits for the price to cover a specific distance (defined by the kRange parameter) and requires at least two significant candles.
2. It plots Support and Resistance zones As soon as a new high or low point is confirmed:
In Green (Bull): It draws a support line at the level of the last low.
In Red (Bear): It draws a resistance line at the level of the last high.
Auto-Cleaning: If the price breaks through a support line, the line turns gray and stops. The script only keeps active (unbroken) levels on the screen.
3. It calculates an "SGE Score" (Market State) This is the "brain" of the script. It assigns a rating to the current trend:
+2 (Bullish): The price has broken a resistance.
-2 (Bearish): The price has broken a support.
0 (Neutral): The market is indecisive (for example, after a break that contradicts the previous one).
Key Feature: This score has a "one-candle delay." It waits for the next candle to close before confirming a score change, which helps avoid reacting too quickly to false alerts.
4. It simplifies visual reading To keep your chart clean and readable:
It only highlights the 3 levels closest to the current price (those most likely to be hit soon).
It colors the chart candles directly: Green if the score is +2, Red if the score is -2, and Gray if it is neutral.
5. Dashboard In the top-right corner of your screen, it displays a permanent summary:
The current score (-2, 0, or 2).
The number of active supports and resistances.
Summary: This is a "smart" trend detector. Instead of just looking at whether the price is going up or down, it waits for the price to break important structural levels (confirmed by volatility) to tell you: "Caution, the structure has just shifted from bullish to bearish."
Recommended Settings:
kRange: 1.3 / 1.4
ATR Mult: 0.3 to 0.5
Script created with Claude AI.
Order Blocks & Breaker Blocks Destek DirencOrder Blocks & Breaker Blocks Destek Direnc Al Sat Bölgeleri
Key Zone$ - Support and Resistance0DTE Bounce Zones (6M) — Support & Resistance with VWAP, Volume, and Risk Management
This indicator is built for intraday and 0DTE options trading, focused on high-quality bounce and rejection setups at historically proven support and resistance zones.
It automatically identifies key zones from six months of historical price action and waits for real-time confirmation before signaling CALL or PUT opportunities. The goal is to reduce noise, avoid weak bounces, and provide clear, rules-based trade structure.
====================================================================
CORE FEATURES
====================================================================
Historical Support & Resistance Zones (6 Months)
Zones are built using 15-minute pivot highs and lows.
A zone must be tested at least 3 times to be considered valid.
Nearby zones are merged automatically to reduce clutter.
Zones extend forward in time and update dynamically.
Support zones are shown in green, resistance zones in red.
These are higher-quality structural levels, not same-day levels.
====================================================================
0DTE-Focused Entry Logic
Signals only trigger when price interacts with a confirmed zone and shows a strong rejection candle.
Signals are limited to high-probability trading windows only.
Market Open: 9:30–10:45 ET
Market Close: 3:00–4:00 ET
This avoids midday chop and focuses on periods with real momentum.
====================================================================
VWAP Confirmation (Strict)
CALL setups require a VWAP reclaim.
PUT setups require a VWAP loss.
This aligns trades with institutional order flow instead of counter-trend noise.
====================================================================
MACD Momentum Filter
MACD histogram behavior is used to confirm momentum direction and avoid taking bounces against the prevailing move.
====================================================================
ATR Candle Strength Filter
The signal candle must be large enough relative to ATR.
This filters out weak or indecisive candles that often fail with 0DTE.
====================================================================
Advanced Volume Confirmation (Relative Volume)
Relative Volume (RVOL) is used instead of raw volume.
Different RVOL thresholds are applied for CALLS versus PUTS.
Higher RVOL is required for PUTS due to downside urgency.
Lower RVOL is allowed for CALLS due to grind-up behavior.
Separate RVOL thresholds are used for the market open and market close.
This ensures signals only occur when real participation is present.
====================================================================
Built-In Risk Management (2:1 Reward/Risk)
Every signal automatically calculates an entry, stop loss, and target.
Stop loss is based on the zone edge with an ATR buffer.
Targets default to a 2:1 reward-to-risk ratio.
Entry, stop, and target levels are drawn directly on the chart and included in alerts.
====================================================================
Smart Alerts (CALLS & PUTS)
Alerts trigger only when all conditions are met.
Alerts include trade direction, entry price, stop price, target price, and RVOL information.
Alerts are designed for 5-minute confirmation trading.
To use alerts, select “Any alert() function call” when creating the alert.
====================================================================
INTENDED USE
====================================================================
0DTE options trading.
5-minute chart confirmation.
Index ETFs and liquid equities such as SPY, QQQ, IWM, and SPX.
Traders who want aggressive entries with confirmation.
Traders who value structure, volume, and risk control.
====================================================================
NOTES
====================================================================
This is not a prediction tool.
Signals require discipline and confirmation.
Best results come from trading only the highest-quality setups.
Pro Cumulative Volume RSI# Pro Cumulative Volume RSI - Professional Trading Indicator
## 📊 What is it?
The **Pro Cumulative Volume RSI** is an advanced momentum oscillator that analyzes buying and selling pressure through volume distribution. Unlike traditional RSI that only tracks price movements, this indicator separates volume into buying and selling components, providing two distinct RSI calculations that reveal market dynamics from both perspectives.
## 🔍 How Does It Work?
### Volume Distribution Algorithm
The indicator uses a sophisticated volume distribution method:
**Buying Volume (BV)** = Volume × (Close - Low) / (High - Low)
**Selling Volume (SV)** = Volume × (High - Close) / (High - Low)
This formula proportionally allocates volume based on where the candle closes within its range:
- If close is near the high → More buying volume
- If close is near the low → More selling volume
### Dual RSI Calculation
The indicator then calculates **two separate RSI values**:
1. **Green Line (Buying Volume RSI)**: Measures the dominance of buying pressure
2. **Red Line (Selling Volume RSI)**: Measures the dominance of selling pressure
Each RSI follows the traditional 14-period calculation but applies it to the volume pressure differences rather than price changes.
## 🎯 How to Use It
### Signal Interpretation
| Scenario | Meaning | Action |
|----------|---------|--------|
| Green > 70, Red < 30 | Strong buying dominance | Consider buying / Hold long |
| Red > 70, Green < 30 | Strong selling dominance | Consider selling / Avoid longs |
| Green crosses above Red | Momentum shift to buyers | Potential buy signal |
| Red crosses above Green | Momentum shift to sellers | Potential sell signal |
| Both near 50 | Balanced market | Wait for confirmation |
### Key Features
**1. Crossover Signals**
- **BUY signal**: When green line crosses above red line with sufficient momentum
- **SELL signal**: When red line crosses above green line with sufficient momentum
- Triangle markers appear automatically on the chart
**2. Divergence Detection**
- **Bullish Divergence (DIV+)**: Price makes lower lows but indicator makes higher lows → Potential reversal up
- **Bearish Divergence (DIV-)**: Price makes higher highs but indicator makes lower highs → Potential reversal down
- Yellow/orange circles mark divergences automatically
**3. Background Coloring**
- **Green background**: Buying pressure dominates
- **Red background**: Selling pressure dominates
- Intensity shows strength of pressure
**4. Live Status Table**
- Real-time RSI values for both buying and selling
- Current momentum status
- Market pressure assessment
- Last detected signal
### Settings Customization
**Basic Settings:**
- **RSI Period**: Default 14, adjust based on your trading timeframe (shorter = more sensitive)
**Visual Settings:**
- **Histogram Mode**: Toggle between line and histogram display
- **Background Coloring**: Enable/disable pressure-based background
- **Transparency**: Adjust background opacity
**Signal Settings:**
- **Crossover Signals**: Show/hide BUY/SELL markers
- **Divergence Detection**: Enable automatic divergence spotting
- **Sensitivity**: Low/Medium/High - controls how strong momentum must be for signals
**Level Lines:**
- **Overbought/Oversold**: Adjust threshold levels (default 70/30)
## ⚠️ IMPORTANT DISCLAIMER
### This Indicator Should NOT Be Used Alone
**ALWAYS combine this indicator with other forms of analysis:**
✅ **Price Action Analysis**
- Support and resistance levels
- Trend lines and chart patterns
- Candlestick formations
✅ **Other Technical Indicators**
- Moving Averages (trend confirmation)
- MACD (momentum confirmation)
- Volume Profile (context)
- ATR (volatility assessment)
- Bollinger Bands (volatility and extremes)
✅ **Multiple Timeframe Analysis**
- Check higher timeframes for overall trend
- Use lower timeframes for precise entries
- Ensure signals align across timeframes
✅ **Fundamental Analysis**
- News and economic events
- Earnings reports (for stocks)
- Market sentiment
- Macro conditions
✅ **Risk Management**
- **NEVER** risk more than 1-2% per trade
- Always use stop losses
- Calculate position size before entering
- Have a clear exit strategy
### Common Pitfalls to Avoid
❌ **Don't** take every signal blindly
❌ **Don't** ignore the overall market trend
❌ **Don't** trade against strong momentum without confirmation
❌ **Don't** forget about major support/resistance levels
❌ **Don't** over-leverage based on indicator signals
❌ **Don't** ignore fundamental catalysts
### Best Practices
✅ **Wait for confluence**: Multiple indicators agreeing
✅ **Consider market context**: Bull/bear market conditions
✅ **Use appropriate timeframes**: Match your trading style
✅ **Backtest first**: Test on historical data before live trading
✅ **Keep a trading journal**: Track what works and what doesn't
✅ **Respect your risk management rules**: Always
## 📈 Example Trading Scenarios
### Scenario 1: Strong Trend Following
- **Setup**: Green RSI consistently above 50, price in uptrend
- **Confirmation**: Higher timeframe trend is up, price above major MA
- **Entry**: BUY signal on pullback when green crosses red
- **Stop Loss**: Below recent swing low
- **Exit**: When red RSI crosses above green or divergence appears
### Scenario 2: Reversal Trading
- **Setup**: Bullish divergence (DIV+) appears at support level
- **Confirmation**: Price shows bullish candlestick pattern, other oscillators oversold
- **Entry**: After confirmation candle closes
- **Stop Loss**: Below divergence low
- **Exit**: At resistance or when momentum weakens
### Scenario 3: Avoiding False Signals
- **Signal**: BUY signal appears
- **Check**: Price is at strong resistance, higher timeframe shows downtrend
- **Action**: **SKIP the trade** - context overrides signal
- **Result**: Protected capital by avoiding low-probability setup
## 🎓 Educational Use
This indicator is designed to help traders:
- Understand volume-based momentum
- Identify shifts in market pressure
- Learn about divergence patterns
- Practice multi-indicator analysis
**Remember**: No indicator is perfect. Markets are complex and influenced by countless factors. Use this tool as one piece of your trading puzzle, not as a standalone solution.
## 📞 Support & Updates
- Report bugs or suggest features via comments
- Check back for updates and improvements
- Share your successful setups to help the community learn
## ⚖️ Legal Disclaimer
**This indicator is for educational and informational purposes only.**
- Not financial advice
- Past performance does not guarantee future results
- Trading involves substantial risk of loss
- Only trade with money you can afford to lose
- Consult with a licensed financial advisor before making investment decisions
**The creator of this indicator assumes no responsibility for trading losses incurred through its use.**
---
## 🚀 Happy Trading!
Remember: **Patience, discipline, and proper risk management** are more important than any indicator. Trade smart, trade safe!
*If you find this indicator helpful, please leave a comment and share your experience!*
Universal Adaptive Tracking🙏🏻 Behold, this is UAT (Universal Adaptive Tracker) , with less words imma proceed how it compares with alternatives:
^^ comparison with non-adaptive quadratic regression (purple line), that has higher overshoots, less precision
^^ comparison with JMA and its adaptive gain. JMA’s gain is heavily limited, while UAT’s negative and positive gains are soft-saturated with p-order Möbius transform
This drop is inspired by, dedicated to, and made will all love towards Jurik Research , who retired in October 2k21. When some1 steps out, some1 has to step in, and that time it’s me (again xd). But there’s some history u gotta know:
Some history u gotta know:
In ~2008 dudes from forexfactory reverse engineered Jurik Moving Average
In late 1990s dudes from Jurik Research approximated the best possible adaptive tracking filter for evolution of prices via engineering miracles
Today in 2k26, me I'm gonna present to you the real mathematical objects/entities behind JMA top-edge engineered approximates. You will prolly be even more happy now then all the dem together back then.
Why all this?
When we talk about object tracking stuff, e.g. air defense, drones, missiles, projectiles, prices, etc, it all comes down to adaptive control and (Position & Velocity & Acceleration) aka PVA state space models (the real stuff many of you count as DSP ).
Why? Cuz while position (P) : (mean), or position & velocity (PV) : (linear regression) are stable enough in dem own ways, Position & Velocity & Acceleration (PVA) : (quadratic regression+) require adaptivity do be stable. And real world stuff needs PVA, due to non-linearity for starters.
So that’s why. If your goal is Really smoothing and no lag, u gotta go there. I see a lot of folks are crazy with it and want it, so here is it, for y’all. And good news, this is perfect for your favorite Moving Windows.
How to use it
The upper study:
The final filter (main state): just as you use other fast smoothers, MAs, etc, you know better than me here
You can also turn in volatility bands in script’s style settings, these do not require any adjustments
Finally, you can turn on, in the same place, separate trackers each based on negative and positive volatility exclusively. When both are almost equal, that indicates stability & persistence in markets. May sound like it’s nothing important, but I've never seen anything like it before. Also, if you'd allow your our inner mental gym hero gloriously arise, you can argue that these 2 separate trackers represent 2 fair prices (one for sellers, one for buyers). All better then 1 imaginary fair price for both (forget about it)
The lower study:
The lower study: you can analyze streams of upward of downward volatilities separately. This is incredibly powerful
You can also turn these off and turn on neg & pos intensities, and use them as trend detector, when each or both cross 1.5 (naturally neutral) threshold.
^^ Upper study with expected typical and maximum volatility bands turned On
...
The method explained
What you got in the end is non-linear, adaptive, lighting fast when needed and slow when required price tracking. All built upon real math entities/objects, not a brilliantly engineered approximation of them. No parameters to optimize, data tells it all.
... It all starts from a process model, in our cause this is...
MFPM (Mechanical Feedback Price Model)
Doesn’t make gaussian assumptions like most quant mainstream tech, accepts that innovations are Laplace “at best”, relies in L inf and L0 spaces.
I created this model neither trynna fit non-fitting ARMA / variants, nor trynna be silly assuming that price state evolution and markets are random.
Theory behind it: if no new volume comes, then price evolution would be simply guided by the feedback based on previous trading activity, pushing prices towards the midrange between 2 latest datapoints, being the main force behind so called “pullbacks” and reason why most pullbacks end just a bit past 50% of a move.
This is the Real mechanical feedback based mean reversion, that is always there in the markets no matter what, think of it as a background process that is always there, and fresh new volume deviates prices away from it. Btw, this can also be expressed as AR2 with both phis = 0.5 .
Then I separate positive and negative innovations from this model and process them separately, reflecting the asymmetry between buy and sell forces, smth that most forget. Both of these follow exponential distribution . Each stream has its own memory so here we use recursive operators . We track maximum innovations (differences between real and expected datapoints) with exponentially decaying damping factor, and keep tracking typical innovation, with the same factor.
Then we calculate what’s called in lovely audio engineering as “ crest factor ”, the difference is we don’t do RMS and stuff. But hey again we work with laplace innovations, so we keep things in L0 and L inf spirit. Then we go a couple of steps further, making this crest factor truly relative (resolution agnostic), and then, most importantly, we apply a natural saturation on it based on p-order Möbius transform, but not with arbitrary p and L, but guided by informational limits of the data. These final "intensity" parameters are what we need next to make our object tracking adaptive.
Extended Beta(2, 2) Window
This is imo the main part of this. Looking at tapering windows in DSP and how wavelets are made from derivatives of PDF functions of probability distributions, I figured that why use just one derivative? That made me come up with Universal Moving Average , that combines PDF and CDF of Beta(2, 2) distribution . And that is fine for P (position) tracking model.
Here we need PVA (position & velocity & acceleration). We can realize that everything starts from PDF, and by adding derivatives and anti-derivatives of it as factors of final window weights, we can create smth truly unique, a weightset that is non-arbitrary and naturally provides response alike quadratic regression does, But, naturally smoothed.
Why do I consider this a discovery, a primordial math object? Because x^2 itself and Beta(2, 2) based on it are the only primitives, esp out of all these dozens of DSP tapering windows, that provide you a finite amount of derivatives. You can keep differentiating Hann window until the kingdom f come, while Welch window aka Beta(2, 2) has a natural stopping point, because the 3rd derivative is 0, so we can’t use it. Symmetrically, we do 2 steps up from PDF, getting 1st and second anti-derivatives. What’s lovely, symmetrically, 3rd antiderivative even tho exist, it stops making any sense. 2nd one still makes sense, it’s smth like “potential” of probability distribution, not really discussed in mainstream open access sources.
Finally, the last part is to introduce adaptivity using these intensity exponents we’ve calculated with MFPM. We do 2 separate trackers, one using the negative intensity exponent, another one uses positive intensity exponent.
And at the end, even tho using both together is cool, the final state estimate is calculated simply as the state which intensity has higher.
^^ impulse response of our final kernel with fixed (non adaptive) intensity exponents: 1 (blue) and 2 (red). You see it's all about phase
…
And that’s all folks.
…
Actually no …
Last, not least, is the ability to add additional innovation weight to the kernel:
^^ Weighting by innovations “On”. Provides incredible tracking precision, paid with smoothness. I think this screenshot, showing what happened after the gap, and how the tracker managed to react, explains it all.
...
Live Long and Prosper, all good TradingView
∞






















