Adaptive ML Trailing Stop [BOSWaves]Adaptive ML Trailing Stop โ Regime-Aware Risk Control with KAMA Adaptation and Pattern-Based Intelligence
Overview
Adaptive ML Trailing Stop is a regime-sensitive trailing stop and risk control system that adjusts stop placement dynamically as market behavior shifts, using efficiency-based smoothing and pattern-informed biasing.
Instead of operating with fixed ATR offsets or rigid trailing rules, stop distance, responsiveness, and directional treatment are continuously recalculated using market efficiency, volatility conditions, and historical pattern resemblance.
This creates a live trailing structure that responds immediately to regime change - contracting during orderly directional movement, relaxing during rotational conditions, and applying probabilistic refinement when pattern confidence is present.
Price is therefore assessed relative to adaptive, condition-aware trailing boundaries rather than static stop levels.
Conceptual Framework
Adaptive ML Trailing Stop is founded on the idea that effective risk control depends on regime context rather than price location alone.
Conventional trailing mechanisms apply constant volatility multipliers, which often results in trend suppression or delayed exits. This framework replaces static logic with adaptive behavior shaped by efficiency state and observed historical outcomes.
Three core principles guide the design:
Stop distance should adjust in proportion to market efficiency.
Smoothing behavior must respond to regime changes.
Trailing logic benefits from probabilistic context instead of fixed rules.
This shifts trailing stops from rigid exit tools into adaptive, regime-responsive risk boundaries.
Theoretical Foundation
The indicator combines adaptive averaging techniques, volatility-based distance modeling, and similarity-weighted pattern analysis.
Kaufmanโs Adaptive Moving Average (KAMA) is used to quantify directional efficiency, allowing smoothing intensity and stop behavior to scale with trend quality. Average True Range (ATR) defines the volatility reference, while a K-Nearest Neighbors (KNN) process evaluates historical price patterns to introduce directional weighting when appropriate.
Three internal systems operate in tandem:
KAMA Efficiency Engine : Evaluates directional efficiency to distinguish structured trends from range conditions and modulate smoothing and stop behavior.
Adaptive ATR Stop Engine : Expands or contracts ATR-derived stop distance based on efficiency, tightening during strong trends and widening in low-efficiency environments.
KNN Pattern Influence Layer : Applies distance-weighted historical pattern outcomes to subtly influence stop placement on both sides.
This design allows stop behavior to evolve with market context rather than reacting mechanically to price changes.
How It Works
Adaptive ML Trailing Stop evaluates price through a sequence of adaptive processes:
Efficiency-Based Regime Identification : KAMA efficiency determines whether conditions favor trend continuation or rotational movement, influencing stop sensitivity.
Volatility-Responsive Scaling : ATR-based stop distance adjusts automatically as efficiency rises or falls.
Pattern-Weighted Adjustment : KNN compares recent price sequences to historical analogs, applying confidence-based bias to stop positioning.
Adaptive Stop Smoothing : Long and short stop levels are smoothed using KAMA logic to maintain structural stability while remaining responsive.
Directional Trailing Enforcement : Stops advance only in the direction of the prevailing regime, preserving invalidation structure.
Gradient Distance Visualization : Gradient fills reflect the relative distance between price and the active stop.
Controlled Interaction Markers : Diamond markers highlight meaningful stop interactions, filtered through cooldown logic to reduce clustering.
Together, these elements form a continuously adapting trailing stop system rather than a fixed exit mechanism.
Interpretation
Adaptive ML Trailing Stop should be interpreted as a dynamic risk envelope:
Long Stop (Green) : Acts as the downside invalidation level during bullish regimes, tightening as efficiency improves.
Short Stop (Red) : Serves as the upside invalidation level during bearish regimes, adjusting width based on efficiency and volatility.
Trend State Changes : Regime flips occur only after confirmed stop breaches, filtering temporary price spikes.
Gradient Depth : Deeper gradient penetration indicates increased extension from the stop rather than imminent reversal.
Pattern Influence : KNN weighting affects stop behavior only when historical agreement is strong and remains neutral otherwise.
Distance, efficiency, and context outweigh isolated price interactions.
Signal Logic & Visual Cues
Adaptive ML Trailing Stop presents two primary visual signals:
Trend Transition Circles : Display when price crosses the opposing trailing stop, confirming a regime change rather than anticipating one.
Stop Interaction Diamonds : Indicate controlled contact with the active stop, subject to cooldown filtering to avoid excessive signals.
Alert generation is limited to confirmed trend transitions to maintain clarity.
Strategy Integration
Adaptive ML Trailing Stop fits within trend-following and risk-managed trading approaches:
Dynamic Risk Framing : Use adaptive stops as evolving invalidation levels instead of fixed exits.
Directional Alignment : Base execution on confirmed regime state rather than speculative reversals.
Efficiency-Based Tolerance : Allow greater price fluctuation during inefficient movement while enforcing tighter control during clean trends.
Pattern-Guided Refinement : Let KNN influence adjust sensitivity without overriding core structure.
Multi-Timeframe Context : Apply higher-timeframe efficiency states to inform lower-timeframe stop responsiveness.
Technical Implementation Details
Core Engine : KAMA-based efficiency measurement with adaptive smoothing
Volatility Model : ATR-derived stop distance scaled by regime
Machine Learning Layer : Distance-weighted KNN with confidence modulation
Visualization : Directional trailing stops with layered gradient fills
Signal Logic : Regime-based transitions and controlled interaction markers
Performance Profile : Optimized for real-time chart execution
Optimal Application Parameters
Timeframe Guidance:
1 - 5 min : Tight adaptive trailing for short-term momentum control
15 - 60 min : Structured intraday trend supervision
4H - Daily : Higher-timeframe regime monitoring
Suggested Baseline Configuration:
KAMA Length : 20
Fast/Slow Periods : 15 / 50
ATR Period : 21
Base ATR Multiplier : 2.5
Adaptive Strength : 1.0
KNN Neighbors : 7
KNN Influence : 0.2
These suggested parameters should be used as a baseline; their effectiveness depends on the asset volatility, liquidity, and preferred entry frequency, so fine-tuning is expected for optimal performance.
Parameter Calibration Notes
Use the following adjustments to refine behavior without altering the core logic:
Excessive chop or overreaction : Increase KAMA Length, Slow Period, and ATR Period to reinforce regime filtering.
Stops feel overly permissive : Reduce the Base ATR Multiplier to tighten invalidation boundaries.
Frequent false regime shifts : Increase KNN Neighbors to demand stronger historical agreement.
Delayed adaptation : Decrease KAMA Length and Fast Period to improve responsiveness during regime change.
Adjustments should be incremental and evaluated over multiple market cycles rather than isolated sessions.
Performance Characteristics
High Effectiveness:
Markets exhibiting sustained directional efficiency
Instruments with recurring structural behavior
Trend-oriented, risk-managed strategies
Reduced Effectiveness:
Highly erratic or event-driven price action
Illiquid markets with unreliable volatility readings
Integration Guidelines
Confluence : Combine with BOSWaves structure or trend indicators
Discipline : Follow adaptive stop behavior rather than forcing exits
Risk Framing : Treat stops as adaptive boundaries, not forecasts
Regime Awareness : Always interpret stop behavior within efficiency context
Disclaimer
Adaptive ML Trailing Stop is a professional-grade adaptive risk and regime management tool. It does not forecast price movement and does not guarantee profitability. Results depend on market conditions, parameter selection, and disciplined execution. BOSWaves recommends deploying this indicator within a broader analytical framework that incorporates structure, volatility, and contextual risk management.
Search in scripts for "bias"
ORB Fusion๐ฏ CORE INNOVATION: INSTITUTIONAL ORB FRAMEWORK WITH FAILED BREAKOUT INTELLIGENCE
ORB Fusion represents a complete institutional-grade Opening Range Breakout system combining classic Market Profile concepts (Initial Balance, day type classification) with modern algorithmic breakout detection, failed breakout reversal logic, and comprehensive statistical tracking. Rather than simply drawing lines at opening range extremes, this system implements the full trading methodology used by professional floor traders and market makersโincluding the critical concept that failed breakouts are often higher-probability setups than successful breakouts .
The Opening Range Hypothesis:
The first 30-60 minutes of trading establishes the day's value area โthe price range where the majority of participants agree on fair value. This range is formed during peak information flow (overnight news digestion, gap reactions, early institutional positioning). Breakouts from this range signal directional conviction; failures to hold breakouts signal trapped participants and create exploitable reversals.
Why Opening Range Matters:
1. Information Aggregation : Opening range reflects overnight news, pre-market sentiment, and early institutional orders. It's the market's initial "consensus" on value.
2. Liquidity Concentration : Stop losses cluster just outside opening range. Breakouts trigger these stops, creating momentum. Failed breakouts trap traders, forcing reversals.
3. Statistical Persistence : Markets exhibit range expansion tendency โwhen price accepts above/below opening range with volume, it often extends 1.0-2.0x the opening range size before mean reversion.
4. Institutional Behavior : Large players (market makers, institutions) use opening range as reference for the day's trading plan. They fade extremes in rotation days and follow breakouts in trend days.
Historical Context:
Opening Range Breakout methodology originated in commodity futures pits (1970s-80s) where floor traders noticed consistent patterns: the first 30-60 minutes established a "fair value zone," and directional moves occurred when this zone was violated with conviction. J. Peter Steidlmayer formalized this observation in Market Profile theory, introducing the "Initial Balance" conceptโthe first hour (two 30-minute periods) defining market structure.
๐ OPENING RANGE CONSTRUCTION
Four ORB Timeframe Options:
1. 5-Minute ORB (0930-0935 ET):
Captures immediate market direction during "opening drive"โthe explosive first few minutes when overnight orders hit the tape.
Use Case:
โข Scalping strategies
โข High-frequency breakout trading
โข Extremely liquid instruments (ES, NQ, SPY)
Characteristics:
โข Very tight range (often 0.2-0.5% of price)
โข Early breakouts common (7 of 10 days break within first hour)
โข Higher false breakout rate (50-60%)
โข Requires sub-minute chart monitoring
Psychology: Captures panic buyers/sellers reacting to overnight news. Range is small because sample size is minimalโonly 5 minutes of price discovery. Early breakouts often fail because they're driven by retail FOMO rather than institutional conviction.
2. 15-Minute ORB (0930-0945 ET):
Balances responsiveness with statistical validity. Captures opening drive plus initial reaction to that drive.
Use Case:
โข Day trading strategies
โข Balanced scalping/swing hybrid
โข Most liquid instruments
Characteristics:
โข Moderate range (0.4-0.8% of price typically)
โข Breakout rate ~60% of days
โข False breakout rate ~40-45%
โข Good balance of opportunity and reliability
Psychology: Includes opening panic AND the first retest/consolidation. Sophisticated traders (institutions, algos) start expressing directional bias. This is the "Goldilocks" timeframeโnot too reactive, not too slow.
3. 30-Minute ORB (0930-1000 ET):
Classic ORB timeframe. Default for most professional implementations.
Use Case:
โข Standard intraday trading
โข Position sizing for full-day trades
โข All liquid instruments (equities, indices, futures)
Characteristics:
โข Substantial range (0.6-1.2% of price)
โข Breakout rate ~55% of days
โข False breakout rate ~35-40%
โข Statistical sweet spot for extensions
Psychology: Full opening auction + first institutional repositioning complete. By 10:00 AM ET, headlines are digested, early stops are hit, and "real" directional players reveal themselves. This is when institutional programs typically finish their opening positioning.
Statistical Advantage: 30-minute ORB shows highest correlation with daily range. When price breaks and holds outside 30m ORB, probability of reaching 1.0x extension (doubling the opening range) exceeds 60% historically.
4. 60-Minute ORB (0930-1030 ET) - Initial Balance:
Steidlmayer's "Initial Balance"โthe foundation of Market Profile theory.
Use Case:
โข Swing trading entries
โข Day type classification
โข Low-frequency institutional setups
Characteristics:
โข Wide range (0.8-1.5% of price)
โข Breakout rate ~45% of days
โข False breakout rate ~25-30% (lowest)
โข Best for trend day identification
Psychology: Full first hour captures A-period (0930-1000) and B-period (1000-1030). By 10:30 AM ET, all early positioning is complete. Market has "voted" on value. Subsequent price action confirms (trend day) or rejects (rotation day) this value assessment.
Initial Balance Theory:
IB represents the market's accepted value area . When price extends significantly beyond IB (>1.5x IB range), it signals a Trend Day โstrong directional conviction. When price remains within 1.0x IB, it signals a Rotation Day โmean reversion environment. This classification completely changes trading strategy.
๐ฌ LTF PRECISION TECHNOLOGY
The Chart Timeframe Problem:
Traditional ORB indicators calculate range using the chart's current timeframe. This creates critical inaccuracies:
Example:
โข You're on a 5-minute chart
โข ORB period is 30 minutes (0930-1000 ET)
โข Indicator sees only 6 bars (30min รท 5min/bar = 6 bars)
โข If any 5-minute bar has extreme wick, entire ORB is distorted
The Problem Amplifies:
โข On 15-minute chart with 30-minute ORB: Only 2 bars sampled
โข On 30-minute chart with 30-minute ORB: Only 1 bar sampled
โข Opening spike or single large wick defines entire range (invalid)
Solution: Lower Timeframe (LTF) Precision:
ORB Fusion uses `request.security_lower_tf()` to sample 1-minute bars regardless of chart timeframe:
```
For 30-minute ORB on 15-minute chart:
- Traditional method: Uses 2 bars (15min ร 2 = 30min)
- LTF Precision: Requests thirty 1-minute bars, calculates true high/low
```
Why This Matters:
Scenario: ES futures, 15-minute chart, 30-minute ORB
โข Traditional ORB: High = 5850.00, Low = 5842.00 (range = 8 points)
โข LTF Precision ORB: High = 5848.50, Low = 5843.25 (range = 5.25 points)
Difference: 2.75 points distortion from single 15-minute wick hitting 5850.00 at 9:31 AM then immediately reversing. LTF precision filters this out by seeing it was a fleeting wick, not a sustained high.
Impact on Extensions:
With inflated range (8 points vs 5.25 points):
โข 1.5x extension projects +12 points instead of +7.875 points
โข Difference: 4.125 points (nearly $200 per ES contract)
โข Breakout signals trigger late; extension targets unreachable
Implementation:
```pinescript
getLtfHighLow() =>
float ha = request.security_lower_tf(syminfo.tickerid, "1", high)
float la = request.security_lower_tf(syminfo.tickerid, "1", low)
```
Function returns arrays of 1-minute high/low values, then finds true maximum and minimum across all samples.
When LTF Precision Activates:
Only when chart timeframe exceeds ORB session window:
โข 5-minute chart + 30-minute ORB: LTF used (chart TF > session bars needed)
โข 1-minute chart + 30-minute ORB: LTF not needed (direct sampling sufficient)
Recommendation: Always enable LTF Precision unless you're on 1-minute charts. The computational overhead is negligible, and accuracy improvement is substantial.
โ๏ธ INITIAL BALANCE (IB) FRAMEWORK
Steidlmayer's Market Profile Innovation:
J. Peter Steidlmayer developed Market Profile in the 1980s for the Chicago Board of Trade. His key insight: market structure is best understood through time-at-price (value area) rather than just price-over-time (traditional charts).
Initial Balance Definition:
IB is the price range established during the first hour of trading, subdivided into:
โข A-Period : First 30 minutes (0930-1000 ET for US equities)
โข B-Period : Second 30 minutes (1000-1030 ET)
A-Period vs B-Period Comparison:
The relationship between A and B periods forecasts the day:
B-Period Expansion (Bullish):
โข B-period high > A-period high
โข B-period low โฅ A-period low
โข Interpretation: Buyers stepping in after opening assessed
โข Implication: Bullish continuation likely
โข Strategy: Buy pullbacks to A-period high (now support)
B-Period Expansion (Bearish):
โข B-period low < A-period low
โข B-period high โค A-period high
โข Interpretation: Sellers stepping in after opening assessed
โข Implication: Bearish continuation likely
โข Strategy: Sell rallies to A-period low (now resistance)
B-Period Contraction:
โข B-period stays within A-period range
โข Interpretation: Market indecisive, digesting A-period information
โข Implication: Rotation day likely, stay range-bound
โข Strategy: Fade extremes, sell high/buy low within IB
IB Extensions:
Professional traders use IB as a ruler to project price targets:
Extension Levels:
โข 0.5x IB : Initial probe outside value (minor target)
โข 1.0x IB : Full extension (major target for normal days)
โข 1.5x IB : Trend day threshold (classifies as trending)
โข 2.0x IB : Strong trend day (rare, ~10-15% of days)
Calculation:
```
IB Range = IB High - IB Low
Bull Extension 1.0x = IB High + (IB Range ร 1.0)
Bear Extension 1.0x = IB Low - (IB Range ร 1.0)
```
Example:
ES futures:
โข IB High: 5850.00
โข IB Low: 5842.00
โข IB Range: 8.00 points
Extensions:
โข 1.0x Bull Target: 5850 + 8 = 5858.00
โข 1.5x Bull Target: 5850 + 12 = 5862.00
โข 2.0x Bull Target: 5850 + 16 = 5866.00
If price reaches 5862.00 (1.5x), day is classified as Trend Day โstrategy shifts from mean reversion to trend following.
๐ DAY TYPE CLASSIFICATION SYSTEM
Four Day Types (Market Profile Framework):
1. TREND DAY:
Definition: Price extends โฅ1.5x IB range in one direction and stays there.
Characteristics:
โข Opens and never returns to IB
โข Persistent directional movement
โข Volume increases as day progresses (conviction building)
โข News-driven or strong institutional flow
Frequency: ~20-25% of trading days
Trading Strategy:
โข DO: Follow the trend, trail stops, let winners run
โข DON'T: Fade extremes, take early profits
โข Key: Add to position on pullbacks to previous extension level
โข Risk: Getting chopped in false trend (see Failed Breakout section)
Example: FOMC decision, payroll report, earnings surpriseโanything creating one-sided conviction.
2. NORMAL DAY:
Definition: Price extends 0.5-1.5x IB, tests both sides, returns to IB.
Characteristics:
โข Two-sided trading
โข Extensions occur but don't persist
โข Volume balanced throughout day
โข Most common day type
Frequency: ~45-50% of trading days
Trading Strategy:
โข DO: Take profits at extension levels, expect reversals
โข DON'T: Hold for massive moves
โข Key: Treat each extension as a profit-taking opportunity
โข Risk: Holding too long when momentum shifts
Example: Typical day with no major catalystsโmarket balancing supply and demand.
3. ROTATION DAY:
Definition: Price stays within IB all day, rotating between high and low.
Characteristics:
โข Never accepts outside IB
โข Multiple tests of IB high/low
โข Decreasing volume (no conviction)
โข Classic range-bound action
Frequency: ~25-30% of trading days
Trading Strategy:
โข DO: Fade extremes (sell IB high, buy IB low)
โข DON'T: Chase breakouts
โข Key: Enter at extremes with tight stops just outside IB
โข Risk: Breakout finally occurs after multiple failures
Example: [/b> Pre-holiday trading, summer doldrums, consolidation after big move.
4. DEVELOPING:
Definition: Day type not yet determined (early in session).
Usage: Classification before 12:00 PM ET when IB extension pattern unclear.
ORB Fusion's Classification Algorithm:
```pinescript
if close > ibHigh:
ibExtension = (close - ibHigh) / ibRange
direction = "BULLISH"
else if close < ibLow:
ibExtension = (ibLow - close) / ibRange
direction = "BEARISH"
if ibExtension >= 1.5:
dayType = "TREND DAY"
else if ibExtension >= 0.5:
dayType = "NORMAL DAY"
else if close within IB:
dayType = "ROTATION DAY"
```
Why Classification Matters:
Same setup (bullish ORB breakout) has opposite implications:
โข Trend Day : Hold for 2.0x extension, trail stops aggressively
โข Normal Day : Take profits at 1.0x extension, watch for reversal
โข Rotation Day : Fade the breakout immediately (likely false)
Knowing day type prevents catastrophic errors like fading a trend day or holding through rotation.
๐ BREAKOUT DETECTION & CONFIRMATION
Three Confirmation Methods:
1. Close Beyond Level (Recommended):
Logic: Candle must close above ORB high (bull) or below ORB low (bear).
Why:
โข Filters out wicks (temporary liquidity grabs)
โข Ensures sustained acceptance above/below range
โข Reduces false breakout rate by ~20-30%
Example:
โข ORB High: 5850.00
โข Bar high touches 5850.50 (wick above)
โข Bar closes at 5848.00 (inside range)
โข Result: NO breakout signal
vs.
โข Bar high touches 5850.50
โข Bar closes at 5851.00 (outside range)
โข Result: BREAKOUT signal confirmed
Trade-off: Slightly delayed entry (wait for close) but much higher reliability.
2. Wick Beyond Level:
Logic: [/b> Any touch of ORB high/low triggers breakout.
Why:
โข Earliest possible entry
โข Captures aggressive momentum moves
Risk:
โข High false breakout rate (60-70%)
โข Stop runs trigger signals
โข Requires very tight stops (difficult to manage)
Use Case: Scalping with 1-2 point profit targets where any penetration = trade.
3. Body Beyond Level:
Logic: [/b> Candle body (close vs open) must be entirely outside range.
Why:
โข Strictest confirmation
โข Ensures directional conviction (not just momentum)
โข Lowest false breakout rate
Example: Trade-off: [/b> Very conservativeโmisses some valid breakouts but rarely triggers on false ones.
Volume Confirmation Layer:
All confirmation methods can require volume validation:
Volume Multiplier Logic: Rationale: [/b> True breakouts are driven by institutional activity (large size). Volume spike confirms real conviction vs. stop-run manipulation.
Statistical Impact: [/b>
โข Breakouts with volume confirmation: ~65% success rate
โข Breakouts without volume: ~45% success rate
โข Difference: 20 percentage points edge
Implementation Note: [/b>
Volume confirmation adds complexityโyou'll miss breakouts that work but lack volume. However, when targeting 1.5x+ extensions (ambitious goals), volume confirmation becomes critical because those moves require sustained institutional participation.
Recommended Settings by Strategy: [/b>
Scalping (1-2 point targets): [/b>
โข Method: Close
โข Volume: OFF
โข Rationale: Quick in/out doesn't need perfection
Intraday Swing (5-10 point targets): [/b>
โข Method: Close
โข Volume: ON (1.5x multiplier)
โข Rationale: Balance reliability and opportunity
Position Trading (full-day holds): [/b>
โข Method: Body
โข Volume: ON (2.0x multiplier)
โข Rationale: Must be certainโlarge stops require high win rate
๐ฅ FAILED BREAKOUT SYSTEM
The Core Insight: [/b>
Failed breakouts are often more profitable [/b> than successful breakouts because they create trapped traders with predictable behavior.
Failed Breakout Definition: [/b>
A breakout that:
1. Initially penetrates ORB level with confirmation
2. Attracts participants (volume spike, momentum)
3. Fails to extend (stalls or immediately reverses)
4. Returns inside ORB range within N bars
Psychology of Failure: [/b>
When breakout fails:
โข Breakout buyers are trapped [/b>: Bought at ORB high, now underwater
โข Early longs reduce: Take profit, fearful of reversal
โข Shorts smell blood: See failed breakout as reversal signal
โข Result: Cascade of selling as trapped bulls exit + new shorts enter
Mirror image for failed bearish breakouts (trapped shorts cover + new longs enter).
Failure Detection Parameters: [/b>
1. Failure Confirmation Bars (default: 3): [/b>
How many bars after breakout to confirm failure?
Logic: Settings: [/b>
โข 2 bars: Aggressive failure detection (more signals, more false failures)
โข 3 bars Balanced (default)
โข 5-10 bars: Conservative (wait for clear reversal)
Why This Matters:
Too few bars: You call "failed breakout" when price is just consolidating before next leg.
Too many bars: You miss the reversal entry (price already back in range).
2. Failure Buffer (default: 0.1 ATR): [/b>
How far inside ORB must price return to confirm failure?
Formula: Why Buffer Matters: clear rejection [/b> (not just hovering at level).
Settings: [/b>
โข 0.0 ATR: No buffer, immediate failure signal
โข 0.1 ATR: Small buffer (default) - filters noise
โข [b>0.2-0.3 ATR: Large buffer - only dramatic failures count
Example: Reversal Entry System: [/b>
When failure confirmed, system generates complete reversal trade:
For Failed Bull Breakout (Short Reversal): [/b>
Entry: [/b> Current close when failure confirmed
Stop Loss: [/b> Extreme high since breakout + 0.10 ATR padding
Target 1: [/b> ORB High - (ORB Range ร 0.5)
Target 2: Target 3: [/b> ORB High - (ORB Range ร 1.5)
Example:
โข ORB High: 5850, ORB Low: 5842, Range: 8 points
โข Breakout to 5853, fails, reverses to 5848 (entry)
โข Stop: 5853 + 1 = 5854 (6 point risk)
โข T1: 5850 - 4 = 5846 (-2 points, 1:3 R:R)
โข T2: 5850 - 8 = 5842 (-6 points, 1:1 R:R)
โข T3: 5850 - 12 = 5838 (-10 points, 1.67:1 R:R)
[b>Why These Targets? [/b>
โข T1 (0.5x ORB below high): Trapped bulls start panic
โข T2 (1.0x ORB = ORB Mid): Major retracement, momentum fully reversed
โข T3 (1.5x ORB): Reversal extended, now targeting opposite side
Historical Performance: [/b>
Failed breakout reversals in ORB Fusion's tracking system show:
โข Win Rate: 65-75% (significantly higher than initial breakouts)
โข Average Winner: 1.2x ORB range
โข Average Loser: 0.5x ORB range (protected by stop at extreme)
โข Expectancy: Strongly positive even with <70% win rate
Why Failed Breakouts Outperform: [/b>
1. Information Advantage: You now know what price did (failed to extend). Initial breakout trades are speculative; reversal trades are reactive to confirmed failure.
2. Trapped Participant Pressure: Every trapped bull becomes a seller. This creates sustained pressure.
3. Stop Loss Clarity: Extreme high is obvious stop (just beyond recent high). Breakout trades have ambiguous stops (ORB mid? Recent low? Too wide or too tight).
4. Mean Reversion Edge: Failed breakouts return to value (ORB mid). Initial breakouts try to escape value (harder to sustain).
Critical Insight: [/b>
"The best trade is often the one that trapped everyone else."
Failed breakouts create asymmetric opportunity because you're trading against [/b> trapped participants rather than with [/b> them. When you see a failed breakout signal, you're seeing real-time evidence that the market rejected directional convictionโthat's exploitable.
๐ FIBONACCI EXTENSION SYSTEM
Six Extension Levels: [/b>
Extensions project how far price will travel after ORB breakout. Based on Fibonacci ratios + empirical market behavior.
1. 1.272x (27.2% Extension): [/b>
Formula: [/b> ORB High/Low + (ORB Range ร 0.272)
Psychology: [/b> Initial probe beyond ORB. Early momentum + trapped shorts (on bull side) covering.
Probability of Reach: [/b> ~75-80% after confirmed breakout
Trading: [/b>
โข First resistance/support after breakout
โข Partial profit target (take 30-50% off)
โข Watch for rejection here (could signal failure in progress)
Why 1.272? [/b> Related to harmonic patterns (1.272 is โ1.618). Empirically, markets often stall at 25-30% extension before deciding whether to continue or fail.
2. 1.5x (50% Extension):
Formula: [/b> ORB High/Low + (ORB Range ร 0.5)
Psychology: [/b> Breakout gaining conviction. Requires sustained buying/selling (not just momentum spike).
Probability of Reach: [/b> ~60-65% after confirmed breakout
Trading: [/b>
โข Major partial profit (take 50-70% off)
โข Move stops to breakeven
โข Trail remaining position
Why 1.5x? [/b> Classic halfway point to 2.0x. Markets often consolidate here before final push. If day type is "Normal," this is likely the high/low for the day.
3. 1.618x (Golden Ratio Extension): [/b>
Formula: [/b> ORB High/Low + (ORB Range ร 0.618)
Psychology: [/b> Strong directional day. Institutional conviction + retail FOMO.
Probability of Reach: [/b> ~45-50% after confirmed breakout
Trading: [/b>
โข Final partial profit (close 80-90%)
โข Trail remainder with wide stop (allow breathing room)
Why 1.618? [/b> Fibonacci golden ratio. Appears consistently in market geometry. When price reaches 1.618x extension, move is "mature" and reversal risk increases.
4. 2.0x (100% Extension): [/b>
Formula: ORB High/Low + (ORB Range ร 1.0)
Psychology: [/b> Trend day confirmed. Opening range completely duplicated.
Probability of Reach: [/b> ~30-35% after confirmed breakout
Trading: Why 2.0x? [/b> Psychological levelโrange doubled. Also corresponds to typical daily ATR in many instruments (opening range ~ 0.5 ATR, daily range ~ 1.0 ATR).
5. 2.618x (Super Extension):
Formula: [/b> ORB High/Low + (ORB Range ร 1.618)
Psychology: [/b> Parabolic move. News-driven or squeeze.
Probability of Reach: [/b> ~10-15% after confirmed breakout
[b>Trading: Why 2.618? [/b> Fibonacci ratio (1.618ยฒ). Rare to reachโwhen it does, move is extreme. Often precedes multi-day consolidation or reversal.
6. 3.0x (Extreme Extension): [/b>
Formula: [/b> ORB High/Low + (ORB Range ร 2.0)
Psychology: [/b> Market melt-up/crash. Only in extreme events.
[b>Probability of Reach: [/b> <5% after confirmed breakout
Trading: [/b>
โข Close immediately if reached
โข These are outlier events (black swans, flash crashes, squeeze-outs)
โข Holding for more is greedโtake windfall profit
Why 3.0x? [/b> Triple opening range. So rare it's statistical noise. When it happens, it's headline news.
Visual Example:
ES futures, ORB 5842-5850 (8 point range), Bullish breakout:
โข ORB High : 5850.00 (entry zone)
โข 1.272x : 5850 + 2.18 = 5852.18 (first resistance)
โข 1.5x : 5850 + 4.00 = 5854.00 (major target)
โข 1.618x : 5850 + 4.94 = 5854.94 (strong target)
โข 2.0x : 5850 + 8.00 = 5858.00 (trend day)
โข 2.618x : 5850 + 12.94 = 5862.94 (extreme)
โข 3.0x : 5850 + 16.00 = 5866.00 (parabolic)
Profit-Taking Strategy:
Optimal scaling out at extensions:
โข Breakout entry at 5850.50
โข 30% off at 1.272x (5852.18) โ +1.68 points
โข 40% off at 1.5x (5854.00) โ +3.50 points
โข 20% off at 1.618x (5854.94) โ +4.44 points
โข 10% off at 2.0x (5858.00) โ +7.50 points
[b>Average Exit: Conclusion: [/b> Scaling out at extensions produces 40% higher expectancy than holding for home runs.
๐ GAP ANALYSIS & FILL PSYCHOLOGY
[b>Gap Definition: [/b>
Price discontinuity between previous close and current open:
โข Gap Up : Open > Previous Close + noise threshold (0.1 ATR)
โข Gap Down : Open < Previous Close - noise threshold
Why Gaps Matter: [/b>
Gaps represent unfilled orders [/b>. When market gaps up, all limit buy orders between yesterday's close and today's open are never filled. Those buyers are "left behind." Psychology: they wait for price to return ("fill the gap") so they can enter. This creates magnetic pull [/b> toward gap level.
Gap Fill Statistics (Empirical): [/b>
โข Gaps <0.5% [/b>: 85-90% fill within same day
โข Gaps 0.5-1.0% [/b>: 70-75% fill within same day, 90%+ within week
โข Gaps >1.0% [/b>: 50-60% fill within same day (major news often prevents fill)
Gap Fill Strategy: [/b>
Setup 1: Gap-and-Go
Gap opens, extends away from gap (doesn't fill).
โข ORB confirms direction away from gap
โข Trade WITH ORB breakout direction
โข Expectation: Gap won't fill today (momentum too strong)
Setup 2: Gap-Fill Fade
Gap opens, but fails to extend. Price drifts back toward gap.
โข ORB breakout TOWARD gap (not away)
โข Trade toward gap fill level
โข Target: Previous close (gap fill complete)
Setup 3: Gap-Fill Rejection
Gap fills (touches previous close) then rejects.
โข ORB breakout AWAY from gap after fill
โข Trade away from gap direction
โข Thesis: Gap filled (orders executed), now resume original direction
[b>Example: Scenario A (Gap-and-Go):
โข ORB breaks upward to $454 (away from gap)
โข Trade: LONG breakout, expect continued rally
โข Gap becomes support ($452)
Scenario B (Gap-Fill):
โข ORB breaks downward through $452.50 (toward gap)
โข Trade: SHORT toward gap fill at $450.00
โข Target: $450.00 (gap filled), close position
Scenario C (Gap-Fill Rejection):
โข Price drifts to $450.00 (gap filled) early in session
โข ORB establishes $450-$451 after gap fill
โข ORB breaks upward to $451.50
โข Trade: LONG breakout (gap is filled, now resume rally)
ORB Fusion Integration: [/b>
Dashboard shows:
โข Gap type (Up/Down/None)
โข Gap size (percentage)
โข Gap fill status (Filled โ / Open)
This informs setup confidence:
โข ORB breakout AWAY from unfilled gap: +10% confidence (gap becomes support/resistance)
โข ORB breakout TOWARD unfilled gap: -10% confidence (gap fill may override ORB)
[b>๐ VWAP & INSTITUTIONAL BIAS [/b>
[b>Volume-Weighted Average Price (VWAP): [/b>
Average price weighted by volume at each price level. Represents true "average" cost for the day.
[b>Calculation: Institutional Benchmark [/b>: Institutions (mutual funds, pension funds) use VWAP as performance benchmark. If they buy above VWAP, they underperformed; below VWAP, they outperformed.
2. [b>Algorithmic Target [/b>: Many algos are programmed to buy below VWAP and sell above VWAP to achieve "fair" execution.
3. [b>Support/Resistance [/b>: VWAP acts as dynamic support (price above) or resistance (price below).
[b>VWAP Bands (Standard Deviations): [/b>
โข [b>1ฯ Band [/b>: VWAP ยฑ 1 standard deviation
- Contains ~68% of volume
- Normal trading range
- Bounces common
โข [b>2ฯ Band [/b>: VWAP ยฑ 2 standard deviations
- Contains ~95% of volume
- Extreme extension
- Mean reversion likely
ORB + VWAP Confluence: [/b>
Highest-probability setups occur when ORB and VWAP align:
Bullish Confluence: [/b>
โข ORB breakout upward (bullish signal)
โข Price above VWAP (institutional buying)
โข Confidence boost: +15%
Bearish Confluence: [/b>
โข ORB breakout downward (bearish signal)
โข Price below VWAP (institutional selling)
โข Confidence boost: +15%
[b>Divergence Warning:
โข ORB breakout upward BUT price below VWAP
โข Conflict: Breakout says "buy," VWAP says "sell"
โข Confidence penalty: -10%
โข Interpretation: Retail buying but institutions not participating (lower quality breakout)
๐ MOMENTUM CONTEXT SYSTEM
[b>Innovation: Candle Coloring by Position
Rather than fixed support/resistance lines, ORB Fusion colors candles based on their [b>relationship to ORB :
[b>Three Zones: [/b>
1. Inside ORB (Blue Boxes): [/b>
[b>Calculation:
โข Darker blue: Near extremes of ORB (potential breakout imminent)
โข Lighter blue: Near ORB mid (consolidation)
[b>Trading: [/b> Coiled springโawait breakout.
[b>2. Above ORB (Green Boxes):
[b>Calculation: 3. Below ORB (Red Boxes):
Mirror of above ORB logic.
[b>Special Contexts: [/b>
[b>Breakout Bar (Darkest Green/Red): [/b>
The specific bar where breakout occurs gets maximum color intensity regardless of distance. This highlights the pivotal moment.
[b>Failed Breakout Bar (Orange/Warning): [/b>
When failed breakout is confirmed, that bar gets orange/warning color. Visual alert: "reversal opportunity here."
[b>Near Extension (Cyan/Magenta Tint): [/b>
When price is within 0.5 ATR of an extension level, candle gets tinted cyan (bull) or magenta (bear). Indicates "target approachingโprepare to take profit."
[b>Why Visual Context? [/b>
Traditional indicators show lines. ORB Fusion shows [b>context-aware momentum [/b>. Glance at chart:
โข Lots of blue? Consolidation day (fade extremes).
โข Progressive green? Trend day (follow).
โข Green then orange? Failed breakout (reversal setup).
This visual language communicates market state instantlyโno interpretation needed.
๐ฏ TRADE SETUP GENERATION & GRADING [/b>
[b>Algorithmic Setup Detection: [/b>
ORB Fusion continuously evaluates market state and generates current best trade setup with:
โข Action (LONG / SHORT / FADE HIGH / FADE LOW / WAIT)
โข Entry price
โข Stop loss
โข Three targets
โข Risk:Reward ratio
โข Confidence score (0-100)
โข Grade (A+ to D)
[b>Setup Types: [/b>
[b>1. ORB LONG (Bullish Breakout): [/b>
[b>Trigger: [/b>
โข Bullish ORB breakout confirmed
โข Not failed
[b>Parameters:
โข Entry: Current close
โข Stop: ORB mid (protects against failure)
โข T1: ORB High + 0.5x range (1.5x extension)
โข T2: ORB High + 1.0x range (2.0x extension)
โข T3: ORB High + 1.618x range (2.618x extension)
[b>Confidence Scoring:
[b>Trigger: [/b>
โข Bearish breakout occurred
โข Failed (returned inside ORB)
[b>Parameters: [/b>
โข Entry: Close when failure confirmed
โข Stop: Extreme low since breakout + 0.10 ATR
โข T1: ORB Low + 0.5x range
โข T2: ORB Low + 1.0x range (ORB mid)
โข T3: ORB Low + 1.5x range
[b>Confidence Scoring:
[b>Trigger:
โข Inside ORB
โข Close > ORB mid (near high)
[b>Parameters: [/b>
โข Entry: ORB High (limit order)
โข Stop: ORB High + 0.2x range
โข T1: ORB Mid
โข T2: ORB Low
[b>Confidence Scoring: [/b>
Base: 40 points (lower baseโrange fading is lower probability than breakout/reversal)
[b>Use Case: [/b> Rotation days. Not recommended on normal/trend days.
[b>6. FADE LOW (Range Trade):
Mirror of FADE HIGH.
[b>7. WAIT:
[b>Trigger: [/b>
โข ORB not complete yet OR
โข No clear setup (price in no-man's-land)
[b>Action: [/b> Observe, don't trade.
[b>Confidence: [/b> 0 points
[b>Grading System:
```
Confidence โ Grade
85-100 โ A+
75-84 โ A
65-74 โ B+
55-64 โ B
45-54 โ C
0-44 โ D
```
[b>Grade Interpretation: [/b>
โข [b>A+ / A: High probability setup. Take these trades.
โข [b>B+ / B [/b>: Decent setup. Trade if fits system rules.
โข [b>C [/b>: Marginal setup. Only if very experienced.
โข [b>D [/b>: Poor setup or no setup. Don't trade.
[b>Example Scenario: [/b>
ES futures:
โข ORB: 5842-5850 (8 point range)
โข Bullish breakout to 5851 confirmed
โข Volume: 2.0x average (confirmed)
โข VWAP: 5845 (price above VWAP โ)
โข Day type: Developing (too early, no bonus)
โข Gap: None
[b>Setup: [/b>
โข Action: LONG
โข Entry: 5851
โข Stop: 5846 (ORB mid, -5 point risk)
โข T1: 5854 (+3 points, 1:0.6 R:R)
โข T2: 5858 (+7 points, 1:1.4 R:R)
โข T3: 5862.94 (+11.94 points, 1:2.4 R:R)
[b>Confidence: LONG with 55% confidence.
Interpretation: Solid setup, not perfect. Trade it if your system allows B-grade signals.
[b>๐ STATISTICS TRACKING & PERFORMANCE ANALYSIS [/b>
[b>Real-Time Performance Metrics: [/b>
ORB Fusion tracks comprehensive statistics over user-defined lookback (default 50 days):
[b>Breakout Performance: [/b>
โข [b>Bull Breakouts: [/b> Total count, wins, losses, win rate
โข [b>Bear Breakouts: [/b> Total count, wins, losses, win rate
[b>Win Definition: [/b> Breakout reaches โฅ1.0x extension (doubles the opening range) before end of day.
[b>Example: [/b>
โข ORB: 5842-5850 (8 points)
โข Bull breakout at 5851
โข Reaches 5858 (1.0x extension) by close
โข Result: WIN
[b>Failed Breakout Performance: [/b>
โข [b>Total Failed Breakouts [/b>: Count of breakouts that failed
โข [b>Reversal Wins [/b>: Count where reversal trade reached target
โข [b>Failed Reversal Win Rate [/b>: Wins / Total Failed
[b>Win Definition for Reversals: [/b>
โข Failed bull โ reversal short reaches ORB mid
โข Failed bear โ reversal long reaches ORB mid
[b>Extension Tracking: [/b>
โข [b>Average Extension Reached [/b>: Mean of maximum extension achieved across all breakout days
โข [b>Max Extension Overall [/b>: Largest extension ever achieved in lookback period
[b>Example: ๐จ THREE DISPLAY MODES
[b>Design Philosophy: [/b>
Not all traders need all features. Beginners want simplicity. Professionals want everything. ORB Fusion adapts.
[b>SIMPLE MODE: [/b>
[b>Shows: [/b>
โข Primary ORB levels (High, Mid, Low)
โข ORB box
โข Breakout signals (triangles)
โข Failed breakout signals (crosses)
โข Basic dashboard (ORB status, breakout status, setup)
โข VWAP
[b>Hides: [/b>
โข Session ORBs (Asian, London, NY)
โข IB levels and extensions
โข ORB extensions beyond basic levels
โข Gap analysis visuals
โข Statistics dashboard
โข Momentum candle coloring
โข Narrative dashboard
[b>Use Case: [/b>
โข Traders who want clean chart
โข Focus on core ORB concept only
โข Mobile trading (less screen space)
[b>STANDARD MODE:
[b>Shows Everything in Simple Plus: [/b>
โข Session ORBs (Asian, London, NY)
โข IB levels (high, low, mid)
โข IB extensions
โข ORB extensions (1.272x, 1.5x, 1.618x, 2.0x)
โข Gap analysis and fill targets
โข VWAP bands (1ฯ and 2ฯ)
โข Momentum candle coloring
โข Context section in dashboard
โข Narrative dashboard
[b>Hides: [/b>
โข Advanced extensions (2.618x, 3.0x)
โข Detailed statistics dashboard
[b>Use Case: [/b>
โข Most traders
โข Balance between information and clarity
โข Covers 90% of use cases
[b>ADVANCED MODE:
[b>Shows Everything:
โข All session ORBs
โข All IB levels and extensions
โข All ORB extensions (including 2.618x and 3.0x)
โข Full gap analysis
โข VWAP with both 1ฯ and 2ฯ bands
โข Momentum candle coloring
โข Complete statistics dashboard
โข Narrative dashboard
โข All context metrics
[b>Use Case: [/b>
โข Professional traders
โข System developers
โข Those who want maximum information density
[b>Switching Modes: [/b>
Single dropdown input: "Display Mode" โ Simple / Standard / Advanced
Entire indicator adapts instantly. No need to toggle 20 individual settings.
๐ NARRATIVE DASHBOARD
[b>Innovation: Plain-English Market State [/b>
Most indicators show data. ORB Fusion explains what the data [b>means [/b>.
[b>Narrative Components: [/b>
[b>1. Phase: [/b>
โข "๐ Building ORB..." (during ORB session)
โข "๐ Trading Phase" (after ORB complete)
โข "โณ Pre-Market" (before ORB session)
[b>2. Status (Current Observation): [/b>
โข "โ ๏ธ Failed breakout - reversal likely"
โข "๐ Bullish momentum in play"
โข "๐ Bearish momentum in play"
โข "โ๏ธ Consolidating in range"
โข "๐ Monitoring for setup"
[b>3. Next Level:
Tells you what to watch for:
โข "๐ฏ 1.5x @ 5854.00" (next extension target)
โข "Watch ORB levels" (inside range, await breakout)
[b>4. Setup: [/b>
Current trade setup + grade:
โข "LONG " (bullish breakout, A-grade)
โข "๐ฅ SHORT REVERSAL " (failed bull breakout, A+-grade)
โข "WAIT " (no setup)
[b>5. Reason: [/b>
Why this setup exists:
โข "ORB Bullish Breakout"
โข "Failed Bear Breakout - High Probability Reversal"
โข "Range Fade - Near High"
[b>6. Tip (Market Insight):
Contextual advice:
โข "๐ฅ TREND DAY - Trail stops" (day type is trending)
โข "๐ ROTATION - Fade extremes" (day type is rotating)
โข "๐ Gap unfilled - magnet level" (gap creates target)
โข "๐ Normal conditions" (no special context)
[b>Example Narrative:
```
๐ ORB Narrative
โโโโโโโโโโโโโโโโ
Phase | ๐ Trading Phase
Status | ๐ Bullish momentum in play
Next | ๐ฏ 1.5x @ 5854.00
๐ Setup | LONG
Reason | ORB Bullish Breakout
๐ก Tip | ๐ฅ TREND DAY - Trail stops
```
[b>Glance Interpretation: [/b>
"We're in trading phase. Bullish breakout happened (momentum in play). Next target is 1.5x extension at 5854. Current setup is LONG with A-grade. It's a trend day, so trail stops (don't take early profits)."
Complete market state communicated in 6 lines. No interpretation needed.
[b>Why This Matters:
Beginner traders struggle with "So what?" question. Indicators show lines and signals, but what does it mean [/b>? Narrative dashboard bridges this gap.
Professional traders benefit tooโrapid context assessment during fast-moving markets. No time to analyze; glance at narrative, get action plan.
๐ INTELLIGENT ALERT SYSTEM
[b>Four Alert Types: [/b>
[b>1. Breakout Alert: [/b>
[b>Trigger: [/b> ORB breakout confirmed (bull or bear)
[b>Message: [/b>
```
๐ ORB BULLISH BREAKOUT
Price: 5851.00
Volume Confirmed
Grade: A
```
[b>Frequency: [/b> Once per bar (prevents spam)
[b>2. Failed Breakout Alert: [/b>
[b>Trigger: [/b> Breakout fails, reversal setup generated
[b>Message: [/b>
```
๐ฅ FAILED BULLISH BREAKOUT!
HIGH PROBABILITY SHORT REVERSAL
Entry: 5848.00
Stop: 5854.00
T1: 5846.00
T2: 5842.00
Historical Win Rate: 73%
```
[b>Why Comprehensive? [/b> Failed breakout alerts include complete trade plan. You can execute immediately from alertโno need to check chart.
[b>3. Extension Alert:
[b>Trigger: [/b> Price reaches extension level for first time
[b>Message: [/b>
```
๐ฏ Bull Extension 1.5x reached @ 5854.00
```
[b>Use: [/b> Profit-taking reminder. When extension hit, consider scaling out.
[b>4. IB Break Alert: [/b>
[b>Trigger: [/b> Price breaks above IB high or below IB low
[b>Message: [/b>
```
๐ IB HIGH BROKEN - Potential Trend Day
```
[b>Use: [/b> Day type classification. IB break suggests trend day developingโadjust strategy to trend-following mode.
[b>Alert Management: [/b>
Each alert type can be enabled/disabled independently. Prevents notification overload.
[b>Cooldown Logic: [/b>
Alerts won't fire if same alert type triggered within last bar. Prevents:
โข "Breakout" alert every tick during choppy breakout
โข Multiple "extension" alerts if price oscillates at level
Ensures: One clean alert per event.
โ๏ธ KEY PARAMETERS EXPLAINED
[b>Opening Range Settings: [/b>
โข [b>ORB Timeframe [/b> (5/15/30/60 min): Duration of opening range window
- 30 min recommended for most traders
โข [b>Use RTH Only [/b> (ON/OFF): Only trade during regular trading hours
- ON recommended (avoids thin overnight markets)
โข [b>Use LTF Precision [/b> (ON/OFF): Sample 1-minute bars for accuracy
- ON recommended (critical for charts >1 minute)
โข [b>Precision TF [/b> (1/5 min): Timeframe for LTF sampling
- 1 min recommended (most accurate)
[b>Session ORBs: [/b>
โข [b>Show Asian/London/NY ORB [/b> (ON/OFF): Display multi-session ranges
- OFF in Simple mode
- ON in Standard/Advanced if trading 24hr markets
โข [b>Session Windows [/b>: Time ranges for each session ORB
- Defaults align with major session opens
[b>Initial Balance: [/b>
โข [b>Show IB [/b> (ON/OFF): Display Initial Balance levels
- ON recommended for day type classification
โข [b>IB Session Window [/b> (0930-1030): First hour of trading
- Default is standard for US equities
โข [b>Show IB Extensions [/b> (ON/OFF): Project IB extension targets
- ON recommended (identifies trend days)
โข [b>IB Extensions 1-4 [/b> (0.5x, 1.0x, 1.5x, 2.0x): Extension multipliers
- Defaults are Market Profile standard
[b>ORB Extensions: [/b>
โข [b>Show Extensions [/b> (ON/OFF): Project ORB extension targets
- ON recommended (defines profit targets)
โข [b>Enable Individual Extensions [/b> (1.272x, 1.5x, 1.618x, 2.0x, 2.618x, 3.0x)
- Enable 1.272x, 1.5x, 1.618x, 2.0x minimum
- Disable 2.618x and 3.0x unless trading very volatile instruments
[b>Breakout Detection:
โข [b>Confirmation Method [/b> (Close/Wick/Body):
- Close recommended (best balance)
- Wick for scalping
- Body for conservative
โข [b>Require Volume Confirmation [/b> (ON/OFF):
- ON recommended (increases reliability)
โข [b>Volume Multiplier [/b> (1.0-3.0):
- 1.5x recommended
- Lower for thin instruments
- Higher for heavy volume instruments
[b>Failed Breakout System: [/b>
โข [b>Enable Failed Breakouts [/b> (ON/OFF):
- ON strongly recommended (highest edge)
โข [b>Bars to Confirm Failure [/b> (2-10):
- 3 bars recommended
- 2 for aggressive (more signals, more false failures)
- 5+ for conservative (fewer signals, higher quality)
โข [b>Failure Buffer [/b> (0.0-0.5 ATR):
- 0.1 ATR recommended
- Filters noise during consolidation near ORB level
โข [b>Show Reversal Targets [/b> (ON/OFF):
- ON recommended (visualizes trade plan)
โข [b>Reversal Target Mults [/b> (0.5x, 1.0x, 1.5x):
- Defaults are tested values
- Adjust based on average daily range
[b>Gap Analysis:
โข [b>Show Gap Analysis [/b> (ON/OFF):
- ON if trading instruments that gap frequently
- OFF for 24hr markets (forex, cryptoโno gaps)
โข [b>Gap Fill Target [/b> (ON/OFF):
- ON to visualize previous close (gap fill level)
[b>VWAP:
โข [b>Show VWAP [/b> (ON/OFF):
- ON recommended (key institutional level)
โข [b>Show VWAP Bands [/b> (ON/OFF):
- ON in Standard/Advanced
- OFF in Simple
โข [b>Band Multipliers (1.0ฯ, 2.0ฯ):
- Defaults are standard
- 1ฯ = normal range, 2ฯ = extreme
[b>Day Type: [/b>
โข [b>Show Day Type Analysis [/b> (ON/OFF):
- ON recommended (critical for strategy adaptation)
โข [b>Trend Day Threshold [/b> (1.0-2.5 IB mult):
- 1.5x recommended
- When price extends >1.5x IB, classifies as Trend Day
[b>Enhanced Visuals:
โข [b>Show Momentum Candles [/b> (ON/OFF):
- ON for visual context
- OFF if chart gets too colorful
โข [b>Show Gradient Zone Fills [/b> (ON/OFF):
- ON for professional look
- OFF for minimalist chart
โข [b>Label Display Mode [/b> (All/Adaptive/Minimal):
- Adaptive recommended (shows nearby labels only)
- All for information density
- Minimal for clean chart
โข [b>Label Proximity [/b> (1.0-5.0 ATR):
- 3.0 ATR recommended
- Labels beyond this distance are hidden (Adaptive mode)
[b>๐ PROFESSIONAL USAGE PROTOCOL [/b>
[b>Phase 1: Learning the System (Week 1) [/b>
[b>Goal: [/b> Understand ORB concepts and dashboard interpretation
[b>Setup: [/b>
โข Display Mode: STANDARD
โข ORB Timeframe: 30 minutes
โข Enable ALL features (IB, extensions, failed breakouts, VWAP, gap analysis)
โข Enable statistics tracking
[b>Actions: [/b>
โข Paper trade ONLYโno real money
โข Observe ORB formation every day (9:30-10:00 AM ET for US markets)
โข Note when ORB breakouts occur and if they extend
โข Note when breakouts fail and reversals happen
โข Watch day type classification evolve during session
โข Track statisticsโwhich setups are working?
[b>Key Learning: [/b>
โข How often do breakouts reach 1.5x extension? (typically 50-60% of confirmed breakouts)
โข How often do breakouts fail? (typically 30-40%)
โข Which setup grade (A/B/C) actually performs best? (should see A-grade outperforming)
โข What day type produces best results? (trend days favor breakouts, rotation days favor fades)
[b>Phase 2: Parameter Optimization (Week 2) [/b>
[b>Goal: [/b> Tune system to your instrument and timeframe
[b>ORB Timeframe Selection:
โข Run 5 days with 15-minute ORB
โข Run 5 days with 30-minute ORB
โข Compare: Which captures better breakouts on your instrument?
โข Typically: 30-minute optimal for most, 15-minute for very liquid (ES, SPY)
[b>Volume Confirmation Testing:
โข Run 5 days WITH volume confirmation
โข Run 5 days WITHOUT volume confirmation
โข Compare: Does volume confirmation increase win rate?
โข If win rate improves by >5%: Keep volume confirmation ON
โข If no improvement: Turn OFF (avoid missing valid breakouts)
[b>Failed Breakout Bars:
[b>Goal: [/b> Develop personal trading rules based on system signals
[b>Setup Selection Rules: [/b>
Define which setups you'll trade:
โข [b>Conservative: [/b> Only A+ and A grades
โข [b>Balanced: [/b> A+, A, B+ grades
โข [b>Aggressive: [/b> All grades B and above
Test each approach for 5-10 trades, compare results.
[b>Position Sizing by Grade: [/b>
Consider risk-weighting by setup quality:
โข A+ grade: 100% position size
โข A grade: 75% position size
โข B+ grade: 50% position size
โข B grade: 25% position size
Example: If max risk is $1000/trade:
โข A+ setup: Risk $1000
โข A setup: Risk $750
โข B+ setup: Risk $500
This matches bet sizing to edge.
[b>Day Type Adaptation: [/b>
Create rules for different day types:
Trend Days:
โข Take ALL breakout signals (A/B/C grades)
โข Hold for 2.0x extension minimum
โข Trail stops aggressively (1.0 ATR trail)
โข DON'T fadeโreversals unlikely
Rotation Days:
โข ONLY take failed breakout reversals
โข Ignore initial breakout signals (likely to fail)
โข Take profits quickly (0.5x extension)
โข Focus on fade setups (Fade High/Fade Low)
Normal Days:
โข Take A/A+ breakout signals only
โข Take ALL failed breakout reversals (high probability)
โข Target 1.0-1.5x extensions
โข Partial profit-taking at extensions
Time-of-Day Rules: [/b>
Breakouts at different times have different probabilities:
10:00-10:30 AM (Early Breakout):
โข ORB just completed
โข Fresh breakout
โข Probability: Moderate (50-55% reach 1.0x)
โข Strategy: Conservative position sizing
10:30-12:00 PM (Mid-Morning):
โข Momentum established
โข Volume still healthy
โข Probability: High (60-65% reach 1.0x)
โข Strategy: Standard position sizing
12:00-2:00 PM (Lunch Doldrums):
โข Volume dries up
โข Whipsaw risk increases
โข Probability: Low (40-45% reach 1.0x)
โข Strategy: Avoid new entries OR reduce size 50%
2:00-4:00 PM (Afternoon Session):
โข Late-day positioning
โข EOD squeezes possible
โข Probability: Moderate-High (55-60%)
โข Strategy: Watch for IB breakโif trending all day, follow
[b>Phase 4: Live Micro-Sizing (Month 2) [/b>
[b>Goal: [/b> Validate paper trading results with minimal risk
[b>Setup: [/b>
โข 10-20% of intended full position size
โข Take ONLY A+ and A grade setups
โข Follow stop loss and targets religiously
[b>Execution: [/b>
โข Execute from alerts OR from dashboard setup box
โข Entry: Close of signal bar OR next bar market order
โข Stop: Use exact stop from setup (don't widen)
โข Targets: Scale out at T1/T2/T3 as indicated
[b>Tracking: [/b>
โข Log every trade: Entry, Exit, Grade, Outcome, Day Type
โข Calculate: Win rate, Average R-multiple, Max consecutive losses
โข Compare to paper trading results (should be within 15%)
[b>Red Flags: [/b>
โข Win rate <45%: System not suitable for this instrument/timeframe
โข Major divergence from paper trading: Execution issues (slippage, late entries, emotional exits)
โข Max consecutive losses >8: Hitting rough patch OR market regime changed
[b>Phase 5: Scaling Up (Months 3-6)
[b>Goal: [/b> Gradually increase to full position size
[b>Progression: [/b>
โข Month 3: 25-40% size (if micro-sizing profitable)
โข Month 4: 40-60% size
โข Month 5: 60-80% size
โข Month 6: 80-100% size
[b>Milestones Required to Scale Up: [/b>
โข Minimum 30 trades at current size
โข Win rate โฅ48%
โข Profit factor โฅ1.2
โข Max drawdown <20%
โข Emotional control (no revenge trading, no FOMO)
[b>Advanced Techniques:
[b>Multi-Timeframe ORB: Assumes first 30-60 minutes establish value. Violation: Market opens after major news, price discovery continues for hours (opening range meaningless).
2. [b>Volume Indicates Conviction: ES, NQ, RTY, SPY, QQQโhigh liquidity, clean ORB formation, reliable extensions
โข [b>Large-Cap Stocks: AAPL, MSFT, TSLA, NVDA (>$5B market cap, >5M daily volume)
โข [b>Liquid Futures: CL (crude oil), GC (gold), 6E (EUR/USD), ZB (bonds)โ24hr markets benefit from session ORBs
โข [b>Major Forex Pairs: [/b> EUR/USD, GBP/USD, USD/JPYโLondon/NY session ORBs work well
[b>Performs Poorly On: [/b>
โข [b>Illiquid Stocks: <$1M daily volume, wide spreads, gappy price action
โข [b>Penny Stocks: [/b> Manipulated, pump-and-dump, no real price discovery
โข [b>Low-Volume ETFs: Exotic sector ETFs, leveraged products with thin volume
โข [b>Crypto on Sketchy Exchanges: Wash trading, spoofing invalidates volume analysis
โข [b>Earnings Days: [/b> ORB completes before earnings release, then completely resets (useless)
โข Binary Event Days: FDA approvals, court rulingsโdiscontinuous price action
[b>Known Weaknesses: [/b>
โข [b>Slow Starts: ORB doesn't complete until 10:00 AM (30-min ORB). Early morning traders have no signals for 30 minutes. Consider using 15-minute ORB if this is problematic.
โข [b>Failure Detection Lag: [/b> Failed breakout requires 3+ bars to confirm. By the time system signals reversal, price may have already moved significantly back inside range. Manual traders watching in real-time can enter earlier.
โข [b>Extension Overshoot: [/b> System projects extensions mathematically (1.5x, 2.0x, etc.). Actual moves may stop short (1.3x) or overshoot (2.2x). Extensions are targets, not magnets.
โข [b>Day Type Misclassification: [/b> Early in session, day type is "Developing." By the time it's classified definitively (often 11:00 AM+), half the day is over. Strategy adjustments happen late.
โข [b>Gap Assumptions: [/b> System assumes gaps want to fill. Strong trend days never fill gaps (gap becomes support/resistance forever). Blindly trading toward gaps can backfire on trend days.
โข [b>Volume Data Quality: Forex doesn't have centralized volume (uses tick volume as proxyโless reliable). Crypto volume is often fake (wash trading). Volume confirmation less effective on these instruments.
โข [b>Multi-Session Complexity: [/b> When using Asian/London/NY ORBs simultaneously, chart becomes cluttered. Requires discipline to focus on relevant session for current time.
[b>Risk Factors: [/b>
โข [b>Opening Gaps: Large gaps (>2%) can create distorted ORBs. Opening range might be unusually wide or narrow, making extensions unreliable.
โข [b>Low Volatility Environments:[/b> When VIX <12, opening ranges can be tiny (0.2-0.3%). Extensions are equally tiny. Profit targets don't justify commission/slippage.
โข [b>High Volatility Environments:[/b> When VIX >30, opening ranges are huge (2-3%+). Extensions project unrealistic targets. Failed breakouts happen faster (volatility whipsaw).
โข [b>Algorithm Dominance:[/b> In heavily algorithmic markets (ES during overnight session), ORB levels can be manipulatedโalgos pin price to ORB high/low intentionally. Breakouts become stop-runs rather than genuine directional moves.
[b>โ ๏ธ RISK DISCLOSURE[/b>
Trading futures, stocks, options, forex, and cryptocurrencies involves substantial risk of loss and is not suitable for all investors. Opening Range Breakout strategies, while based on sound market structure principles, do not guarantee profits and can result in significant losses.
The ORB Fusion indicator implements professional trading concepts including Opening Range theory, Market Profile Initial Balance analysis, Fibonacci extensions, and failed breakout reversal logic. These methodologies have theoretical foundations but past performanceโwhether backtested or liveโis not indicative of future results.
Opening Range theory assumes the first 30-60 minutes of trading establish a meaningful value area and that breakouts from this range signal directional conviction. This assumption may not hold during:
โข Major news events (FOMC, NFP, earnings surprises)
โข Market structure changes (circuit breakers, trading halts)
โข Low liquidity periods (holidays, early closures)
โข Algorithmic manipulation or spoofing
Failed breakout detection relies on patterns of trapped participant behavior. While historically these patterns have shown statistical edges, market conditions change. Institutional algorithms, changing market structure, or regime shifts can reduce or eliminate edges that existed historically.
Initial Balance classification (trend day vs rotation day vs normal day) is a heuristic framework, not a deterministic prediction. Day type can change mid-session. Early classification may prove incorrect as the day develops.
Extension projections (1.272x, 1.5x, 1.618x, 2.0x, etc.) are probabilistic targets derived from Fibonacci ratios and empirical market behavior. They are not "support and resistance levels" that price must reach or respect. Markets can stop short of extensions, overshoot them, or ignore them entirely.
Volume confirmation assumes high volume indicates institutional participation and conviction. In algorithmic markets, volume can be artificially high (HFT activity) or artificially low (dark pools, internalization). Volume is a proxy, not a guarantee of conviction.
LTF precision sampling improves ORB accuracy by using 1-minute bars but introduces additional data dependencies. If 1-minute data is unavailable, inaccurate, or delayed, ORB calculations will be incorrect.
The grading system (A+/A/B+/B/C/D) and confidence scores aggregate multiple factors (volume, VWAP, day type, IB expansion, gap context) into a single assessment. This is a mechanical calculation, not artificial intelligence. The system cannot adapt to unprecedented market conditions or events outside its programmed logic.
Real trading involves slippage, commissions, latency, partial fills, and rejected orders not present in indicator calculations. ORB Fusion generates signals at bar close; actual fills occur with delay. Opening range forms during highest volatility (first 30 minutes)โspreads widen, slippage increases. Execution quality significantly impacts realized results.
Statistics tracking (win rates, extension levels reached, day type distribution) is based on historical bars in your lookback window. If lookback is small (<50 bars) or market regime changed, statistics may not represent future probabilities.
Users must independently validate system performance on their specific instruments, timeframes, and broker execution environment. Paper trade extensively (100+ trades minimum) before risking capital. Start with micro position sizing (5-10% of intended size) for 50+ trades to validate execution quality matches expectations.
Never risk more than you can afford to lose completely. Use proper position sizing (0.5-2% risk per trade maximum). Implement stop losses on every single trade without exception. Understand that most retail traders lose moneyโsophisticated indicators do not change this fundamental reality. They systematize analysis but cannot eliminate risk.
The developer makes no warranties regarding profitability, suitability, accuracy, reliability, or fitness for any purpose. Users assume full responsibility for all trading decisions, parameter selections, risk management, and outcomes.
By using this indicator, you acknowledge that you have read, understood, and accepted these risk disclosures and limitations, and you accept full responsibility for all trading activity and potential losses.
[b>โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ[/b>
[b>CLOSING STATEMENT[/b>
[b>โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ[/b>
Opening Range Breakout is not a trick. It's a framework. The first 30-60 minutes reveal where participants believe value lies. Breakouts signal directional conviction. Failures signal trapped participants. Extensions define profit targets. Day types dictate strategy. Failed breakouts create the highest-probability reversals.
ORB Fusion doesn't predict the futureโit identifies [b>structure[/b>, detects [b>breakouts[/b>, recognizes [b>failures[/b>, and generates [b>probabilistic trade plans[/b> with defined risk and reward.
The edge is not in the opening range itself. The edge is in recognizing when the market respects structure (follow breakouts) versus when it violates structure (fade breakouts). The edge is in detecting failures faster than discretionary traders. The edge is in systematic classification that prevents catastrophic errorsโlike fading a trend day or holding through rotation.
Most indicators draw lines. ORB Fusion implements a complete institutional trading methodology: Opening Range theory, Market Profile classification, failed breakout intelligence, Fibonacci projections, volume confirmation, gap psychology, and real-time performance tracking.
Whether you're a beginner learning market structure or a professional seeking systematic ORB implementation, this system provides the framework.
"The market's first word is its opening range. Everything after is commentary." โ ORB Fusion
EMA 8 / 20 / 200Created to easily use the 8/20/200 strategy.
This indicator is designed to give a clear, multi-timeframe view of trend, momentum, and structure using three exponential moving averages.
1. Trend direction (EMA 200 โ pink)
The 200 EMA acts as the long-term trend filter.
Price above the 200 EMA suggests a bullish market bias.
Price below the 200 EMA suggests a bearish market bias.
Many traders avoid taking trades against this higher-timeframe direction.
2. Momentum and trade bias (EMA 20 โ blue)
The 20 EMA reflects short-term momentum.
When price respects the 20 EMA in an uptrend, pullbacks often provide continuation entries.
In downtrends, the 20 EMA frequently acts as dynamic resistance.
3. Entry timing (EMA 8 โ yellow)
The 8 EMA is a fast reaction line used for precise timing.
Crosses of the 8 EMA over the 20 EMA can signal momentum shifts.
Strong trends often show price holding above (or below) the 8 EMA during impulse moves.
4. Confluence and trade filtering
The indicator works best when the EMAs are aligned:
Bullish alignment: EMA 8 > EMA 20 > EMA 200
Bearish alignment: EMA 8 < EMA 20 < EMA 200
Misaligned EMAs usually indicate consolidation or low-probability conditions.
5. Risk management context
EMAs can act as dynamic support and resistance:
Stops are often placed beyond the 20 EMA or 200 EMA depending on trade horizon.
Loss of EMA structure is a warning sign that the trend may be weakening.
In short, the indicator is a trend-first, momentum-second framework that helps you decide when to trade, in which direction, and when to stay out.
Colby Cheese VWAP Setup [v2.0]๐ง Core Refactors
โข Imbalance function fixed:
โข Removed invalid usage.
โข Now uses for past bar references.
โข Bias checks are handled outside the function with proper series indexing.
โข Bias alignment:
โข Added and so CHoCH signals only fire when price change agrees with EMA bias.
โข Swing reset:
โข After a valid CHoCH, and reset to so stale levels donโt keep firing.
โข Line/label management:
โข CHoCH lines and labels now reuse persistent IDs (, ) instead of spamming new objects every trigger.
โจ New Features
โข Anticipation mode:
โข Blue โAnticipateโ lines/labels drawn when delta + bias align before CHoCH confirmation.
โข Helps you see potential setups earlier.
โข Entry zone lines:
โข Solid green/red lines drawn at entry levels when is enabled.
โข Separate from FRVP dashed zones.
โข Stopโloss lines:
โข Orange dotted lines drawn opposite the entry zone when is enabled.
โข Gives a visual risk marker.
๐จ Visual Consistency
โข Candle coloring simplified: white candles only when CHoCH triggers.
โข FRVP zones remain dashed lines with โEnterโ labels.
โข Anticipation zones are blue solid lines.
โข Entry zones are solid green/red.
โข Stopโloss lines are orange dotted.
Ichimoku + VWAP + OBV + ATR Full System (NQ Daytrade)Extended Indicator Description
Ichimoku + VWAP + OBV + ATR Full System is a rule-based intraday trading indicator designed specifically for NQ day trading, focusing on trend alignment, participation confirmation, and volatility-aware execution.
This indicator does not rely on a single signal or crossover. Instead, it integrates multiple market dimensions into one structured framework to help traders identify high-probability trend continuation scenarios while avoiding low-quality, range-bound conditions.
System Philosophy
The core idea of this system is simple:
trade only when trend, price location, volume, and volatility are aligned.
Each component plays a specific role and is not meant to be used in isolation. The indicator works best when all conditions reinforce the same directional bias.
Component Breakdown
Ichimoku Cloud
Used to define the primary market structure and directional bias. The system favors trades only when price action aligns clearly above or below the cloud, helping filter out indecisive or transitional phases.
VWAP
Acts as a session-based equilibrium reference. Price position and distance relative to VWAP are used to confirm whether the market is trending with intent rather than reverting to the mean.
OBV (On-Balance Volume)
Provides participation and flow confirmation. OBV helps validate whether price movement is supported by volume, reducing the likelihood of false breakouts or weak trend signals.
ATR (Average True Range)
Used as a volatility filter and risk-awareness tool. ATR conditions help the system avoid low-volatility environments and support more realistic expectations for intraday movement.
Trade Logic Overview
The system is designed around trend-following pullbacks, not prediction or counter-trend trading.
When trend structure is established and confirmed by VWAP positioning and OBV behavior, pullback zones within the trend become areas of interest. ATR conditions ensure that trades are taken only when sufficient movement potential exists.
Rather than generating frequent signals, the system prioritizes selectivity and clarity, making it suitable for disciplined day traders who value context over quantity.
Intended Use
This indicator is built for:
NQ intraday and day trading
Trend continuation and pullback strategies
Traders who prefer structured, confirmation-based systems
Lower to mid intraday timeframes such as 3-minute, 5-minute, and 15-minute charts
Important Notes
This is not an automated trading system and does not provide guaranteed results. The indicator is designed as a decision-support tool to assist with market context, directional bias, and trade timing. Risk management, execution, and position sizing remain the responsibility of the user.
๋กฑ/์ ์ผ๊ฐํ ์๊ทธ๋
๋๊ทธ๋ผ๋ฏธ ์ฒญ์ฐ ์๊ทธ๋
VWAP ๋ฐด๋ ๊ธฐ๋ฐ ๋ฐฉํฅ์ฑ
OBV ๋ณด์กฐ์งํ
์ด๋ฆ (Name)
BTC Scalping Signal โ VWAP + OBV
์งง์ ์ค๋ช
(Short Description)
VWAP ๋ฐด๋์ OBV๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ๋ฐฉํฅ์ฑ, ์ง์
ยท์ฒญ์ฐ ์๊ทธ๋์ ์ ๊ณตํ๋ ์ค์บํ ์งํ์
๋๋ค.
๊ธด ์ค๋ช
(Long Description)
์ด ์งํ๋ BTC ๋จ๊ธฐ ์ค์บํ์ ์ํด ์ค๊ณ๋ ๊ฒ์ผ๋ก, ํนํ 15๋ถ๋ด ํ๊ฒฝ์ ์ต์ ํ๋์ด ์์ต๋๋ค.
VWAP ๋ฐด๋์ ์์น์ ์ถ์ธ ํ๋ณ ๋ก์ง์ ๊ธฐ๋ฐ์ผ๋ก ๋กฑยท์ ์ง์
์ ํธ๋ฅผ ์ ๊ณตํฉ๋๋ค.
OBV ๋ชจ๋ฉํ
์ ๋ณด์กฐ ํํฐ๋ก ์ฌ์ฉํ์ฌ ๋ํ ๋ฐ ๋๋๋ฆผ ๊ฐ๋ฅ์ฑ์ ํ๋จํฉ๋๋ค.
์์ฅ ๋ณ๋์ฑ์ด ์ถ์๋๊ฑฐ๋ ํ๊ท ํ๊ท ์ ํธ๊ฐ ๊ฐ์ง๋ ๋ ์ฒญ์ฐ ์๊ทธ๋์ ํ์ํฉ๋๋ค.
์ผ๊ฐํ(์ง์
), ์ํ(์ฒญ์ฐ) ๋ฑ ์ง๊ด์ ์๊ฐ ์์๋ฅผ ํตํด ๋น ๋ฅธ ์์ฌ๊ฒฐ์ ์ ์ง์ํฉ๋๋ค.
machine_learningLibrary "machine_learning"
euclidean(a, b)
โโParameters:
โโโโ a (array)
โโโโ b (array)
manhattan(a, b)
โโParameters:
โโโโ a (array)
โโโโ b (array)
cosine_similarity(a, b)
โโParameters:
โโโโ a (array)
โโโโ b (array)
cosine_distance(a, b)
โโParameters:
โโโโ a (array)
โโโโ b (array)
chebyshev(a, b)
โโParameters:
โโโโ a (array)
โโโโ b (array)
minkowski(a, b, p)
โโParameters:
โโโโ a (array)
โโโโ b (array)
โโโโ p (float)
dot_product(a, b)
โโParameters:
โโโโ a (array)
โโโโ b (array)
vector_norm(arr, p)
โโParameters:
โโโโ arr (array)
โโโโ p (float)
sigmoid(x)
โโParameters:
โโโโ x (float)
sigmoid_derivative(x)
โโParameters:
โโโโ x (float)
tanh_derivative(x)
โโParameters:
โโโโ x (float)
relu(x)
โโParameters:
โโโโ x (float)
relu_derivative(x)
โโParameters:
โโโโ x (float)
leaky_relu(x, alpha)
โโParameters:
โโโโ x (float)
โโโโ alpha (float)
leaky_relu_derivative(x, alpha)
โโParameters:
โโโโ x (float)
โโโโ alpha (float)
elu(x, alpha)
โโParameters:
โโโโ x (float)
โโโโ alpha (float)
gelu(x)
โโParameters:
โโโโ x (float)
swish(x, beta)
โโParameters:
โโโโ x (float)
โโโโ beta (float)
softmax(arr)
โโParameters:
โโโโ arr (array)
apply_activation(arr, activation_type, alpha)
โโParameters:
โโโโ arr (array)
โโโโ activation_type (string)
โโโโ alpha (float)
normalize_minmax(arr, min_val, max_val)
โโParameters:
โโโโ arr (array)
โโโโ min_val (float)
โโโโ max_val (float)
normalize_zscore(arr, mean_val, std_val)
โโParameters:
โโโโ arr (array)
โโโโ mean_val (float)
โโโโ std_val (float)
normalize_matrix_cols(m)
โโParameters:
โโโโ m (matrix)
scaler_fit(arr, method)
โโParameters:
โโโโ arr (array)
โโโโ method (string)
scaler_fit_matrix(m, method)
โโParameters:
โโโโ m (matrix)
โโโโ method (string)
scaler_transform(scaler, arr)
โโParameters:
โโโโ scaler (ml_scaler)
โโโโ arr (array)
scaler_transform_matrix(scaler, m)
โโParameters:
โโโโ scaler (ml_scaler)
โโโโ m (matrix)
clip(x, lo, hi)
โโParameters:
โโโโ x (float)
โโโโ lo (float)
โโโโ hi (float)
clip_array(arr, lo, hi)
โโParameters:
โโโโ arr (array)
โโโโ lo (float)
โโโโ hi (float)
loss_mse(predicted, actual)
โโParameters:
โโโโ predicted (array)
โโโโ actual (array)
loss_rmse(predicted, actual)
โโParameters:
โโโโ predicted (array)
โโโโ actual (array)
loss_mae(predicted, actual)
โโParameters:
โโโโ predicted (array)
โโโโ actual (array)
loss_binary_crossentropy(predicted, actual)
โโParameters:
โโโโ predicted (array)
โโโโ actual (array)
loss_huber(predicted, actual, delta)
โโParameters:
โโโโ predicted (array)
โโโโ actual (array)
โโโโ delta (float)
gradient_step(weights, gradients, lr)
โโParameters:
โโโโ weights (array)
โโโโ gradients (array)
โโโโ lr (float)
adam_step(weights, gradients, m, v, lr, beta1, beta2, t, epsilon)
โโParameters:
โโโโ weights (array)
โโโโ gradients (array)
โโโโ m (array)
โโโโ v (array)
โโโโ lr (float)
โโโโ beta1 (float)
โโโโ beta2 (float)
โโโโ t (int)
โโโโ epsilon (float)
clip_gradients(gradients, max_norm)
โโParameters:
โโโโ gradients (array)
โโโโ max_norm (float)
lr_decay(initial_lr, decay_rate, step)
โโParameters:
โโโโ initial_lr (float)
โโโโ decay_rate (float)
โโโโ step (int)
lr_cosine_annealing(initial_lr, min_lr, step, total_steps)
โโParameters:
โโโโ initial_lr (float)
โโโโ min_lr (float)
โโโโ step (int)
โโโโ total_steps (int)
knn_create(k, distance_type)
โโParameters:
โโโโ k (int)
โโโโ distance_type (string)
knn_fit(model, X, y)
โโParameters:
โโโโ model (ml_knn)
โโโโ X (matrix)
โโโโ y (array)
knn_predict(model, x)
โโParameters:
โโโโ model (ml_knn)
โโโโ x (array)
knn_predict_proba(model, x)
โโParameters:
โโโโ model (ml_knn)
โโโโ x (array)
knn_batch_predict(model, X)
โโParameters:
โโโโ model (ml_knn)
โโโโ X (matrix)
linreg_fit(X, y)
โโParameters:
โโโโ X (matrix)
โโโโ y (array)
ridge_fit(X, y, lambda)
โโParameters:
โโโโ X (matrix)
โโโโ y (array)
โโโโ lambda (float)
linreg_predict(model, x)
โโParameters:
โโโโ model (ml_linreg)
โโโโ x (array)
linreg_predict_batch(model, X)
โโParameters:
โโโโ model (ml_linreg)
โโโโ X (matrix)
linreg_score(model, X, y)
โโParameters:
โโโโ model (ml_linreg)
โโโโ X (matrix)
โโโโ y (array)
logreg_create(n_features, learning_rate, iterations)
โโParameters:
โโโโ n_features (int)
โโโโ learning_rate (float)
โโโโ iterations (int)
logreg_fit(model, X, y)
โโParameters:
โโโโ model (ml_logreg)
โโโโ X (matrix)
โโโโ y (array)
logreg_predict_proba(model, x)
โโParameters:
โโโโ model (ml_logreg)
โโโโ x (array)
logreg_predict(model, x, threshold)
โโParameters:
โโโโ model (ml_logreg)
โโโโ x (array)
โโโโ threshold (float)
logreg_batch_predict(model, X, threshold)
โโParameters:
โโโโ model (ml_logreg)
โโโโ X (matrix)
โโโโ threshold (float)
nb_create(n_classes)
โโParameters:
โโโโ n_classes (int)
nb_fit(model, X, y)
โโParameters:
โโโโ model (ml_nb)
โโโโ X (matrix)
โโโโ y (array)
nb_predict_proba(model, x)
โโParameters:
โโโโ model (ml_nb)
โโโโ x (array)
nb_predict(model, x)
โโParameters:
โโโโ model (ml_nb)
โโโโ x (array)
nn_create(layers, activation)
โโParameters:
โโโโ layers (array)
โโโโ activation (string)
nn_forward(model, x)
โโParameters:
โโโโ model (ml_nn)
โโโโ x (array)
nn_predict_class(model, x)
โโParameters:
โโโโ model (ml_nn)
โโโโ x (array)
accuracy(y_true, y_pred)
โโParameters:
โโโโ y_true (array)
โโโโ y_pred (array)
precision(y_true, y_pred, positive_class)
โโParameters:
โโโโ y_true (array)
โโโโ y_pred (array)
โโโโ positive_class (int)
recall(y_true, y_pred, positive_class)
โโParameters:
โโโโ y_true (array)
โโโโ y_pred (array)
โโโโ positive_class (int)
f1_score(y_true, y_pred, positive_class)
โโParameters:
โโโโ y_true (array)
โโโโ y_pred (array)
โโโโ positive_class (int)
r_squared(y_true, y_pred)
โโParameters:
โโโโ y_true (array)
โโโโ y_pred (array)
mse(y_true, y_pred)
โโParameters:
โโโโ y_true (array)
โโโโ y_pred (array)
rmse(y_true, y_pred)
โโParameters:
โโโโ y_true (array)
โโโโ y_pred (array)
mae(y_true, y_pred)
โโParameters:
โโโโ y_true (array)
โโโโ y_pred (array)
confusion_matrix(y_true, y_pred, n_classes)
โโParameters:
โโโโ y_true (array)
โโโโ y_pred (array)
โโโโ n_classes (int)
sliding_window(data, window_size)
โโParameters:
โโโโ data (array)
โโโโ window_size (int)
train_test_split(X, y, test_ratio)
โโParameters:
โโโโ X (matrix)
โโโโ y (array)
โโโโ test_ratio (float)
create_binary_labels(data, threshold)
โโParameters:
โโโโ data (array)
โโโโ threshold (float)
lag_matrix(data, n_lags)
โโParameters:
โโโโ data (array)
โโโโ n_lags (int)
signal_to_position(prediction, threshold_long, threshold_short)
โโParameters:
โโโโ prediction (float)
โโโโ threshold_long (float)
โโโโ threshold_short (float)
confidence_sizing(probability, max_size, min_confidence)
โโParameters:
โโโโ probability (float)
โโโโ max_size (float)
โโโโ min_confidence (float)
kelly_sizing(win_rate, avg_win, avg_loss, max_fraction)
โโParameters:
โโโโ win_rate (float)
โโโโ avg_win (float)
โโโโ avg_loss (float)
โโโโ max_fraction (float)
sharpe_ratio(returns, risk_free_rate)
โโParameters:
โโโโ returns (array)
โโโโ risk_free_rate (float)
sortino_ratio(returns, risk_free_rate)
โโParameters:
โโโโ returns (array)
โโโโ risk_free_rate (float)
max_drawdown(equity)
โโParameters:
โโโโ equity (array)
atr_stop_loss(entry_price, atr, multiplier, is_long)
โโParameters:
โโโโ entry_price (float)
โโโโ atr (float)
โโโโ multiplier (float)
โโโโ is_long (bool)
risk_reward_take_profit(entry_price, stop_loss, ratio)
โโParameters:
โโโโ entry_price (float)
โโโโ stop_loss (float)
โโโโ ratio (float)
ensemble_vote(predictions)
โโParameters:
โโโโ predictions (array)
ensemble_weighted_average(predictions, weights)
โโParameters:
โโโโ predictions (array)
โโโโ weights (array)
smooth_prediction(current, previous, alpha)
โโParameters:
โโโโ current (float)
โโโโ previous (float)
โโโโ alpha (float)
regime_classifier(volatility, trend_strength, vol_threshold, trend_threshold)
โโParameters:
โโโโ volatility (float)
โโโโ trend_strength (float)
โโโโ vol_threshold (float)
โโโโ trend_threshold (float)
ml_knn
โโFields:
โโโโ k (series int)
โโโโ distance_type (series string)
โโโโ X_train (matrix)
โโโโ y_train (array)
ml_linreg
โโFields:
โโโโ coefficients (array)
โโโโ intercept (series float)
โโโโ lambda (series float)
ml_logreg
โโFields:
โโโโ weights (array)
โโโโ bias (series float)
โโโโ learning_rate (series float)
โโโโ iterations (series int)
ml_nn
โโFields:
โโโโ layers (array)
โโโโ weights (matrix)
โโโโ biases (array)
โโโโ weight_offsets (array)
โโโโ bias_offsets (array)
โโโโ activation (series string)
ml_nb
โโFields:
โโโโ class_priors (array)
โโโโ means (matrix)
โโโโ variances (matrix)
โโโโ n_classes (series int)
ml_scaler
โโFields:
โโโโ min_vals (array)
โโโโ max_vals (array)
โโโโ means (array)
โโโโ stds (array)
โโโโ method (series string)
ml_train_result
โโFields:
โโโโ loss_history (array)
โโโโ final_loss (series float)
โโโโ converged (series bool)
โโโโ iterations_run (series int)
ml_prediction
โโFields:
โโโโ class_label (series int)
โโโโ probability (series float)
โโโโ probabilities (array)
โโโโ value (series float)
Liquidations (TV Source / Manual / Proxy) Cruz Pro Stack + Liquidations (TV Source / Manual / Proxy) is a high-confluence crypto trading indicator built to merge reversal detection, volatility timing, structure confirmation, and liquidation pressure into one clean decision engine.
This script combines five pro-grade components:
1) RSI Divergence (Regular + Hidden)
Detects early momentum shifts at tops and bottoms to anticipate reversals before price fully reacts.
2) BBWP (Bollinger Band Width Percentile)
Identifies volatility compression and expansion cycles to time breakout conditions and avoid low-quality chop.
3) Market Structure (BOS / CHOCH proxy)
Confirms trend continuation or change-of-character using swing breaks for more reliable directional bias.
4) Liquidations Layer (3 Modes)
Adds liquidation-driven context for where price is likely to squeeze or flush next:
TV Source: Use TradingViewโs built-in Liquidations plot when available.
Manual Totals: Paste 12h/24h/48h long/short totals for higher-level regime bias.
Proxy (Volume Shock): A fallback approximation for spot charts using volume + candle direction.
The script automatically converts your chart timeframe into rolling 12/24/48-hour windows, then computes a weighted liquidation bias and a spike detector to flag potential exhaustion moves.
5) Confluence Score + Signals
A simple scoring engine highlights high-probability setups when multiple factors align.
Signals are printed only when divergence + structure + volatility context agree with liquidation pressure.
How to use
Best on BTC/ETH perps across 15mโ4H.
For maximum accuracy:
Add TradingViewโs Liquidations indicator (if your exchange/symbol supports it).
Set Liquidations Mode = TV Source.
Select the Liquidations plot as the source.
If that plot canโt be selected, switch to Proxy or Manual Totals.
What this indicator is designed to improve
Earlier reversal recognition
Cleaner breakout timing
Structure-confirmed entries
Better risk management around liquidation-driven moves
Fewer low-quality trades during dead volatility
Adaptive Alligator - Asymmetric MH (Entry Only)
Adaptive Alligator โ Asymmetric Mexican Hat (Entry Only)
This strategy combines adaptive cycle detection (wavelet + autocorrelation), directional entropy, and a Mexican Hat filter to generate highly selective LONG entry signals. Exits are based solely on the Alligator structure. The system is designed to detect asymmetric, strong, and accelerating bullish phases while filtering out market noise.
1. Adaptive Cycle Detection: The strategy analyzes the median price using wavelet decomposition (Haar, Daubechies D4/D6, Symlet 4), wavelet detail energy, and autocorrelation. It also incorporates the ratio of short-term to long-term ATR volatility. Based on these components, it computes a dominant_cycle value, which dynamically controls the lengths of the Alligator lines (Jaw, Teeth, Lips). This adaptive behavior allows the Alligator to speed up during trending phases and slow down during noise or consolidation.
2. Directional Entropy: Entropy is measured separately for upward and downward movements within the selected lookback window. The entropy difference: e_diff = entropy_down - entropy_up represents the directional bias of the market. When e_diff > 0, the market shows an organized bullish pressure; when < 0, bearish dominance.
3. Mexican Hat Filter: The Mexican Hat (Ricker Wavelet) acts as a second-derivative filter, detecting local maxima in the acceleration of directional entropy. The filtered output (mh_out) is compared against an adaptive noise level computed as SMA(|mh_out|). A signal is considered strong only when: โ mh_out exceeds the adaptive noise level, โ mh_out is rising relative to the previous bar. This step is critical for eliminating false signals produced by random fluctuations.
4. Entry Logic: A LONG entry requires all three layers: (1) Alligator structure: Lips > Teeth > Jaw. (2) Directional entropy bias: e_diff > 0. (3) A strong, accelerating Mexican Hat signal confirmed by a user-defined number of bars. Once all conditions are satisfied, a buy_final entry is triggered.
5. Exit Logic: Exits are intentionally simple and rely solely on the Alligator: crossunder(lips, teeth) This clean separation ensures precise, adaptive entries and stable, consistent exits.
6. Visual Components: โ Alligator lines: Jaw (blue), Teeth (red), Lips (green), plotted with their characteristic offsets. โ Background coloring reflects signal strength: dark green (STRONG BUY), lime (acceleration), yellow (weak bias), transparent otherwise. โ A dedicated panel displays e_diff (entropy difference), mh_out (Mexican Hat output), and the adaptive noise band.
7. Diagnostic Table: A compact diagnostic dashboard shows: โ MH Value, โ Noise Level, โ MH Acceleration (YES/NO), โ Signal Status (STRONG BUY / ACCELERATING / WEAK / BEARISH). It updates on the last bar, making it suitable for live monitoring.
8. Use Case: This strategy is highly selective and ideal as an entry module within trend-following systems. By combining wavelets, entropy, and adaptive noise modeling, it effectively filters out consolidation periods and focuses only on statistically significant bullish transitions. It can be integrated with various exit frameworks such as ATR stops, channel-based exits, range boxes, or trailing logic.
[CT] ATR Ratio MTFThis indicator is an enhanced, multi-timeframe version of the original โATR ratioโ by RafaelZioni. Huge thanks to RafaelZioni for the core concept and base logic. The script still combines an ATR-based ratio (Z-score style reading of where price sits within its recent ATR envelope) with an ATR Supertrend, but expands it into a more flexible trade-decision and visual context tool.
The ATR ratio is normalized so you can quickly see when price is pressing into extended bullish or bearish territory, while the Supertrend defines directional bias and a dynamic support-resistance trail. You can choose any higher timeframe in the settings, allowing you to run the ATR ratio and Supertrend from a larger anchor timeframe while trading on a lower chart.
Upgrades include a full Pine Script v6 rewrite, multi-timeframe support for both the ATR ratio and Supertrend, user-controlled colors for the Supertrend in bull and bear modes, and optional bar coloring so price bars automatically reflect Supertrend direction. Entry, pyramiding and take-profit logic from the original script are preserved, giving you a familiar framework with more control over timeframe, visuals and trend bias.
This indicator is designed to give you a clean directional framework that blends volatility, trend, and timing into one view. The ATR ratio side of the script shows you where price sits inside a recent ATR-based envelope. When the ATR ratio pushes up and sustains above the bullish threshold, it signals that price is trading in an extended, momentum-driven zone relative to recent volatility. When it drops and holds below the bearish threshold, it shows the opposite: sellers have pushed price down into an extended bearish zone. The optional background coloring simply makes these bullish and bearish environments easier to see at a glance.
On top of that, the Supertrend and bar colors tell you what side of the market to favor. The Supertrend is calculated from ATR on whatever timeframe you choose in the settings. If you set the MTF input to a higher timeframe, the Supertrend and ATR ratio become your higher time frame bias while you trade on a lower chart. When price is above the MTF Supertrend, the line uses your bullish color and, if bar coloring is enabled, candles adopt your bullish bar color. That is your โlong onlyโ environment: you generally look for buys when price is above the Supertrend and the ATR ratio is either turning up from neutral or already in a bullish zone. When price is below the MTF Supertrend, the line uses your bearish color and candles can shift to your bearish bar color; that is where you focus on shorts, especially when the ATR ratio is rolling over or holding in the bearish zone.
The built-in long and short conditions are meant as signal prompts, not rigid rules. Long signals fire when the ATR ratio crosses up through a positive level while the Supertrend is bullish. Short signals fire when the ATR ratio crosses down through a negative level while the Supertrend is bearish. The script tracks how many longs or shorts have been taken in sequence (pyramiding) and will only allow a new signal up to the limit you set, so you can control how aggressively you stack positions in a trend. The take-profit logic then watches the percentage move from your last entry and flags โTPโ when that move has reached your take-profit percent, helping you standardize exits instead of eyeballing them bar by bar.
In practice you typically start by choosing your anchor timeframe for the MTF setting, for example a 1-hour or 4-hour Supertrend and ATR ratio while watching a 5-minute or 15-minute chart. You then use the Supertrend direction and bar colors as your bias filter, only taking signals in the direction of the trend, and you use the ATR ratio behavior to judge whether you are entering into strength, fading an extreme, or trading inside a neutral consolidation. Over time this gives you a consistent way to answer three questions on every chart: which side am I allowed to trade, how extended is price within its recent volatility, and where are my structured entries and exits based on that framework.
Probabilistic Panel - COMPLETE VERSION๐ Probabilistic Panel โ User Manual
________________________________________
INTRODUCTION
The Probabilistic Panel is an advanced TradingView indicator that merges multiple technical-analysis components to provide a probabilistic evaluation of market direction. It is composed of several sections that assess trend, volume, price zones, support and resistance, multiple timeframes, and candle distribution.
________________________________________
PANEL STRUCTURE
1. HEADER
โข PROBABILISTIC PANEL: Indicator name.
โข FULL VERSION: Indicates that all functionalities are enabled.
________________________________________
2. GENERAL INFORMATION
โข ASSET: Displays the asset symbol being analyzed.
โข LIMITS: Shows score thresholds for classifying setups (A+, B, C).
________________________________________
3. DIRECTION PROBABILITIES
โข PROB: Displays probability of upward movement (upPct) and downward movement (downPct) in percentage.
o Importance: Indicates the direction with the highest probability based on weighted factors.
________________________________________
4. CONTINUATION BIAS
โข BIAS: Shows the probability of continuation of the current trend (intrProbCont).
o Importance: Evaluates whether the market is likely to continue in the same direction.
________________________________________
5. MULTI-TIMEFRAME ANALYSIS (MTF)
โข MTF: Shows trend direction across multiple timeframes (1D, 1H, 15M, 5M, 1M) using arrows (โ uptrend, โ downtrend, โ sideways).
o Importance: Helps identify convergence or divergence between timeframes.
โข ALIGNED MTF: Displays the percentage of alignment between timeframes.
o Importance: Higher alignment indicates stronger trends.
________________________________________
6. VOLUME
โข VOLUME: Indicates whether volume is โINCREASINGโ, โDECREASINGโ, or โSTABLE.โ
o Importance: Increasing volume confirms trend strength.
________________________________________
7. TECHNICAL INDICATORS
โข RSI/ROC: Displays RSI (Relative Strength Index) and ROC (Rate of Change).
o Importance:
๏ง RSI > 65 โ Overbought
๏ง RSI < 35 โ Oversold
๏ง ROC โ Momentum strength indicator
________________________________________
8. PRICE ZONE
โข ZONE: Classifies current price as โPREMIUMโ (above average), โDISCOUNTโ (below average), or โEQUILIBRIUM.โ
o Importance: Helps identify buying/selling opportunities based on mean-reversion logic.
________________________________________
9. CANDLE ANALYSIS
โข AMPLITUDE: Shows current candle size in percentage and ticks.
o Importance: Candles above minimum amplitude threshold are considered trade-valid.
โข FORMATION: Classifies candle as:
o HIGH INDECISION
o TOP REJECTION
o BOTTOM REJECTION
o CONVICTION
o MIXED
o Importance: Reflects market sentiment and psychology.
โข WICKS: Displays upper and lower wick size in percentage.
o Importance: Longer wicks suggest rejection or indecision.
โข RATIO: Ratio between total wick size and candle body.
o Importance: High ratio = indecision; low ratio = conviction.
________________________________________
10. TRENDS
โข AMPLITUDE TREND: Indicates if amplitude is โINCREASING,โ โDECREASING,โ or โSTABLE.โ
o Importance: Increasing amplitude may signal rising volatility.
โข CONVICTION TREND: Indicates recent candle conviction:
o STRONG UP
o STRONG DOWN
o INDECISIVE
o MIXED
o Importance: Measures the strength of recent candles.
________________________________________
11. PROBABILITY DIFFERENCE (DIF PROB)
โข Shows the percentage difference between upward and downward probabilities, classified as:
o EXCELLENT: Very favorable
o GOOD: Significant
o MEDIUM: Moderate (avoid entering)
o MARKET LOSING STRENGTH: Small difference (avoid entering)
o UNSTABLE MARKET: Very small difference (do not trade)
o Importance: Higher difference = more directional clarity.
________________________________________
12. CONFIRMATIONS
โข Shows how many consecutive confirmations of the current signal were achieved relative to the configured requirement.
o Importance: More confirmations increase reliability.
________________________________________
13. SCORE & CLASSIFICATION
โข SCORE: Final score from 0 to 100, calculated based on multiple factors.
o Higher scores = better setups.
โข CLASSIFICATION: Setup categorized as:
o A+ SETUP
o B SETUP
o C SETUP
o DO NOT TRADE
o Importance: Defines whether conditions are favorable.
________________________________________
14. ACTION
โข ACTION: Suggests โBUY,โ โSELL,โ or โWAIT.โ
o Importance: Final actionable signal.
________________________________________
DECISION LOGIC
The indicator uses a weighted combination of multiple factors:
1. Trend (wTrend): Based on the price relative to EMA50.
2. Volume (wVol): Based on recent volume vs. its average.
3. Zone (wZona): Based on price position within recent price range.
4. Support/Resistance (wSR): Based on strength of S/R levels.
5. MTF (wMTF): Timeframe alignment.
6. Distribution (wDist): Distribution of bullish, bearish, and neutral candles.
The final score integrates:
โข Probability of upward movement
โข Continuation bias
โข MTF conflict
โข Moving-average alignment
โข Volume
โข Extreme RSI conditions
________________________________________
FALSE-SIGNAL FILTERS
โข Close-Only Mode: Updates calculations only on candle close.
โข Minimum Candle Size: Ignores very small candles.
โข Consecutive Confirmations: Requires repeated signal confirmation.
โข Minimum Probability Difference: Enforces a minimum separation between bullish and bearish probabilities.
________________________________________
CONCLUSION
The Probabilistic Panel is a comprehensive tool that integrates multiple technical-analysis dimensions to deliver more reliable trading signals. Parameters must be adjusted according to the asset and timeframe.
Remember: no indicator is infallible.
Always combine it with risk management and additional confirmations.
Static K-means Clustering | InvestorUnknownStatic K-Means Clustering is a machine-learning-driven market regime classifier designed for traders who want a data-driven structure instead of subjective indicators or manually drawn zones.
This script performs offline (static) K-means training on your chosen historical window. Using four engineered features:
RSI (Momentum)
CCI (Price deviation / Mean reversion)
CMF (Money flow / Strength)
MACD Histogram (Trend acceleration)
It groups past market conditions into K distinct clusters (regimes). After training, every new bar is assigned to the nearest cluster via Euclidean distance in 4-dimensional standardized feature space.
This allows you to create models like:
Regime-based long/short filters
Volatility phase detectors
Trend vs. chop separation
Mean-reversion vs. breakout classification
Volume-enhanced money-flow regime shifts
Full machine-learning trading systems based solely on regimes
Note:
This script is not a universal ML strategy out of the box.
The user must engineer the feature set to match their trading style and target market.
K-means is a tool, not a ready made system, this script provides the framework.
Core Idea
K-means clustering takes raw, unlabeled market observations and attempts to discover structure by grouping similar bars together.
// STEP 1 โ DATA POINTS ON A COORDINATE PLANE
// We start with raw, unlabeled data scattered in 2D space (x/y).
// At this point, nothing is groupedโthese are just observations.
// K-means will try to discover structure by grouping nearby points.
//
// y โ
// |
// 12 | โข
// | โข
// 10 | โข
// | โข
// 8 | โข โข
// |
// 6 | โข
// |
// 4 | โข
// |
// 2 |______________________________________________โ x
// 2 4 6 8 10 12 14
//
//
//
// STEP 2 โ RANDOMLY PLACE INITIAL CENTROIDS
// The algorithm begins by placing K centroids at random positions.
// These centroids act as the temporary โrepresentativesโ of clusters.
// Their starting positions heavily influence the first assignment step.
//
// y โ
// |
// 12 | โข
// | โข
// 10 | โข C2 ร
// | โข
// 8 | โข โข
// |
// 6 | C1 ร โข
// |
// 4 | โข
// |
// 2 |______________________________________________โ x
// 2 4 6 8 10 12 14
//
//
//
// STEP 3 โ ASSIGN POINTS TO NEAREST CENTROID
// Each point is compared to all centroids.
// Using simple Euclidean distance, each point joins the cluster
// of the centroid it is closest to.
// This creates a temporary grouping of the data.
//
// (Coloring concept shown using labels)
//
// - Points closer to C1 โ Cluster 1
// - Points closer to C2 โ Cluster 2
//
// y โ
// |
// 12 | 2
// | 1
// 10 | 1 C2 ร
// | 2
// 8 | 1 2
// |
// 6 | C1 ร 2
// |
// 4 | 1
// |
// 2 |______________________________________________โ x
// 2 4 6 8 10 12 14
//
// (1 = assigned to Cluster 1, 2 = assigned to Cluster 2)
// At this stage, clusters are formed purely by distance.
Your chosen historical window becomes the static training dataset , and after fitting, the centroids never change again.
This makes the model:
Predictable
Repeatable
Consistent across backtests
Fast for live use (no recalculation of centroids every bar)
Static Training Window
You select a period with:
Training Start
Training End
Only bars inside this range are used to fit the K-means model. This window defines:
the market regime examples
the statistical distributions (means/std) for each feature
how the centroids will be positioned post-trainin
Bars before training = fully transparent
Training bars = gray
Post-training bars = full colored regimes
Feature Engineering (4D Input Vector)
Every bar during training becomes a 4-dimensional point:
This combination balances: momentum, volatility, mean-reversion, trend acceleration giving the algorithm a richer "market fingerprint" per bar.
Standardization
To prevent any feature from dominating due to scale differences (e.g., CMF near zero vs CCI ยฑ200), all features are standardized:
standardize(value, mean, std) =>
(value - mean) / std
Centroid Initialization
Centroids start at diverse coordinates using various curves:
linear
sinusoidal
sign-preserving quadratic
tanh compression
init_centroids() =>
// Spread centroids across using different shapes per feature
for c = 0 to k_clusters - 1
frac = k_clusters == 1 ? 0.0 : c / (k_clusters - 1.0) // 0 โ 1
v = frac * 2 - 1 // -1 โ +1
array.set(cent_rsi, c, v) // linear
array.set(cent_cci, c, math.sin(v)) // sinusoidal
array.set(cent_cmf, c, v * v * (v < 0 ? -1 : 1)) // quadratic sign-preserving
array.set(cent_mac, c, tanh(v)) // compressed
This makes initial cluster spread โrandomโ even though true randomness is hardly achieved in pinescript.
K-Means Iterative Refinement
The algorithm repeats these steps:
(A) Assignment Step, Each bar is assigned to the nearest centroid via Euclidean distance in 4D:
distance = sqrt(dxยฒ + dyยฒ + dzยฒ + dwยฒ)
(B) Update Step, Centroids update to the mean of points assigned to them. This repeats iterations times (configurable).
LIVE REGIME CLASSIFICATION
After training, each new bar is:
Standardized using the training mean/std
Compared to all centroids
Assigned to the nearest cluster
Bar color updates based on cluster
No re-training occurs. This ensures:
No lookahead bias
Clean historical testing
Stable regimes over time
CLUSTER BEHAVIOR & TRADING LOGIC
Clusters (0, 1, 2, 3โฆ) hold no inherent meaning. The user defines what each cluster does.
Example of custom actions:
Cluster 0 โ Cash
Cluster 1 โ Long
Cluster 2 โ Short
Cluster 3+ โ Cash (noise regime)
This flexibility means:
One trader might have cluster 0 as consolidation.
Another might repurpose it as a breakout-loading zone.
A third might ignore 3 clusters entirely.
Example on ETHUSD
Important Note:
Any change of parameters or chart timeframe or ticker can cause the โorderโ of clusters to change
The script does NOT assume any cluster equals any actionable bias, user decides.
PERFORMANCE METRICS & ROC TABLE
The indicator computes average 1-bar ROC for each cluster in:
Training set
Test (live) set
This helps measure:
Cluster profitability consistency
Regime forward predictability
Whether a regime is noise, trend, or reversion-biased
EQUITY SIMULATION & FEES
Designed for close-to-close realistic backtesting.
Position = cluster of previous bar
Fees applied only on regime switches. Meaning:
Staying long โ no fee
Switching longโshort โ fee applied
Switching anyโcash โ fee applied
Fee input is percentage, but script already converts internally.
Disclaimers
โ ๏ธ This indicator uses machine-learning but does not predict the future. It classifies similarity to past regimes, nothing more.
โ ๏ธ Backtest results are not indicative of future performance.
โ ๏ธ Clusters have no inherent โbullishโ or โbearishโ meaning. You must interpret them based on your testing and your own feature engineering.
FxAST Ichi ProSeries Enhanced Full Market Regime EngineFxAST Ichi ProSeries v1.x is a modernized Ichimoku engine that keeps the classic logic but adds a full market regime engine for any market and instrument.โ
Multi-timeframe cloud overlay
Oracle long-term baseline
Trend regime classifier (Bull / Bear / Transition / Range)
Chikou & Cloud breakout signals
HTF + Oracle + Trend dashboard
Alert-ready structure for automation
No repainting: all HTF calls use lookahead_off.
1. Core Ichimoku Engine
Code sections:
Input group: Core Ichimoku
Function: ichiCalc()
Variables: tenkan, kijun, spanA, spanB, chikou
What it does
Calculates the classic Ichimoku components:
Tenkan (Conversion Line) โ fast Donchian average (convLen)
Kijun (Base Line) โ slower Donchian average (baseLen)
Senkou Span A (Span A / Lead1) โ (Tenkan + Kijun)/2
Senkou Span B (Span B / Lead2) โ Donchian over spanBLen
Chikou โ current close shifted back in time (displace)
Everything else in the indicator builds on this engine.
How to use it (trading)
Tenkan vs Kijun = short-term vs medium-term balance.
Tenkan above Kijun = short-term bullish control; below = bearish control.
Span A / B defines the cloud, which represents equilibrium and support/resistance.
Price above cloud = bullish bias; price below cloud = bearish bias.
Graphic
2. Display & Cloud Styling
Code sections:
Input groups: Display Options, Cloud Styling, Lagging Span & Signals
Variables: showTenkan, showKijun, showChikou, showCloud, bullCloudColor, bearCloudColor, cloudLineWidth, laggingColor
Plots: plot(tenkan), plot(kijun), plot(chikou), p1, p2, fill(p1, p2, ...)
What it does
Lets you toggle individual components:
Show/hide Tenkan, Kijun, Chikou, and the cloud.
Customize cloud colors & opacity:
bullCloudColor when Span A > Span B
bearCloudColor when Span A < Span B
Adjust cloud line width for clarity.
How to use it
Turn off components you donโt use (e.g., hide Chikou if you only want cloud + Tenkan/Kijun).
For higher-timeframe or noisy charts, use thicker Kijun & cloud so structure is easier to see.
Graphic
Before
After
3. HTF Cloud Overlay (Multi-Timeframe)
Code sections:
Input group: HTF Cloud Overlay
Vars: showHTFCloud, htfTf, htfAlpha
Logic: request.security(..., ichiCalc(...)) โ htfSpanA, htfSpanB
Plots: pHTF1, pHTF2, fill(pHTF1, pHTF2, ...)
What it does
Pulls higher-timeframe Ichimoku cloud (e.g., 1H, 4H, Daily) onto your current chart.
Uses the same Ichimoku settings but aggregates on htfTf.
Plots an extra, semi-transparent cloud ahead of price:
Greenish when HTF Span A > Span B
Reddish when HTF Span B > Span A
How to use it
Trade LTF (e.g., 5m/15m) only in alignment with HTF trend:
HTF cloud bullish + LTF Ichi bullish โ look for longs
HTF cloud bearish + LTF Ichi bearish โ look for shorts
Treat HTF cloud boundaries as major S/R zones.
Graphic
4. Oracle Module
Code sections:
Input group: Oracle Module
Vars: useOracle, oracleLen, oracleColor, oracleWidth, oracleSlopeLen
Logic: oracleLine = donchian(oracleLen); slope check vs oracleLine
Plot: plot(useOracle ? oracleLine : na, "Oracle", ...)
What it does
Creates a long-term Donchian baseline (default 208 bars).
Uses a simple slope check:
Current Oracle > Oracle oracleSlopeLen bars ago โ Oracle Bull
Current Oracle < Oracle oracleSlopeLen bars ago โ Oracle Bear
Slope state is also shown in the dashboard (โBull / Bear / Flatโ).
How to use it
Think of Oracle as your macro anchor :
Only take longs when Oracle is sloping up or flat.
Only take shorts when Oracle is sloping down or flat.
Works well combined with HTF cloud:
HTF cloud bullish + Oracle Bull = higher conviction long bias.
Ideal for Gold / Indices swing trades as a trend filter.
Graphic idea
5. Trend Regime Classifier
Code sections:
Input group: Trend Regime Logic
Vars: useTrendRegime, bgTrendOpacity, minTrendScore
Logic:
priceAboveCloud, priceBelowCloud, priceInsideCloud
Tenkan vs Kijun alignment
Cloud bullish/bearish
bullScore / bearScore (0โ3)
regime + regimeLabel + regimeColor
Visuals: bgcolor(regimeColor) and optional barcolor() in priceColoring mode.
What it does
Scores the market in three dimensions :
Price vs Cloud
Tenkan vs Kijun
Cloud Direction (Span A vs Span B)
Each condition contributes +1 to either bullScore or bearScore .
Then:
Bull regime when:
bullScore >= minTrendScore and bullScore > bearScore
Price in cloud โ โRangeโ
Everything else โ โTransitionโ
These regimes are shown as:
Background colors:
Teal = Bull
Maroon = Bear
Orange = Range
Silver = Transition
Optional candle recoloring when priceColoring = true.
How to use it
Filters:
Only buy when regime = Bull or Transition and Oracle/HTF agree.
Only sell when regime = Bear or Transition and Oracle/HTF agree.
No trade zone:
When regime = Range (price inside cloud), avoid new entries; wait for break.
Aggressiveness:
Adjust minTrendScore to be stricter (3) or looser (1).
Graphic
6. Signals: Chikou & Cloud Breakout
Code sections :
Logic:
chikouBuySignal = ta.crossover(chikou, close)
chikouSellSignal = ta.crossunder(chikou, close)
cloudBreakUp = priceInsideCloud and priceAboveCloud
cloudBreakDown = priceInsideCloud and priceBelowCloud
What it does
1. Two key signal groups:
Chikou Cross Signals
Buy when Chikou crosses up through price.
Sell when Chikou crosses down through price.
Classic Ichi confirmation idea: Chikou breaking free of price cluster.
2. Cloud Breakout Signals
Long trigger: yesterday inside cloud โ today price breaks above cloud.
Short trigger: yesterday inside cloud โ today price breaks below cloud.
Captures โequilibrium โ expansionโ moves.
These are conditions only in this version (no chart shapes yet) but are fully wired for alerts. (Future Updates)
How to use it
Use Chikou signals as confirmation, not standalone entries:
Eg., Bull regime + Oracle Bull + cloud breakout + Chikou Buy.
Use Cloud Breakouts to catch the first impulsive leg after consolidation.
Graphic
7. Alerts (Automation Ready)
[
b]Code sections:
Input group: Alerts
Vars: useAlertTrend, useAlertChikou, useAlertCloudBO
Alert lines like: "FxAST Ichi Bull Trend", "FxAST Ichi Bull Trend", "FxAST Ichi Cloud Break Up"
What it does
Provides ready-made alert hooks for:
Trend regime (Bull / Bear)
Chikou cross buy/sell
Cloud breakout up/down
Each type can be globally toggled on/off via the inputs (helpful if a user only wants one kind).
How to use it
In TradingView: set alerts using โAny alert() function callโ on this indicator.
Then filter which ones fire by:
Turning specific alert toggles on/off in input panel, or
Filtering text in your external bot / webhook side.
Example simple workflow ---> Indicator ---> TV Alert ---> Webhook ---> Bot/Broker
8. FxAST Dashboard
Code sections:
Input group: Dashboard
Vars: showDashboard, dashPos, dash, dashInit
Helper: getDashPos() โ position.*
Table cells (updated on barstate.islast):
Row 0: Regime + label
Row 1: Oracle status (Bull / Bear / Flat / Off)
Row 2: HTF Cloud (On + TF / Off)
Row 3: Scores (BullScore / BearScore)
What it does
Displays a compact panel with the state of the whole system :
Current Trend Regime (Bull / Bear / Transition / Range)
Oracle slope state
Whether HTF Cloud is active + which timeframe
Raw Bull / Bear scores (0โ3 each)
Position can be set: Top Right, Top Left, Bottom Right, Bottom Left.
How to use it
Treat it like a pilot instrument cluster :
Quick glance: โAre my trend, oracle and HTF all aligned?โ
Great for streaming / screenshots: everything important is visible in one place without reading the code.
Graphic (lower right of chart )
HTF Candles Pro by MurshidFx# HTF Candles Pro by MurshidFx
## Professional Trading Indicator for Multi-Timeframe Market Structure Analysis
**HTF Candles Pro** is an advanced, open-source trading indicator that synthesizes Higher Timeframe (HTF) candle visualization with CISD (Change in State of Delivery) detection, providing comprehensive market structure analysis across multiple timeframes. Designed for traders at all experience levelsโfrom scalpers to swing tradersโthis tool enables precise alignment of trades with higher timeframe momentum while identifying critical market structure transitions.
---
## Core Functionality
This indicator integrates three essential analytical frameworks:
- **HTF Candle Visualization** โ Inspired by the innovative work of Fadi x MMT's MTF Candles indicator
- **CISD Detection System** โ Algorithmic identification of significant market structure reversals
- **Intelligent Session Level Management** โ Automated consolidation of overlapping session markers for enhanced chart clarity
The result is a sophisticated yet streamlined analytical tool that delivers actionable market insights with minimal visual complexity.
---
## Feature Set
### Higher Timeframe Candle Analysis
Monitor higher timeframe price action seamlessly without chart switching. The indicator employs automatic HTF selection based on current timeframe, with manual override capability.
**Components:**
- **Primary HTF Display**: Automatically positioned adjacent to current price action
- **Secondary HTF Display**: Optional dual-timeframe analysis capability
- **Adaptive Time Labeling**: Context-aware formatting (intraday times, day names, week numbers)
- **Real-Time Countdown**: Optional timer displaying remaining time until HTF candle close
- **Customizable Color Schemes**: Full color customization for bullish and bearish candles
### CISD Detection (Change in State of Delivery)
The CISD system identifies critical inflection points where market structure undergoes directional change, signaling potential trend reversals or continuations.
**Mechanism:**
- **Market Structure Monitoring**: Continuous tracking of swing highs and lows
- **Liquidity Sweep Detection**: Identification of stop-hunt patterns preceding reversals
- **Reversal Confirmation**: Validation-based CISD level plotting upon structure break confirmation
- **Clear Visual Signals**: Bullish CISD (blue) and bearish CISD (red) demarcation
- **Optimized Display**: Default 5-bar line length (adjustable) minimizes chart clutter
**Technical Definition:**
CISD occurs when price breaches structure in one directionโtypically sweeping liquidity and triggering stopsโthen reverses to break structure in the opposite direction, indicating a fundamental shift in market delivery bias.
### Intelligent Session Level Management
Eliminates visual clutter caused by overlapping session opens at identical price levels through automated consolidation.
**Functionality:**
- **Automatic Consolidation**: Merges multiple concurrent session opens into single reference lines
- **Combined Labeling**: Creates unified labels (e.g., "Week-Day Open," "4H-Day-Week Open")
- **Enhanced Clarity**: Maintains professional chart aesthetics while preserving all relevant information
**Supported Session Intervals:**
- 30-Minute Opens
- 4-Hour Opens
- Daily Opens
- Weekly Opens
- Monthly Opens
### Advanced Market Structure Tools
**Liquidity Sweep Identification:**
Highlights price wicks extending beyond previous HTF extremes that close within rangeโcharacteristic liquidity grab patterns.
**HTF Midpoint Reference:**
Displays the 50% retracement level of the most recent completed HTF candle, serving as a key reference for entries and profit targets.
**HTF Opening Price:**
Tracks current HTF candle open price, frequently functioning as dynamic support or resistance.
**Interval Demarcation:**
Visual separators defining HTF period boundaries for enhanced temporal clarity.
### Information Dashboard
Compact, customizable dashboard displaying:
- Current symbol and active timeframe
- HTF candle countdown timer
- Active trading session (Asia/London/New York)
- Current date and time
Flexible positioning: configurable for any chart corner.
---
## Default Configuration
Optimized settings for immediate professional-grade chart presentation:
- **Secondary HTF**: Disabled (enable for multi-timeframe comparative analysis)
- **CISD Bullish Color**: Blue (#0080ff) โ optimal visibility with reduced eye strain
- **CISD Line Width**: 1 pixel โ subtle yet discernible
- **CISD Line Length**: 5 bars โ balanced visibility without excessive clutter
- **Session Opens**: Smart consolidation enabled โ eliminates overlapping labels
---
## Application Strategies
### Trend Following
1. Monitor CISD confirmations aligned with HTF trend direction
2. Utilize HTF candle color for directional bias confirmation
3. Execute entries on pullbacks to HTF midpoint or open price levels
### Reversal Trading
1. Identify counter-trend CISD formations
2. Await HTF candle close confirming new directional bias
3. Use session opens as secondary confirmation levels
### Scalping
1. Trade exclusively in HTF candle direction
2. Employ lower timeframe CISD signals for precise entry timing
3. Target HTF midpoint or subsequent session open levels
### Structure-Based Trading
1. Mark liquidity sweep levels as potential reversal zones
2. Monitor CISD formations at key session opens
3. Confirm trend changes via HTF candle closes
---
## Customization Parameters
Comprehensive customization options:
- **Color Schemes**: Independent control of bull/bear candles, borders, CISD signals, session levels
- **Dimensional Settings**: Candle width, line thickness, label sizing
- **Display Quantities**: HTF candle count (1-10 range)
- **Positioning**: Candle offset, dashboard placement, label positioning
- **Line Styles**: Solid, dashed, or dotted rendering
- **Timeframe Selection**: Manual secondary HTF specification
---
## Attribution
**HTF Candle Visualization:**
The HTF candle rendering methodology draws inspiration from Fadi x MMT's "MTF Candles" indicator. Their elegant implementation of multi-timeframe candle visualization provided valuable reference for this development. Recognition and appreciation to their contribution to the TradingView community.
**CISD Detection:**
Proprietary CISD detection algorithm engineered to identify market structure transitions with high signal clarity and reduced false positive rate.
**Session Level Consolidation:**
Custom-developed intelligent grouping system addressing the common challenge of overlapping session labels at coincident price levels.
---
## Open Source License
This indicator is released as open source for the TradingView community. Permitted uses include:
- Implementation in live trading
- Educational study for Pine Script learning
- Personal modification and customization
- Distribution among trading communities
Community contributions, improvements, and derivative works are welcomed and encouraged.
---
## Implementation Guide
1. **Installation**: Click "Add to Chart"
2. **Configuration Access**: Open indicator settings panel
3. **Initial Use**: Default settings provide optimal starting configuration
4. **Optional Features**: Enable secondary HTF for multi-timeframe analysis
5. **Theme Integration**: Adjust color schemes to match chart aesthetics
---
## Best Practices
**Timeframe Optimization:**
- 1-5 minute charts: Optimal with 15m or 1H HTF
- 15-30 minute charts: Effective with 4H HTF
- 1-4 hour charts: Suitable for Daily HTF
- Daily charts: Best utilized with Weekly/Monthly HTF
**CISD Trading Guidelines:**
- Require CISD confirmation before position entry
- Prioritize CISD signals at significant levels (session opens, HTF midpoints)
- Confirm CISD direction aligns with HTF candle bias
- Apply contextual filteringโnot all CISD signals warrant trades
**Session Open Strategy:**
- Weekly opens typically provide robust support/resistance
- Daily opens offer reliable intraday reference points
- 4-Hour opens effective for short-term scalping
- Consolidated labels (e.g., "Week-Day Open") indicate confluence zones with elevated significance
---
## Technical Specifications
**Performance Optimization:**
- Intelligent object management prevents TradingView rendering limits
- Efficient array processing for session consolidation
- Proper memory management through systematic object deletion
- Consistent performance across all timeframe ranges
**Compatibility:**
- Universal timeframe support
- Optimized for all market types (forex, stocks, crypto, futures)
- Minimal computational overhead
---
## Support & Development
**Feedback Channels:**
- Comment section for user feedback and suggestions
- Bug reports and feature requests welcomed
- Community-driven enhancement consideration
**Documentation:**
- Well-commented source code for learning purposes
- Clear section organization for easy navigation
- Comprehensive type definitions for structural clarity
- Educational value for market structure concept understanding
---
## Version Information
**Version:** 1.0 (Initial Release)
**License:** Open Source
**Category:** Multi-Timeframe Analysis | Market Structure
**Compatibility:** All Timeframes
**Language:** Pine Script v5
---
**For optimal results:**
- Provide feedback through comments
- Share with trading communities
- Submit enhancement suggestions
- Report technical issues for resolution
**Professional Support:**
Available through comment section for technical inquiries, implementation questions, and feature requests.
---
*Developed for the TradingView trading community | Professional-grade market structure analysis | Open source contribution*
BTC CME Gaps Detector [SwissAlgo]BTC CME Gaps Detector
Track Unfilled Gaps & Identify Price Magnets
------------------------------------------------------
Overview
The BTC CME Gap Detector identifies and tracks unfilled price gaps on any timeframe (1-minute recommended for scalping) to gauge potential trading bias.
Verify Gap Behavior Yourself : Use TradingView's Replay Mode on the 1-Minute chart to observe how the price interacts with gaps. Load the BTC1! ticker (Bitcoin CME Futures), enable Replay Mode, and play forward through time (for example: go back 15 days). You may observe patterns such as price frequently returning to fill gaps, nearest gaps acting as near-term targets, and gaps serving as potential support/resistance zones. Some gaps may fill quickly, while others may remain open for longer periods. This hands-on analysis lets you independently assess how gaps may influence price movement in real market conditions and whether you may use this indicator as a complement to your trading analysis.
------------------------------------------------------
Purpose
Price gaps occur when there is a discontinuity between consecutive candles - when the current candle's low is above the previous candle's high (gap up), or when the current candle's high is below the previous candle's low (gap down).
This indicator identifies and tracks these gaps on any timeframe to help traders:
Identify gap zones that may attract price (potential "price magnets")
Monitor gap fill progression
Assess potential directional bias based on nearest unfilled gaps (long, short)
Analyze market structure and liquidity imbalances
------------------------------------------------------
Why Use This Indicator?
Universal Gap Detection : Identifies all gaps on any timeframe (1-minute, hourly, daily, etc.)
Multi-Candle Mitigation Tracking : Detects gap fills that occur across multiple candles
Distance Analysis : Shows percentage distance to nearest bullish and bearish gaps
Visual Representation : Color-coded boxes indicate gap status (active vs. mitigated)
Age Filtering : Option to display only gaps within specified time periods (3/6/12/24 months), as older gaps may lose relevance
ATR-Based Sizing : Minimum gap size adjusts to instrument volatility to filter noise (i.e. small gaps)
------------------------------------------------------
Trading Concept
Gaps represent price zones where no trading occurred. Historical market behavior suggests that unfilled gaps may attract price action as markets tend to revisit areas of incomplete price discovery. This phenomenon creates potential trading opportunities:
Bullish gaps (above current price) may act as upside targets where the price could move to fill the gap
Bearish gaps (below current price) may act as downside targets where price could move to fill the gap
The nearest gap often provides directional bias, as closer gaps may have a higher probability of being filled in the near term
This indicator helps quantify gap proximity and provides a visual reference for these potential target zones.
EXAMPLE
Step 1: Bearish Gaps Appear Below Price
Step 2: Price Getting Close to Fill Gap
Step 3: Gap Mitigated Gap
------------------------------------------------------
Recommended Setup
Timeframe: 1-minute chart recommended for maximum gap detection frequency. Works on all timeframes (higher timeframes will show fewer, larger gaps).
Symbol: Any tradable instrument. Originally designed for BTC1! (CME Bitcoin Futures) but compatible with all symbols.
Settings:
ATR Length: 14 (default)
Min Gap Size: 0.5x ATR (adjust based on timeframe and noise level)
Gap Age Limit: 3 months (configurable)
Max Historical Gaps: 300 (adjustable 1-500)
------------------------------------------------------
How It Works
Gap Detection : Identifies price discontinuities on every candle where:
Gap up: current candle low > previous candle high
Gap down: current candle high < previous candle low
Minimum gap size filter (ATR-based) eliminates insignificant gaps
Mitigation Tracking : Monitors when price touches both gap boundaries. A gap is marked as filled when the price has touched both the top and bottom of the gap zone, even if this occurs across multiple candles.
Visual Elements :
Green boxes: Unfilled gaps above current price (potential bullish targets)
Red boxes: Unfilled gaps below current price (potential bearish targets)
Gray boxes: Filled gaps (historical reference)
Labels: Display gap type, price level, and distance percentage
Analysis Table: Shows :
Distance % to nearest bullish gap (above price)
Distance % to nearest bearish gap (below price)
Trade bias (LONG if nearest gap is above, SHORT if nearest gap is below)
------------------------------------------------------
Key Features
Detects gaps on any timeframe (1m, 5m, 1h, 1D, etc.)
Boxes extend 500 bars forward for active gaps, stop at the fill bar for mitigated gaps
Real-time distance calculations update on every candle
Configurable age filter removes outdated gaps
ATR multiplier ensures gap detection adapts to market volatility and timeframe
------------------------------------------------------
Disclaimer
This indicator is provided for informational and educational purposes only.
It does not constitute financial advice, investment recommendations, or trading signals. The concept that gaps attract price is based on historical observation and does not guarantee future results.
Gap fills are not certain - gaps may remain unfilled indefinitely, or the price may reverse before reaching a gap. This indicator should not be used as the sole basis for trading decisions.
All trading involves substantial risk, including the potential loss of principal. Users should conduct their own research, apply proper risk management, test strategies thoroughly, and consult with qualified financial professionals before making trading decisions.
The authors and publishers are not responsible for any losses incurred through the use of this indicator.
Holographic Market Microstructure | AlphaNattHolographic Market Microstructure | AlphaNatt
A multidimensional, holographically-rendered framework designed to expose the invisible forces shaping every candle โ liquidity voids, smart money footprints, order flow imbalances, and structural evolution โ in real time.
---
๐ Overview
The Holographic Market Microstructure (HMS) is not a traditional indicator. Itโs a visual architecture built to interpret the true anatomy of the market โ a living data structure that fuses price, volume, and liquidity into one coherent holographic layer.
Instead of reacting to candles, HMS visualizes the marketโs underlying micro-dynamics : where liquidity hides, where volume flows, and how structure morphs as smart money accumulates or distributes.
Designed for system-based traders, volume analysts, and liquidity theorists who demand to see the unseen โ the invisible grid driving every price movement.
---
๐ฌ Core Analytical Modules
Microstructure Analysis
Deconstructs each barโs internal composition to identify imbalance between aggressive buying and selling. Using a configurable Imbalance Ratio and Liquidity Threshold , the algorithm marks low-liquidity zones and price inefficiencies as โliquidity voids.โ
โข Detects hidden supply/demand gaps.
โข Quantifies micro-level absorption and exhaustion.
โข Reveals flow compression and expansion phases.
Smart Money Tracking
Applies advanced volume-rate-of-change and price momentum relationships to map institutional activity.
โข Accumulation Zones โ Where price rises on expanding volume.
โข Distribution Zones โ Where price declines on rising volume.
โข Automatically visualized as glowing boxes, layered through time to simulate footprint persistence.
Fractal Structure Mapping
Reveals the recursive nature of price formation. HMS detects fractal highs/lows, then connects them into an evolving structure.
โข Defines nested market structure across multiple scales.
โข Maps trend progression and transition points.
โข Renders with adaptive glow lines to reflect depth and strength.
Volume Heat Map
Transforms historical volume data into a 3D holographic heat projection.
โข Each band represents a volume-weighted price level.
โข Gradient brightness = relative participation intensity.
โข Helps identify volume nodes, voids, and liquidity corridors.
HUD Display System
Real-time analytical dashboard summarizing the systemโs internal metrics directly on the chart.
โข Flow, Structure, Smart$, Liquidity, and Divergence โ all live.
โข Designed for both scalpers and swing traders to assess micro-context instantly.
---
๐ง Smart Money Intelligence Layer
The Smart Money Index dynamically evaluates the harmony (or conflict) between price momentum and volume acceleration. When institutions accumulate or distribute discreetly, volume surges ahead of price. HMS detects this divergence and overlays it as glowing smart money zones.
โ ACCUM โ Institutional absorption, early uptrend formation.
โ DISTRIB โ Distribution and top-heavy conditions.
โ IDLE โ Neutral flow equilibrium.
Divergences between price and volume are signaled using holographic alerts ( โ ALERT ) to highlight exhaustion or trap conditions โ often precursors to structural reversals.
---
๐ Fractal Market Structure Engine
The fractal subsystem recursively identifies local pivot symmetry, connecting micro-structural highs and lows into a holographic skeleton.
โข Bullish Structure โ Higher highs & higher lows align (โฒ BULLISH).
โข Bearish Structure โ Lower highs & lower lows dominate (โผ BEARISH).
โข Ranging โ Fractal symmetry balance (โ RANGING).
Each transition is visually represented through adaptive glow intensity, producing a living contour of market evolution .
---
๐ฅ Volume Heat Map Projection
The heatmap acts as a volumetric X-ray of the recent 100โ300 bars. Each horizontal segment reflects liquidity density, rendered with gradient opacity from cold (inactive) to hot (highly active).
โข Detects hidden accumulation shelves and distribution ridges.
โข Identifies imbalanced liquidity corridors (voids).
โข Reveals the invisible scaffolding of the order book.
When combined with smart money zones and structure lines, it creates a multi-layered holographic perspective โ allowing traders to see liquidity clusters and their interaction with evolving structure in real time.
---
๐ Holographic Visual Engine
Every element of HMS is dynamically color-mapped to its visual theme . Each theme carries a distinct personality:
Aeon โ Neon blue plasma aesthetic; futuristic and fluid.
Cyber โ High-contrast digital energy; circuit-like clarity.
Quantum โ Deep space gradients; reflective of non-linear flow.
Neural โ Organic transitions; biological intelligence simulation.
Plasma โ Vapor-bright gradients; high-energy reactive feedback.
Crystal โ Minimalist, transparent geometry; pristine data visibility.
Optional Glow Effects and Pulse Animations create a living hologram that responds to real-time market conditions.
---
๐งญ HUD Analytics Table
A live data matrix placed anywhere on-screen (top, middle, or side). It summarizes five critical systems:
Flow: Order flow bias โ โฒ BUYING / โผ SELLING / โ NEUTRAL.
Struct: Microstructure direction โ โฒ BULLISH / โผ BEARISH / โ RANGING.
Smart$: Institutional behavior โ โ ACCUM / โ DISTRIB / โ IDLE.
Liquid: Market efficiency โ โก VOID / โ NORMAL.
Diverg: Price/Volume correlation โ โ ALERT / โ CLEAR.
Each metricโs color dynamically adjusts according to live readings, effectively serving as a neural HUD layer for rapid interpretation.
---
๐จ Alert Conditions
Stay informed in real time with built-in alerts that trigger under specific structural or liquidity conditions.
Liquidity Void Detected โ Market inefficiency or thin volume region identified.
Strong Order Flow Detected โ Aggressive buying or selling momentum shift.
Smart Money Activity โ Institutional accumulation or distribution underway.
Price/Volume Divergence โ Volume fails to confirm price trend.
Market Structure Shift โ Fractal structure flips directional bias.
---
โ๏ธ Customization Parameters
Adjustable Microstructure Depth (20โ200 bars).
Configurable Imbalance Ratio and Liquidity Threshold .
Adaptive Smart Money Sensitivity via Accumulation Threshold (%).
Multiple Fractal Depth Layers for precise structural analysis.
Scalable Heatmap Resolution (5โ20 levels) and opacity control.
Selectable HUD Position to suit personal layout preferences.
Each parameter adjusts the balance between visual clarity and data density , ensuring optimal performance across intraday and macro timeframes alike.
---
๐งฉ Trading Application
Identify early signs of institutional activity before breakouts.
Track structure transitions with fractal precision.
Locate hidden liquidity voids and high-value areas.
Confirm strength of trends using order-flow bias.
Detect volume-based divergences that often precede reversals.
HMS is designed not just for observation โ but for contextual understanding . Its purpose is to help traders anchor strategies in liquidity and flow dynamics rather than surface-level price action.
---
๐ช Philosophy
Markets are holographic. Each candle contains a reflection of every other candle โ a fractal within a fractal, a structure within a structure. The HMS is built to reveal that reflection, allowing traders to see through the marketโs multidimensional fabric.
---
Developed by: AlphaNatt
Version: v6
Category: Market Microstructure | Volume Intelligence
Framework: PineScript v6 | Holographic Visualization System
Not financial advice
Squeeze Go Momentum Pro [KingThies] โ OVERVIEW
The Squeeze Momentum Pro indicator identifies volatility compression phases and breakout opportunities by comparing Bollinger Bands to Keltner Channels. When price consolidates (squeeze), the bands contract inside the channels, signaling an imminent breakout. The momentum histogram shows directional bias, helping traders anticipate which way price will move when the squeeze releases.
This indicator displays in a separate panel below the price chart, providing clear visual signals without cluttering price action.
โ KEY FEATURES
Momentum Histogram
The histogram is the primary visual element, displaying momentum strength and direction with four distinct color states:
โข Dark Green (#00C853) โ Strong bullish momentum that is increasing. This signals strengthening upward pressure and potential continuation.
โข Light Green (#26A69A) โ Bullish momentum that is decreasing. Price remains in bullish territory but upward force is weakening.
โข Dark Red (#D32F2F) โ Strong bearish momentum that is increasing. This signals strengthening downward pressure and potential continuation.
โข Light Red (#EF5350) โ Bearish momentum that is decreasing. Price remains in bearish territory but downward force is weakening.
The color intensity provides immediate feedback on momentum strength and trend health.
Squeeze State Indicator
Colored dots on the zero line communicate the current volatility state:
โข Orange Dots โ Squeeze is ON. Bollinger Bands have contracted inside Keltner Channels, indicating consolidation and low volatility.
A breakout is building and traders should prepare for directional movement.
โข Green Dots โ Squeeze is OFF. Bollinger Bands have expanded outside Keltner Channels, indicating active momentum and higher volatility.
Price is moving with conviction in the current direction.
โข Gray Dots โ Neutral state. The bands are transitioning between squeeze states.
Release Triangles
Triangle shapes mark the exact bar when a squeeze releases, providing precise entry timing:
โข Green Triangle Up โ Bullish squeeze release. The squeeze has ended with positive momentum, suggesting a long setup opportunity.
โข Red Triangle Down โ Bearish squeeze release. The squeeze has ended with negative momentum, suggesting a short setup opportunity.
Information Panel
A compact dashboard in the top-right corner displays real-time trading intelligence:
โข Squeeze Status โ Current state: ON, OFF, or NEUTRAL with color coding
โข Momentum Direction โ Current bias: BULL or BEAR
โข Momentum Value โ Precise numerical reading of momentum strength
โข Trading Signal โ Actionable status: LONG SETUP, SHORT SETUP, WAIT, or MONITOR
Configurable Parameters
All calculation inputs are adjustable to match your trading style and timeframe:
โข BB Length โ Bollinger Bands period (default: 20)
โข BB StdDev โ Bollinger Bands standard deviation multiplier (default: 2.0)
โข KC Length โ Keltner Channels period (default: 20)
โข KC ATR Multiplier โ Keltner Channels range multiplier (default: 1.5)
โข Momentum Length โ Linear regression period for momentum calculation (default: 20)
Alert System
Four alert conditions notify you of critical trading opportunities:
โข Bullish Squeeze Release โ Squeeze has released with bullish momentum, indicating a potential long entry
โข Bearish Squeeze Release โ Squeeze has released with bearish momentum, indicating a potential short entry
โข Squeeze Started โ Volatility compression detected, prepare for upcoming breakout
โข Squeeze Ended โ Volatility expansion confirmed, breakout is active
โ TRADING METHODOLOGY
The indicator follows a clear four-step process for identifying and trading squeeze breakouts:
1 - Wait for Orange Dots . When orange dots appear on the zero line, a squeeze is building. This indicates price consolidation and declining volatility.
Do not enter trades during this phase. Instead, prepare by identifying key support and resistance levels and potential breakout directions.
2 - Watch for Release Triangle . When a triangle appears, the squeeze has released and a breakout is beginning. This is your entry signal.
The triangle color (green up or red down) combined with the histogram direction indicates the breakout direction.
3 - Confirm with Histogram Direction . Check the momentum histogram for directional confirmation:
โข Green histogram + green triangle up = Go long. Bullish momentum supports upward breakout.
โข Red histogram + red triangle down = Go short. Bearish momentum supports downward breakout.
4 - Monitor Momentum Intensity . Stay in the trade while histogram bars maintain their dark, intense color.
When colors lighten (dark green to light green, or dark red to light red), momentum is weakening and you should consider taking profits or tightening stops.
โ INTERPRETATION GUIDE
Squeeze Detection Logic
A squeeze occurs when Bollinger Bands contract inside Keltner Channels. This happens when:
โข Standard deviation of price decreases (BB narrows)
โข Price consolidates within a tight range
โข Volatility compresses to unsustainable levels
The orange dots signal this condition, warning traders that explosive movement is imminent.
Squeeze Release Logic
A squeeze releases when Bollinger Bands expand outside Keltner Channels. This happens when:
โข Price volatility increases sharply
โข Price breaks out of consolidation
โข Volume typically expands (check volume separately)
The green dots and release triangles signal this condition, indicating the direction and timing of the breakout.
Momentum Reading
The histogram uses linear regression to calculate momentum relative to the midpoint of the recent range:
โข Above Zero : Price is trading above the range midpoint with bullish pressure
โข Below Zero : Price is trading below the range midpoint with bearish pressure
โข Increasing Bars : Momentum is strengthening in the current direction (darker color)
โข Decreasing Bars : Momentum is weakening in the current direction (lighter color)
โ BEST PRACTICES
โข Timeframe Selection โ The indicator works on all timeframes but performs best on 15-minute to daily charts.
Lower timeframes may produce more false signals due to noise.
โข Confluence Trading โ Combine squeeze releases with support/resistance levels, trend lines, or other indicators for higher probability setups.
โข Volume Confirmation โ Check that squeeze releases occur with increasing volume. Low volume breakouts are more likely to fail.
โข Multiple Timeframe Analysis โ Check higher timeframes for overall trend direction. Trade squeeze releases that align with the larger trend.
โข Parameter Adjustment โ Increase BB and KC lengths for smoother signals on higher timeframes. Decrease for more sensitive signals on lower timeframes.
โ LIMITATIONS
โข The indicator does not predict breakout direction before the squeeze releases. The momentum histogram provides bias but is not definitive until the breakout occurs.
โข False breakouts can occur, particularly in choppy or low-volume market conditions. Always use proper risk management and stop losses.
โข The indicator works best in trending markets. In deeply ranging markets with no clear direction, squeeze signals may be less reliable.
โข Momentum calculations use linear regression which can lag during extremely fast price movements. Confirm signals with price action.
โ NOTES
This implementation uses linear regression for momentum calculation rather than simple moving averages, providing more responsive and accurate directional signals. The four-color histogram system gives traders nuanced feedback on momentum strength that binary color schemes cannot provide.
The indicator automatically adjusts to any symbol and timeframe without modification, making it suitable for stocks, forex, crypto, and futures markets.
โ CREDITS
Squeeze methodology inspired by John Carter's TTM Squeeze indicator. Momentum calculation and visual design optimized for modern trading workflows.
SuperTrend Dual RMAOverview
The SuperTrend Dual RMA is a hybrid volatility-based trend-following system that merges two Relative Moving Averages (RMAs) with an Average True Range (ATR)โanchored SuperTrend framework. The primary purpose of this indicator is to offer a smoother and more reliable depiction of directional bias while maintaining sensitivity to price volatility and market volume.
Traditional SuperTrend implementations typically rely on a single moving average and a fixed volatility envelope. This dual RMA structure introduces an adaptive central tendency line that reacts proportionally to both price and volume, allowing for more nuanced identification of trend reversals and continuation patterns.
**Core Concept**
The indicator is built around two key principles โ smoothing and volatility adaptation.
1. **Smoothing:** The use of two separate RMAs with configurable lengths creates a dynamic equilibrium between short-term responsiveness and long-term stability. The first RMA captures near-term directional shifts, while the second provides broader market context. The average of both becomes the foundation of the SuperTrend bands.
2. **Volatility Adaptation:** The ATR multiplier and period define the distance between upper and lower bands relative to recent volatility. This ensures that the SuperTrend line remains flexible across varying market conditions โ expanding during high volatility and contracting during calm phases.
**Calculation Steps**
* The indicator first computes two volume-weighted RMAs based on the typical price (`hlc3`) multiplied by trading volume.
* Each RMA is normalized by the smoothed volume to maintain proportional weighting.
* These two RMAs are averaged to produce a โbasis lineโ that reflects the current market consensus price.
* The ATR is calculated over a user-defined period, then multiplied by a volatility factor (ATR multiplier).
* The resulting ATR value defines dynamic upper and lower thresholds around the basis line.
* Trend direction is determined by price closing behavior relative to these thresholds:
* When the closing price exceeds the upper band, the trend is considered bullish.
* When it drops below the lower band, the trend turns bearish.
* If price remains within the bands, the prior trend direction is maintained for consistency.
**Visual Structure**
The SuperTrend Dual RMA provides multiple layers of visual feedback for enhanced interpretation:
* Two distinct RMA lines (short and long) are plotted with complementary colors for contrast and clarity.
* A soft fill between the RMA lines highlights the interaction between short- and medium-term momentum.
* The ATR-based SuperTrend bands are drawn above and below the basis, with adaptive coloring that corresponds to the prevailing trend direction.
* Bar colors automatically adjust to reflect bullish or bearish bias, making it easy to identify trend shifts without relying solely on crossovers.
* Optional triangle markers appear below or above bars to signal potential buy or sell opportunities based on crossover logic.
**Signals and Alerts**
The indicator provides real-time crossover detection:
* **Buy Signal:** Triggered when the closing price moves above the SuperTrend line, confirming potential bullish continuation or reversal.
* **Sell Signal:** Triggered when the closing price drops below the SuperTrend line, indicating possible bearish momentum or reversal.
Both conditions have built-in `alertcondition()` functions, allowing users to set automated alerts for trading or monitoring purposes. This enables integration with TradingViewโs alert system for push notifications, emails, or webhook connections.
**Usage Guidelines**
* **Trend Identification:** Use the color-coded trend line and bar color as a visual guide to the current directional bias.
* **Entry and Exit Timing:** Consider entering trades when a new crossover alert appears, preferably in the direction of the overall higher-timeframe trend.
* **Parameter Tuning:** Adjust the RMA lengths and ATR parameters based on asset volatility. Shorter RMA and ATR settings provide faster reactions, suitable for intraday or high-frequency trading, while longer configurations better fit swing or position strategies.
* **Risk Management:** Because the SuperTrend inherently acts as a dynamic stop level, traders can use the opposite band or SuperTrend line as a trailing stop or exit signal.
**Practical Applications**
* Trend confirmation in multi-timeframe strategies.
* Adaptive trailing stop placement using the lower or upper band.
* Visual comparison of volume-weighted price movement against volatility envelopes.
* Integration into algorithmic trading systems as a signal filter or trend bias component.
* Identification of overextended conditions when price significantly diverges from the SuperTrend basis.
**Originality and Advantages**
The SuperTrend Dual RMA differentiates itself from conventional SuperTrend scripts through three innovative design choices:
1. **Dual Volume-Weighted RMAs:** By incorporating two RMAs weighted by trading volume, the indicator accounts for liquidity dynamics, producing smoother and more reliable averages compared to price-only calculations.
2. **Anchored SuperTrend Framework:** The SuperTrend bands are not derived from a fixed source (such as a single close or median price) but from a blended RMA basis, making them more adaptable to varying market behaviors.
3. **Integrated Multi-Layer Visualization:** The inclusion of filled regions between RMAs, dynamic band coloring, and bar tinting enhances readability and analytical depth without overwhelming the chart.
These improvements collectively create a more balanced and data-rich representation of market structure, offering a higher degree of analytical precision. Itโs suitable for traders seeking both discretionary and systematic use, as the indicatorโs logic is transparent and compatible with alert-based or automated workflows.
**Summary**
The SuperTrend Dual RMA is a refined evolution of the classic SuperTrend, optimized for traders who value smoother directional tracking and more intelligent volatility adaptation. It blends two time-sensitive, volume-aware moving averages with an ATR-derived volatility system to deliver reliable, actionable trend information. Its visual design, adaptive responsiveness, and integrated alert functionality make it a complete solution for identifying and managing trends across multiple asset classes and timeframes.
MCL RSI Conflux v2.5 โ Multi-Timeframe Momentum & Z-Score Full Description
Overview
The MCL RSI Conflux v2.5 is a multi-timeframe momentum model that integrates daily, weekly, and monthly RSI values into a unified composite. It extends the classical RSI framework with adaptive overbought/oversold thresholds and statistical normalization (Z-score confluence).
This combination allows traders to visualize cross-timeframe alignment, identify synchronized momentum shifts, and detect exhaustion zones with higher statistical confidence.
Methodology
The script extracts RSI data from three major time horizons:
Daily RSI (short-term momentum)
Weekly RSI (intermediate trend)
Monthly RSI (macro bias)
Each RSI is optionally smoothed, weighted, and aggregated into a Composite RSI.
A Z-score transformation then measures how far each RSI deviates from its historical mean, revealing when momentum strength is statistically extreme or aligned across timeframes.
Key Features
Multi-Timeframe RSI Engine โ Computes RSI across D/W/M intervals with individual weighting controls.
Adaptive Overbought/Oversold Bands โ Automatically adjusts OB/OS thresholds based on rolling volatility (standard deviation of daily RSI).
Composite RSI Score โ Weighted consensus RSI that represents total market momentum.
Z-Score Confluence Analysis โ Identifies when all three timeframes are statistically synchronized.
Z-Composite Histogram โ Displays aggregated Z-score strength around the midline (50).
Divergence Detection โ Flags confirmed pivot-based bull and bear divergences on the daily RSI.
Dynamic Gradient Background โ Shifts from red to green based on composite momentum regime.
Customizable Control Panel โ Displays RSI values, Z-scores, state, and adaptive bands for each timeframe.
Integrated Alerts โ For crossovers, risk-on/off thresholds, alignment, and Z-confluence events.
Interpretation
All RSI values above 50: multi-timeframe bullish alignment.
All RSI values below 50: multi-timeframe bearish alignment.
Composite RSI > 60: risk-on environment; momentum expansion.
Composite RSI < 45: risk-off environment; momentum contraction.
Adaptive OB/OS hits: potential exhaustion or mean reversion setup.
Green Z-ribbon: all Z-scores positive and aligned (statistical confirmation).
Red Z-ribbon: all Z-scores negative and aligned (broad market weakness).
Divergences: short-term warning signals against the prevailing momentum bias.
Practical Application
Use the Composite RSI as a global momentum gauge for position bias.
Trade only in the direction of higher-timeframe alignment (avoid countertrend RSI).
Combine Z-ribbon confirmation with Composite RSI crosses to filter noise.
Use divergence labels and adaptive thresholds for risk reduction or exit timing.
Ideal for swing traders and macro momentum models seeking trend synchronization filters.
Recommended Settings
Market Mode k-Band Lookback Use Case
Stocks / ETFs Adaptive 0.85 200 Medium-term rotation filter
Crypto Adaptive 1.00 150 Volatility-responsive swing filter
Commodities Fixed 70/30 100 Mean reversion model
Alerts Included
Daily RSI crossed above/below Weekly RSI
Composite RSI > Risk-On threshold
Composite RSI < Risk-Off threshold
All RSI aligned above/below 50
Z-Score Conformity (All positive or all negative)
Overbought/Oversold triggers
Authorโs Note
This indicator was designed for research and systematic confluence analysis within Mongoose Capital Labs.
It is not financial advice and should be used in combination with independent risk assessment, volume confirmation, and higher-timeframe context.
Aibuyzone Vector Strategy - Floating DashboardVector Strategy โ Floating Dashboard
The Vector Strategy is a visual trading-analysis tool designed to highlight strong directional candles that may represent impulsive moves in the market. It combines candle-structure analysis, volatility expansion, volume conditions, and trend filters into a single clear visual display.
Core Logic
Identifies candles where the body makes up a significant portion of the full bar range, suggesting strong directional intent.
Uses an ATR (Average True Range) expansion filter to confirm that the current candleโs range is larger than normal volatility.
Optionally applies a wick-imbalance requirement to favor bars showing a clear directional bias.
Can include a volume spike filter, marking candles where volume exceeds a moving average multiple.
Trend and Momentum Filters
Local trend: Defined by a fast and slow EMA pair to show short-term bias.
Higher-timeframe trend: Optionally aligns with an EMA from a higher timeframe to confirm broader momentum.
Momentum: RSI filter avoids generating signals in heavily overbought or oversold conditions.
Fair Value Gap (FVG) Option
When enabled, the script checks for a simple three-bar fair-value-gap structure in the direction of the potential signal, acting as an additional confirmation filter.
Signals and Visuals
Plots fast and slow EMAs to visualize the underlying trend.
Displays up/down shapes when qualifying vector-candle conditions occur.
Optional labels show โVector Longโ or โVector Shortโ at the candle where conditions align.
Includes alert conditions for both long and short setups.
Floating Dashboard
A compact floating panel summarizes the most recent signal and market context:
Current signal state (Long / Short / Neutral)
Trend bias (Bullish / Bearish / Flat)
RSI reading
Body-to-range percentage
Volume-spike confirmation
Practical Use
This tool can assist traders in identifying strong impulsive candles aligned with a trend filter.
It is meant to complement a complete trading strategy, not to be used in isolation.
Traders may adjust thresholds such as ATR multiple, body-percentage, or RSI range based on the instrumentโs volatility and personal risk tolerance.
Important Notice
This script is provided for educational and analytical purposes only.
It does not provide financial advice, recommendations, or guaranteed results.
Market conditions vary, and past performance does not ensure future outcomes.
Always test and validate any configuration in a simulated environment before live trading.
Luxy Adaptive MA Cloud - Trend Strength & Signal Tracker V2Luxy Adaptive MA Cloud - Professional Trend Strength & Signal Tracker
Next-generation moving average cloud indicator combining ultra-smooth gradient visualization with intelligent momentum detection. Built for traders who demand clarity, precision, and actionable insights.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
WHAT MAKES THIS INDICATOR SPECIAL?
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Unlike traditional MA indicators that show static lines, Luxy Adaptive MA Cloud creates a living, breathing visualization of market momentum. Here's what sets it apart:
Exponential Gradient Technology
This isn't just a simple fill between two lines. It's a professionally engineered gradient system with 26 precision layers using exponential density distribution. The result? An organic, cloud-like appearance where the center is dramatically darker (15% transparency - where crossovers and price action occur), while edges fade gracefully (75% transparency). Think of it as a visual "heat map" of trend strength.
Dynamic Momentum Intelligence
Most MA clouds only show structure (which MA is on top). This indicator shows momentum strength in real-time through four intelligent states:
- ๐ข Bright Green = Explosive bullish momentum (both MAs rising strongly)
- ๐ต Blue = Weakening bullish (structure intact, but momentum fading)
- ๐ Orange = Caution zone (bearish structure forming, weak momentum)
- ๐ด Deep Red = Strong bearish momentum (both MAs falling)
The cloud literally tells you when trends are accelerating or losing steam.
Conditional Performance Architecture
Every calculation is optimized for speed. Disable a feature? It stops calculating entirelyโnot just hidden, but not computed . The 26-layer gradient only renders when enabled. Toggle signals off? Those crossover checks don't run. This makes it one of the most efficient cloud indicators available, even with its advanced visual system.
Zero Repaint Guarantee
All signals and momentum states are based on confirmed bar data only . What you see in historical data is exactly what you would have seen trading live. No lookahead bias. No repainting tricks. No signals that "magically" appear perfect in hindsight. If a signal shows in history, it would have triggered in real-time at that exact moment.
Educational by Design
Every single input includes comprehensive tooltips with:
- Clear explanations of what each parameter does
- Practical examples of when to use different settings
- Recommended configurations for scalping, day trading, and swing trading
- Real-world trading impact ("This affects entry timing" vs "This is visual only")
You're not just getting an indicatorโyou're learning how to use it effectively .
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
THE GRADIENT CLOUD - TECHNICAL DETAILS
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Architecture:
26 precision layers for silk-smooth transitions
Exponential density curve - layers packed tightly near center (where crossovers happen), spread wider at edges
75%-15% transparency range - center is highly opaque (15%), edges fade gracefully (75%)
V-Gradient design - emphasizes the action zone between Fast and Medium MAs
The Four Momentum States:
๐ข GREEN - Strong Bullish
Fast MA above Medium MA
Both MAs rising with momentum > 0.02%
Action: Enter/hold LONG positions, strong uptrend confirmed
๐ต BLUE - Weak Bullish
Fast MA above Medium MA
Weak or flat momentum
Action: Caution - bullish structure but losing strength, consider trailing stops
๐ ORANGE - Weak Bearish
Medium MA above Fast MA
Weak or flat momentum
Action: Warning - bearish structure developing, consider exits
๐ด RED - Strong Bearish
Medium MA above Fast MA
Both MAs falling with momentum < -0.02%
Action: Enter/hold SHORT positions, strong downtrend confirmed
Smooth Transitions: The momentum score is smoothed using an 8-bar EMA to eliminate noise and prevent whipsaws. You see the true trend , not every minor fluctuation.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
FLEXIBLE MOVING AVERAGE SYSTEM
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Three Customizable MAs:
Fast MA (default: EMA 10) - Reacts quickly to price changes, defines short-term momentum
Medium MA (default: EMA 20) - Balances responsiveness with stability, core trend reference
Slow MA (default: SMA 200, optional) - Long-term trend filter, major support/resistance
Six MA Types Available:
EMA - Exponential; faster response, ideal for momentum and day trading
SMA - Simple; smooth and stable, best for swing trading and trend following
WMA - Weighted; middle ground between EMA and SMA
VWMA - Volume-weighted; reflects market participation, useful for liquid markets
RMA - Wilder's smoothing; used in RSI/ADX, excellent for trend filters
HMA - Hull; extremely responsive with minimal lag, aggressive option
Recommended Settings by Trading Style:
Scalping (1m-5m):
Fast: EMA(5-8)
Medium: EMA(10-15)
Slow: Not needed or EMA(50)
Day Trading (5m-1h):
Fast: EMA(10-12)
Medium: EMA(20-21)
Slow: SMA(200) for bias
Swing Trading (4h-1D):
Fast: EMA(10-20)
Medium: EMA(34-50)
Slow: SMA(200)
Pro Tip: Start with Fast < Medium < Slow lengths. The gradient works best when there's clear separation between Fast and Medium MAs.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
CROSSOVER SIGNALS - CLEAN & RELIABLE
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Golden Cross โฌ LONG Signal
Fast MA crosses above Medium MA
Classic bullish reversal or trend continuation signal
Most reliable when accompanied by GREEN cloud (strong momentum)
Death Cross โฌ SHORT Signal
Fast MA crosses below Medium MA
Classic bearish reversal or trend continuation signal
Most reliable when accompanied by RED cloud (strong momentum)
Signal Intelligence:
Anti-spam filter - Minimum 5 bars between signals prevents noise
Clean labels - Placed precisely at crossover points
Alert-ready - Built-in ALERTS for automated trading systems
No repainting - Signals based on confirmed bars only
Signal Quality Assessment:
High-Quality Entry:
Golden Cross + GREEN cloud + Price above both MAs
= Strong bullish setup โ
Low-Quality Entry (skip or wait):
Golden Cross + ORANGE cloud + Choppy price action
= Weak bullish setup, likely whipsaw โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
REAL-TIME INFO PANEL
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
An at-a-glance dashboard showing:
Trend Strength Indicator:
Visual display of current momentum state
Color-coded header matching cloud color
Instant recognition of market bias
MA Distance Table:
Shows percentage distance of price from each enabled MA:
Green rows : Price ABOVE MA (bullish)
Red rows : Price BELOW MA (bearish)
Gray rows : Price AT MA (rare, decision point)
Distance Interpretation:
+2% to +5%: Healthy uptrend
+5% to +10%: Getting extended, caution
+10%+: Overextended, expect pullback
-2% to -5%: Testing support
-5% to -10%: Oversold zone
-10%+: Deep correction or downtrend
Customization:
4 corner positions
5 font sizes (Tiny to Huge)
Toggle visibility on/off
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
HOW TO USE - PRACTICAL TRADING GUIDE
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
STRATEGY 1: Trend Following
Identify trend : Wait for GREEN (bullish) or RED (bearish) cloud
Enter on signal : Golden Cross in GREEN cloud = LONG, Death Cross in RED cloud = SHORT
Hold position : While cloud maintains color
Exit signals :
โข Cloud turns ORANGE/BLUE = momentum weakening, tighten stops
โข Opposite crossover = close position
โข Cloud turns opposite color = full reversal
STRATEGY 2: Pullback Entries
Confirm trend : GREEN cloud established (bullish bias)
Wait for pullback : Price touches or crosses below Fast MA
Enter when : Price rebounds back above Fast MA with cloud still GREEN
Stop loss : Below Medium MA or recent swing low
Target : Previous high or when cloud weakens
STRATEGY 3: Momentum Confirmation
Your setup triggers : (e.g., chart pattern, support/resistance)
Check cloud color :
โข GREEN = proceed with LONG
โข RED = proceed with SHORT
โข BLUE/ORANGE = skip or reduce size
Use gradient as confluence : Not as primary signal, but as momentum filter
Risk Management Tips:
Never enter against the cloud color (don't LONG in RED cloud)
Reduce position size during BLUE/ORANGE (transition periods)
Place stops beyond Medium MA for swing trades
Use Slow MA (200) as final trend filter - don't SHORT above it in uptrends
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
PERFORMANCE & OPTIMIZATION
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Tested On:
Crypto: BTC, ETH, major altcoins
Stocks: SPY, AAPL, TSLA, QQQ
Forex: EUR/USD, GBP/USD, USD/JPY
Indices: S&P 500, NASDAQ, DJI
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
TRANSPARENCY & RELIABILITY
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Educational Focus:
Detailed tooltips on every input
Clear documentation of methodology
Practical examples in descriptions
Teaches you why , not just what
Open Logic:
Momentum calculation: (Fast slope + Medium slope) / 2
Smoothing: 8-bar EMA to reduce noise
Thresholds: ยฑ0.02% for strong momentum classification
Everything is transparent and explainable
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
COMPLETE FEATURE LIST
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Visual Components:
26-layer exponential gradient cloud
3 customizable moving average lines
Golden Cross / Death Cross labels
Real-time info panel with trend strength
MA distance table
Calculation Features:
6 MA types (EMA, SMA, WMA, VWMA, RMA, HMA)
Momentum-based cloud coloring
Smoothed trend strength scoring
Conditional performance optimization
Customization Options:
All MA lengths adjustable
All colors customizable (when gradient disabled)
Panel position (4 corners)
Font sizes (5 options)
Toggle any feature on/off
Signal Features:
Anti-spam filter (configurable gap)
Clean, non-overlapping labels
Built-in alert conditions
No repainting guarantee
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
IMPORTANT DISCLAIMERS
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
This indicator is for educational and informational purposes only
Not financial advice - always do your own research
Past performance does not guarantee future results
Use proper risk management - never risk more than you can afford to lose
Test on paper/demo accounts before using with real money
Combine with other analysis methods - no single indicator is perfect
Works best in trending markets; less effective in choppy/sideways conditions
Signals may perform differently in different timeframes and market conditions
The indicator uses historical data for MA calculations - allow sufficient lookback period
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
CREDITS & TECHNICAL INFO
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Version: 2.0
Release: October 2025
Special Thanks:
TradingView community for feedback and testing
Pine Script documentation for technical reference
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
SUPPORT & UPDATES
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Found a bug? Comment below with:
Ticker symbol
Timeframe
Screenshot if possible
Steps to reproduce
Feature requests? I'm always looking to improve! Share your ideas in the comments.
Questions? Check the tooltips first (hover over any input) - most answers are there. If still stuck, ask in comments.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Happy Trading!
Remember: The best indicator is the one you understand and use consistently. Take time to learn how the cloud behaves in different market conditions. Practice on paper before going live. Trade smart, manage risk, and may the trends be with you! ๐
Swing AURORA v4.0 โ Refined Trend Signals### Swing Algo v4.0 โ Refined Trend Signals
#### Overview
Swing Algo v4.0 is an advanced technical indicator designed for TradingView, built to detect trend changes and provide actionable buy/sell signals in various market conditions. It combines multiple technical elements like moving averages, ADX for trend strength, Stochastic RSI for timing, and RSI divergence for confirmation, all while adapting to different timeframes through auto-tuning. This indicator overlays on your chart, highlighting trend regimes with background colors, displaying buy/sell labels (including "strong" variants), and offering early "potential" signals for proactive trading decisions. It's suitable for swing trading, trend following, or as a filter for other strategies across forex, stocks, crypto, and other assets.
#### Purpose
The primary goal of Swing Algo v4.0 is to help traders identify high-probability trend reversals and continuations early, reducing noise and false signals. It aims to provide clear, non-repainting signals that align with market structure, volatility, and momentum. By incorporating filters like higher timeframe (HTF) alignment, bias EMAs, and divergence, it refines entries for better accuracy. The indicator emphasizes balanced performance across aggressive, balanced, and conservative modes, making it versatile for both novice and experienced traders seeking to optimize their decision-making process.
#### What It Indicates
- **Trend Regimes (Background Coloring)**: The chart background changes color to reflect the current market regime:
- **Green (Intense for strong uptrends, faded when cooling)**: Indicates bullish trends where price is above the baseline and EMAs are aligned upward.
- **Red/Maroon (Intense maroon for strong downtrends, faded red when cooling)**: Signals bearish trends with price below the baseline and downward EMA alignment.
- **Faded Yellow**: Marks "no-trade" zones or potential trend changes, where conditions are choppy, weak, or neutral (e.g., low ADX, near baseline, or low volatility).
- **Buy/Sell Signals**: Labels appear on the chart for confirmed entries:
- "BUY" or "STRONG BUY" for bullish signals (strong variants require higher scores and optional divergence).
- "SELL" or "STRONG SELL" for bearish signals.
- **Potential Signals**: Early warnings like "Potential BUY" or "Potential SELL" appear before full confirmation, allowing traders to anticipate moves (confirmed after a few bars based on the trigger window).
- **Divergence Marks**: Small "DIVโ" (bullish) or "DIVโ" (bearish) labels highlight RSI divergences on pivots, adding confluence for strong signals.
- **Lines**: Optional plots for baseline (teal), EMA13/21 (lime/red based on crossover), providing visual trend context.
Signals are anchored either to the current bar or confirmed pivots, ensuring alignment with price action. The indicator avoids repainting by confirming on close if enabled.
#### Key Parameters and Customization
Swing Algo v4.0 offers minimal yet efficient parameters for fine-tuning, with defaults optimized for common use cases. Most can be auto-tuned based on timeframe for simplicity:
- **Confirm on Close (no repaint)**: Boolean (default: true) โ Ensures signals don't repaint by waiting for bar confirmation.
- **Auto-tune by Timeframe**: Boolean (default: true) โ Automatically adjusts lengths and sensitivity for 5-15m, 30-60m, 2-4h, or higher frames.
- **Mode**: String (options: Aggressive, Balanced , Conservative) โ Controls signal thresholds; Aggressive for more signals, Conservative for fewer but higher-quality ones.
- **Signal Anchor**: String (options: Pivot (divLB) , Current bar) โ Places labels on confirmed pivots or the current bar.
- **Trigger Window (bars)**: Integer (default: 3) โ Window for signal timing; auto-tuned if enabled.
- **Baseline Type**: String (options: HMA , EMA, ALMA) โ Core trend line; lengths auto-tune (e.g., 55 for short frames).
- **Use Bias EMA Filter**: Boolean (default: false) โ Adds a long-term EMA for trend bias.
- **Use HTF Filter**: Boolean (default: false) โ Aligns with higher timeframe (auto or manual like 60m, 240m, D); override for stricter scoring.
- **Sensitivity (10โ90)**: Integer (default: 55) โ Adjusts ADX threshold for trend detection; higher = more sensitive.
- **Use RSI-Stoch Trigger**: Boolean (default: true) โ Enables Stochastic RSI for entry timing; customizable lengths, smooths, and levels.
- **Use RSI Divergence for STRONG**: Boolean (default: true) โ Requires divergence for strong signals; pivot lookback (default: 5).
- **Visual Options**: Booleans for background regime, labels, divergence marks, and lines (all default: true).
These parameters are grouped for ease, with tooltips in TradingView for quick reference. Start with defaults and tweak based on backtesting.
#### How It Works
At its core, Swing Algo v4.0 calculates a baseline (e.g., HMA) to define the trend direction. It then scores potential buys/sells using factors like:
- **Trend Strength**: ADX above a dynamic threshold, combined with EMA crossovers (13/21) and slope analysis.
- **Volatility/Volume**: Bollinger/Keltner squeeze exits, volume z-score, and ATR filters to avoid choppy markets.
- **Timing**: Stochastic RSI crossovers or micro-timing via DEMA/TEMA for precise entries.
- **Filters**: Bias EMA, HTF alignment, gap from baseline, and no-trade zones (weak ADX, near baseline, low vol).
- **Divergence**: RSI pivots confirm strong signals.
- **Scoring**: Buy/sell scores (min 3-5 based on mode) trigger labels only when all gates pass, with early "potential" detection for foresight.
The algorithm processes these in real-time, auto-adapting to timeframe for efficiency. Signals flip only on direction changes to prevent over-trading. For best results, use on liquid assets and combine with risk management.
#### Disclaimer
This indicator is for educational and informational purposes only and does not constitute financial advice, investment recommendations, or trading signals. Trading involves significant risk of loss and is not suitable for all investors. Past performance is not indicative of future results. Always backtest the indicator on your preferred assets and timeframes, and consult a qualified financial advisor before making any trading decisions. The author assumes no liability for any losses incurred from using this script. Use at your own risk.
Multi Timeframe Market Structure ContinuationOverview
This indicator identifies Break of Structure (BOS) and Change of Character (ChoCh) patterns using multi-timeframe (MTF) analysis to filter high-probability trade setups. By aligning lower timeframe signals with higher timeframe bias, it helps traders enter positions in the direction of the dominant trend while avoiding counter-trend traps.
Multi-Timeframe Analysis
The indicator analyzes market structure on two timeframes simultaneously:
Current Timeframe (CTF): Detects immediate BOS and ChoCh signals for entry timing
Higher Timeframe (HTF): Establishes the overall trend direction (default: 1H, customizable)
Signals only appear when the current timeframe structure aligns with the higher timeframe bias, ensuring you're trading with the momentum, not against it.
Break of Structure (BOS)
BOS signals indicate trend continuation - when price breaks a previous high in an uptrend or a previous low in a downtrend. These are reliable entries that confirm the trend is still active and strong.
Change of Character (ChoCh)
ChoCh signals mark early trend reversals - when market structure shifts from bearish to bullish (or vice versa). When captured in alignment with the higher timeframe trend, ChoCh entries can achieve exceptional risk-to-reward ratios as they allow entry near the beginning of a new impulse move.
Exit Signals
Exit signals are plotted when a ChoCh occurs in the opposite direction of the HTF trend. For example, if the HTF is bullish and a bearish ChoCh forms on the current timeframe, an orange "EXIT" signal appears - warning long traders that the lower timeframe structure is shifting against them. This provides an early warning system to protect profits or minimize losses before the HTF trend itself reverses.
Trading Strategy Recommendations
Trending Markets (Recommended)
In strong trending conditions, both BOS and ChoCh signals can be taken when aligned with the HTF bias. ChoCh entries are particularly powerful as they catch early reversals within the larger trend, offering entries with tight stop losses and extended profit targets.
Ranging Markets
During consolidation or choppy conditions, it's best to be selective and take only BOS entries. BOS signals confirm that the trend is continuing beyond the range, reducing false breakouts and whipsaw trades that are common with counter-trend ChoCh signals in sideways markets.
Customization
Pivot Length: Adjust the sensitivity of structure detection (default: 5). Lower values detect structure more frequently with earlier but potentially noisier signals. Higher values provide cleaner, more significant structural breaks but with some delay.
Higher Timeframe: Customize the HTF to suit your trading style. Day traders might use 1H HTF on 5m charts, while swing traders could use 4H or Daily HTF.
Alert System
Six alert conditions available:
Long BOS Entry / Long ChoCh Entry
Short BOS Entry / Short ChoCh Entry
Long Exit / Short Exit
All alerts fire only on confirmed candle closes to eliminate repainting and false signals.
Visual Features
Color-coded background showing HTF bias
Clear BOS/ChoCh labels with horizontal lines at structure levels
Orange "EXIT" signals when structure breaks against your position
Gray lines tracking current swing highs/lows
HTF trend indicator in the top-right corner
SuperSmoother MA OscillatorSuperSmoother MA Oscillator - Ehlers-Inspired Lag-Minimized Signal Framework
Overview
The SuperSmoother MA Oscillator is a crossover and momentum detection framework built on the pioneering work of John F. Ehlers, who introduced digital signal processing (DSP) concepts into technical analysis. Traditional moving averages such as SMA and EMA are prone to two persistent flaws: excessive lag, which delays recognition of trend shifts, and high-frequency noise, which produces unreliable whipsaw signals. Ehlersโ SuperSmoother filter was designed to specifically address these flaws by creating a low-pass filter with minimal lag and superior noise suppression, inspired by engineering methods used in communications and radar systems.
This oscillator extends Ehlersโ foundation by combining the SuperSmoother filter with multi-length moving average oscillation, ATR-based normalization, and dynamic color coding. The result is a tool that helps traders identify market momentum, detect reliable crossovers earlier than conventional methods, and contextualize volatility and phase shifts without being distracted by transient price noise.
Unlike conventional oscillators, which either oversimplify price structure or overload the chart with reactive signals, the SuperSmoother MA Oscillator is designed to balance responsiveness and stability. By preprocessing price data with the SuperSmoother filter, traders gain a signal framework that is clean, robust, and adaptable across assets and timeframes.
Theoretical Foundation
Traditional MA oscillators such as MACD or dual-EMA systems react to raw or lightly smoothed price inputs. While effective in some conditions, these signals are often distorted by high-frequency oscillations inherent in market data, leading to false crossovers and poor timing. The SuperSmoother approach modifies this dynamic: by attenuating unwanted frequencies, it preserves structural price movements while eliminating meaningless noise.
This is particularly useful for traders who need to distinguish between genuine market cycles and random short-term price flickers. In practical terms, the oscillator helps identify:
Early trend continuations (when fast averages break cleanly above/below slower averages).
Preemptive breakout setups (when compressed oscillator ranges expand).
Exhaustion phases (when oscillator swings flatten despite continued price movement).
Its multi-purpose design allows traders to apply it flexibly across scalping, day trading, swing setups, and longer-term trend positioning, without needing separate tools for each.
The oscillatorโs visual system - fast/slow lines, dynamic coloration, and zero-line crossovers - is structured to provide trend clarity without hiding nuance. Strong green/red momentum confirms directional conviction, while neutral gray phases emphasize uncertainty or low conviction. This ensures traders can quickly gauge the market state without losing access to subtle structural signals.
How It Works
The SuperSmoother MA Oscillator builds signals through a layered process:
SuperSmoother Filtering (Ehlersโ Method)
At its core lies Ehlersโ two-pole recursive filter, mathematically engineered to suppress high-frequency components while introducing minimal lag. Compared to traditional EMA smoothing, the SuperSmoother achieves better spectral separation - it allows meaningful cyclical market structures to pass through, while eliminating erratic spikes and aliasing. This makes it a superior preprocessing stage for oscillator inputs.
Fast and Slow Line Construction
Within the oscillator framework, the filtered price series is used to build two internal moving averages: a fast line (short-term momentum) and a slow line (longer-term directional bias). These are not plotted directly on the chart - instead, their relationship is transformed into the oscillator values you see.
The interaction between these two internal averages - crossovers, separation, and compression - forms the backbone of trend detection:
Uptrend Signal : Fast MA rises above the slow MA with expanding distance, generating a positive oscillator swing.
Downtrend Signal : Fast MA falls below the slow MA with widening divergence, producing a negative oscillator swing.
Neutral/Transition : Lines compress, flattening the oscillator near zero and often preceding volatility expansion.
This design ensures traders receive the information content of dual-MA crossovers while keeping the chart visually clean and focused on the oscillatorโs dynamics.
ATR-Based Normalization
Markets vary in volatility. To ensure the oscillator behaves consistently across assets, ATR (Average True Range) normalization scales outputs relative to prevailing volatility conditions. This prevents the oscillator from appearing overly sensitive in calm markets or too flat during high-volatility regimes.
Dynamic Color Coding
Color transitions reflect underlying market states:
Strong Green : Bullish alignment, momentum expanding.
Strong Red : Bearish alignment, momentum expanding.
These visual cues allow traders to quickly gauge trend direction and strength at a glance, with expanding colors indicating increasing conviction in the underlying momentum.
Interpretation
The oscillator offers a multi-dimensional view of price dynamics:
Trend Analysis : Fast/slow line alignment and zero-line interactions reveal trend direction and strength. Expansions indicate momentum building; contractions flag weakening conditions or potential reversals.
Momentum & Volatility : Rapid divergence between lines reflects increasing momentum. Compression highlights periods of reduced volatility and possible upcoming expansion.
Cycle Awareness : Because of Ehlersโ DSP foundation, the oscillator captures market cycles more cleanly than conventional MA systems, allowing traders to anticipate turning points before raw price action confirms them.
Divergence Detection : When oscillator momentum fades while price continues in the same direction, it signals exhaustion - a cue to tighten stops or anticipate reversals.
By focusing on filtered, volatility-adjusted signals, traders avoid overreacting to noise while gaining early access to structural changes in momentum.
Strategy Integration
The SuperSmoother MA Oscillator adapts across multiple trading approaches:
Trend Following
Enter when fast/slow alignment is strong and expanding:
A fast line crossing above the slow line with expanding green signals confirms bullish continuation.
Use ATR-normalized expansion to filter entries in line with prevailing volatility.
Breakout Trading
Periods of compression often precede breakouts:
A breakout occurs when fast lines diverge decisively from slow lines with renewed green/red strength.
Exhaustion and Reversals
Oscillator divergence signals weakening trends:
Flattening momentum while price continues trending may indicate overextension.
Traders can exit or hedge positions in anticipation of corrective phases.
Multi-Timeframe Confluence
Apply the oscillator on higher timeframes to confirm the directional bias.
Use lower timeframes for refined entries during compression โ expansion transitions.
Technical Implementation Details
SuperSmoother Algorithm (Ehlers) : Recursive two-pole filter minimizes lag while removing high-frequency noise.
Oscillator Framework : Fast/slow MAs derived from filtered prices.
ATR Normalization : Ensures consistent amplitude across market regimes.
Dynamic Color Engine : Aligns visual cues with structural states (expansion and contraction).
Multi-Factor Analysis : Combines crossover logic, volatility context, and cycle detection for robust outputs.
This layered approach ensures the oscillator is highly responsive without overloading charts with noise.
Optimal Application Parameters
Asset-Specific Guidance:
Forex : Normalize with moderate ATR scaling; focus on slow-line confirmation.
Equities : Balance responsiveness with smoothing; useful for capturing sector rotations.
Cryptocurrency : Higher ATR multipliers recommended due to volatility.
Futures/Indices : Lower frequency settings highlight structural trends.
Timeframe Optimization:
Scalping (1-5min) : Higher sensitivity, prioritize fast-line signals.
Intraday (15m-1h) : Balance between fast/slow expansions.
Swing (4h-Daily) : Focus on slow-line momentum with fast-line timing.
Position (Daily-Weekly) : Slow lines dominate; fast lines highlight cycle shifts.
Performance Characteristics
High Effectiveness:
Trending environments with moderate-to-high volatility.
Assets with steady liquidity and clear cyclical structures.
Reduced Effectiveness:
Flat/choppy conditions with little directional bias.
Ultra-short timeframes (<1m), where noise dominates.
Integration Guidelines
Confluence : Combine with liquidity zones, order blocks, and volume-based indicators for confirmation.
Risk Management : Place stops beyond slow-line thresholds or ATR-defined zones.
Dynamic Trade Management : Use expansions/contractions to scale position sizes or tighten stops.
Multi-Timeframe Confirmation : Filter lower-timeframe entries with higher-timeframe momentum states.
Disclaimer
The SuperSmoother MA Oscillator is an advanced trend and momentum analysis tool, not a guaranteed profit system. Its effectiveness depends on proper parameter settings per asset and disciplined risk management. Traders should use it as part of a broader technical framework and not in isolation.






















