CME Gap Finder - BitcoinOnly for Bitcoin!
This indicator locates weekly gaps created by the CME Futures market for Bitcoin.
As you can see, Bitcoin tends to close the weekly gaps created in the futures market so I thought this could be a very useful tool.
Instead of having to look between multiple charts, this simply overlays the past weeks open and close should a gap appear.
I hope you find this indicator useful!
Cheers!
在脚本中搜索"gaps"
Anchor ZonesL.A. Little, who wrote two books on trend trading, explained a key timing concept called anchor zones which was used, within his trading system, to enter and exit the market at appropriate times.
Anchor zones are formed from anchor bars. An anchor bar is a bar that has one or more of these components: wide range, high volume or gaps. For this script we're going to require two or more of the components. When an anchor bar forms, we'll note the high and low of the bar and draw a zone across time as prices develops. For this script, we'll also note the open and close of the candle to hint at other levels of support or resistance. The boundaries of these zones can act as support or resistance, but they also mark out the areas where price can often get trapped.
A breakout from these zones on high volume can suggest the beginning of a new trend. In general, anchor zones are a good compliment to price action strategies. For more information on how to use these, refer to L.A. Little's books.
References
onlinelibrary.wiley.com
www.tradingsetupsreview.com
Want to Learn?
If you'd like the opportunity to learn Pine but you have difficulty finding resources to guide you, take a look at this rudimentary list: docs.google.com
The list will be updated in the future as more people share the resources that have helped, or continue to help, them. Follow me on Twitter to keep up-to-date with the growing list of resources.
Suggestions or Questions?
Don't even kinda hesitate to forward them to me. My (metaphorical) door is always open.
T2-%Use a superposition of 30 avarages to stress-out trend changes (points in time where all possible frequencies that create the movment change their phase from prositive to negetive or the opposite). The indicator has one paramater that should be adjusted: 'os'.
By defult the 30 avarages that are tested range from 7 to 63 in gaps of 2. increasing the 'os' parameter moves the ranges by multiplications of 65. therefore if you add 5 indicators ontop of eachother, each scaled to left and set the os of each to another value (0,1,2,3,4) you will have a full spectum of avarages ranging from 7 to 325 in gaps of 2.
GapologyThis indicator can be used as a simple measure of price action tradability. It's an alternative to volume that focuses on the gaps between close and open candle prices. The bigger the gaps, the more spread and slippage you'll get when trading.
Hersheys Volume Pressure v2Hersheys Volume Pressure gives you very nice confirmation of trend starts and stops using volume and price.
For up bars...
If you have a large price change with low volume , that's very bullish .
If you have a small price change with low volume , that's bullish .
For down bars...
If you have a large price change with low volume , that's very bearish .
If you have a small price change with low volume , that's bearish .
Look at the chart and you'll see how trends start and end with a PINCH and widen in the middle of the moves.
You can set the moving average period, 14 is the default.
Good trading!
Brian Hershey
v2 change log...
- issue with price gaps - gaps at the open were sometimes showing incorrect colors
- scaling issues - sometimes a change is so large it scales down all nearby data and renders it hard to view. Code was added to clip those huge values.
v3 what's coming next...
- better scaling - sometimes with thinly traded stocks there is too much clipping. For now increase the chart interval to correct.
Smart Money Flow Oscillator [MarkitTick]💡This script introduces a sophisticated method for analyzing market liquidity and institutional order flow. Unlike traditional volume indicators that treat all market activity equally, the Smart Money Flow Oscillator (SMFO) employs a Logic Flow Architecture (LFA) to filter out market noise and "churn," focusing exclusively on high-impact, high-efficiency price movements. By synthesizing price action, volume, and relative efficiency, this tool aims to visualize the accumulation and distribution activities that are often attributed to "smart money" participants.
✨ Originality and Utility
Standard indicators like On-Balance Volume (OBV) or Money Flow Index (MFI) often suffer from noise because they aggregate volume based simply on the close price relative to the previous close, regardless of the quality of the move. This script differentiates itself by introducing an "Efficiency Multiplier" and a "Momentum Threshold." It only registers volume flow when a price move is considered statistically significant and structurally efficient. This creates a cleaner signal that highlights genuine supply and demand imbalances while ignoring indecisive trading ranges. It combines the trend-following nature of cumulative delta with the mean-reverting insights of an In/Out ratio, offering a dual-mode perspective on market dynamics.
🔬 Methodology
The underlying calculation of the SMFO relies on several distinct quantitative layers:
• Efficiency Analysis
The script calculates a "Relative Efficiency" ratio for every candle. This compares the current price displacement (body size) per unit of volume against the historical average.
If price moves significantly with relatively low volume, or proportional volume, it is deemed "efficient."
If significant volume occurs with little price movement (churn/absorption), the efficiency score drops.
This score is clamped between a user-defined minimum and maximum (Efficiency Cap) to prevent outliers from distorting the data.
• Momentum Thresholding
Before adding any data to the flow, the script checks if the current price change exceeds a volatility threshold derived from the previous candle's open-close range. This acts as a gatekeeper, ensuring that only "strong" moves contribute to the oscillator.
• Variable Flow Calculation
If a move passes the threshold, the script calculates the flow value by multiplying the Typical Price and Volume (Money Flow) by the calculated Efficiency Multiplier.
Bullish Flow: Strong upward movement adds to the positive delta.
Bearish Flow: Strong downward movement adds to the negative delta.
Neutral: Bars that fail the momentum threshold contribute zero flow, effectively flattening the line during consolidation.
• Calculation Modes
Cumulative Delta Flow (CDF): Sums the flow values over a rolling period. This creates a trend-following oscillator similar to OBV but smoother and more responsive to real momentum.
In/Out Ratio: Calculates the percentage of bullish inflow relative to the total absolute flow over the period. This oscillates between 0 and 100, useful for identifying overextended conditions.
📖 How to Use
Traders can utilize this oscillator to identify trend strength and potential reversals through the following signals:
• Signal Line Crossovers
The indicator plots the main Flow line (colored gradient) and a Signal line (grey).
Bullish (Green Cloud): When the Flow line crosses above the Signal line, it suggests rising buying pressure and efficient upward movement.
Bearish (Red Cloud): When the Flow line crosses below the Signal line, it suggests dominating selling pressure.
• Divergences
The script automatically detects and plots divergences between price and the oscillator:
Regular Divergence (Solid Lines): Suggests a potential trend reversal (e.g., Price makes a Lower Low while Oscillator makes a Higher Low).
Hidden Divergence (Dashed Lines): Suggests a potential trend continuation (e.g., Price makes a Higher Low while Oscillator makes a Lower Low).
"R" labels denote Regular, and "H" labels denote Hidden divergences.
• Dashboard
A dashboard table is displayed on the chart, providing real-time metrics including the current Efficiency Multiplier, Net Flow value, and the active mode status.
• In/Out Ratio Levels
When using the Ratio mode:
Values above 50 indicate net buying pressure.
Values below 50 indicate net selling pressure.
Approaching 70 or 30 can indicate overbought or oversold conditions involving volume exhaustion.
⚙️ Inputs and Settings
Calculation Mode: Choose between "Cumulative Delta Flow" (Trend focus) or "In/Out Ratio" (Oscillator focus).
Auto-Adjust Period: If enabled, automatically sets the lookback period based on the chart timeframe (e.g., 21 for Daily, 52 for Weekly).
Manual Period: The rolling lookback length for calculations if Auto-Adjust is disabled.
Efficiency Length: The period used to calculate the average body and volume for the efficiency baseline.
Eff. Min/Max Cap: Limits the impact of the efficiency multiplier to prevent extreme skewing during anomaly candles.
Momentum Threshold: A factor determining how much price must move relative to the previous candle to be considered a "strong" move.
Show Dashboard/Divergences: Toggles for visual elements.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
This indicator represents a hybrid synthesis of academic Market Microstructure theory and classical technical analysis. It utilizes an advanced algorithm to quantify "Price Impact," leveraging the following theoretical frameworks:
• 1. The Amihud Illiquidity Ratio (2002)
The core logic (calculating body / volume) functions as a dynamic implementation of Yakov Amihud’s Illiquidity Ratio. It measures price displacement per unit of volume. A high efficiency score indicates that "Smart Money" has moved the price significantly with minimal resistance, effectively highlighting liquidity gaps or institutional control.
• 2. Kyle’s Lambda (1985) & Market Depth
Drawing from Albert Kyle’s research on market microstructure, the indicator approximates Kyle's Lambda to measure the elasticity of price in response to order flow. By analyzing the "efficiency" of a move, it identifies asymmetries—specifically where price reacts disproportionately to low volume—signaling potential manipulation or specific Market Maker activity.
• 3. Wyckoff’s Law of Effort vs. Result
From a classical perspective, the algorithm codifies Richard Wyckoff’s "Effort vs. Result" logic. It acts as an oscillator that detects anomalies where "Effort" (Volume) diverges from the "Result" (Price Range), predicting potential reversals.
• 4. Quantitative Advantage: Efficiency-Weighted Volume
Unlike linear indicators such as OBV or Chaikin Money Flow—which treat all volume equally—this indicator (LFA) utilizes Efficiency-Weighted Volume. By applying the efficiency_mult factor, the algorithm filters out market noise and assigns higher weight to volume that drives structural price changes, adopting a modern quantitative approach to flow analysis.
● Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. I expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion.
Adaptive Market Wave TheoryAdaptive Market Wave Theory
🌊 CORE INNOVATION: PROBABILISTIC PHASE DETECTION WITH MULTI-AGENT CONSENSUS
Adaptive Market Wave Theory (AMWT) represents a fundamental paradigm shift in how traders approach market phase identification. Rather than counting waves subjectively or drawing static breakout levels, AMWT treats the market as a hidden state machine —using Hidden Markov Models, multi-agent consensus systems, and reinforcement learning algorithms to quantify what traditional methods leave to interpretation.
The Wave Analysis Problem:
Traditional wave counting methodologies (Elliott Wave, harmonic patterns, ABC corrections) share fatal weaknesses that AMWT directly addresses:
1. Non-Falsifiability : Invalid wave counts can always be "recounted" or "adjusted." If your Wave 3 fails, it becomes "Wave 3 of a larger degree" or "actually Wave C." There's no objective failure condition.
2. Observer Bias : Two expert wave analysts examining the same chart routinely reach different conclusions. This isn't a feature—it's a fundamental methodology flaw.
3. No Confidence Measure : Traditional analysis says "This IS Wave 3." But with what probability? 51%? 95%? The binary nature prevents proper position sizing and risk management.
4. Static Rules : Fixed Fibonacci ratios and wave guidelines cannot adapt to changing market regimes. What worked in 2019 may fail in 2024.
5. No Accountability : Wave methodologies rarely track their own performance. There's no feedback loop to improve.
The AMWT Solution:
AMWT addresses each limitation through rigorous mathematical frameworks borrowed from speech recognition, machine learning, and reinforcement learning:
• Non-Falsifiability → Hard Invalidation : Wave hypotheses die permanently when price violates calculated invalidation levels. No recounting allowed.
• Observer Bias → Multi-Agent Consensus : Three independent analytical agents must agree. Single-methodology bias is eliminated.
• No Confidence → Probabilistic States : Every market state has a calculated probability from Hidden Markov Model inference. "72% probability of impulse state" replaces "This is Wave 3."
• Static Rules → Adaptive Learning : Thompson Sampling multi-armed bandits learn which agents perform best in current conditions. The system adapts in real-time.
• No Accountability → Performance Tracking : Comprehensive statistics track every signal's outcome. The system knows its own performance.
The Core Insight:
"Traditional wave analysis asks 'What count is this?' AMWT asks 'What is the probability we are in an impulsive state, with what confidence, confirmed by how many independent methodologies, and anchored to what liquidity event?'"
🔬 THEORETICAL FOUNDATION: HIDDEN MARKOV MODELS
Why Hidden Markov Models?
Markets exist in hidden states that we cannot directly observe—only their effects on price are visible. When the market is in an "impulse up" state, we see rising prices, expanding volume, and trending indicators. But we don't observe the state itself—we infer it from observables.
This is precisely the problem Hidden Markov Models (HMMs) solve. Originally developed for speech recognition (inferring words from sound waves), HMMs excel at estimating hidden states from noisy observations.
HMM Components:
1. Hidden States (S) : The unobservable market conditions
2. Observations (O) : What we can measure (price, volume, indicators)
3. Transition Matrix (A) : Probability of moving between states
4. Emission Matrix (B) : Probability of observations given each state
5. Initial Distribution (π) : Starting state probabilities
AMWT's Six Market States:
State 0: IMPULSE_UP
• Definition: Strong bullish momentum with high participation
• Observable Signatures: Rising prices, expanding volume, RSI >60, price above upper Bollinger Band, MACD histogram positive and rising
• Typical Duration: 5-20 bars depending on timeframe
• What It Means: Institutional buying pressure, trend acceleration phase
State 1: IMPULSE_DN
• Definition: Strong bearish momentum with high participation
• Observable Signatures: Falling prices, expanding volume, RSI <40, price below lower Bollinger Band, MACD histogram negative and falling
• Typical Duration: 5-20 bars (often shorter than bullish impulses—markets fall faster)
• What It Means: Institutional selling pressure, panic or distribution acceleration
State 2: CORRECTION
• Definition: Counter-trend consolidation with declining momentum
• Observable Signatures: Sideways or mild counter-trend movement, contracting volume, RSI returning toward 50, Bollinger Bands narrowing
• Typical Duration: 8-30 bars
• What It Means: Profit-taking, digestion of prior move, potential accumulation for next leg
State 3: ACCUMULATION
• Definition: Base-building near lows where informed participants absorb supply
• Observable Signatures: Price near recent lows but not making new lows, volume spikes on up bars, RSI showing positive divergence, tight range
• Typical Duration: 15-50 bars
• What It Means: Smart money buying from weak hands, preparing for markup phase
State 4: DISTRIBUTION
• Definition: Top-forming near highs where informed participants distribute holdings
• Observable Signatures: Price near recent highs but struggling to advance, volume spikes on down bars, RSI showing negative divergence, widening range
• Typical Duration: 15-50 bars
• What It Means: Smart money selling to late buyers, preparing for markdown phase
State 5: TRANSITION
• Definition: Regime change period with mixed signals and elevated uncertainty
• Observable Signatures: Conflicting indicators, whipsaw price action, no clear momentum, high volatility without direction
• Typical Duration: 5-15 bars
• What It Means: Market deciding next direction, dangerous for directional trades
The Transition Matrix:
The transition matrix A captures the probability of moving from one state to another. AMWT initializes with empirically-derived values then updates online:
From/To IMP_UP IMP_DN CORR ACCUM DIST TRANS
IMP_UP 0.70 0.02 0.20 0.02 0.04 0.02
IMP_DN 0.02 0.70 0.20 0.04 0.02 0.02
CORR 0.15 0.15 0.50 0.10 0.10 0.00
ACCUM 0.30 0.05 0.15 0.40 0.05 0.05
DIST 0.05 0.30 0.15 0.05 0.40 0.05
TRANS 0.20 0.20 0.20 0.15 0.15 0.10
Key Insights from Transition Probabilities:
• Impulse states are sticky (70% self-transition): Once trending, markets tend to continue
• Corrections can transition to either impulse direction (15% each): The next move after correction is uncertain
• Accumulation strongly favors IMP_UP transition (30%): Base-building leads to rallies
• Distribution strongly favors IMP_DN transition (30%): Topping leads to declines
The Viterbi Algorithm:
Given a sequence of observations, how do we find the most likely state sequence? This is the Viterbi algorithm—dynamic programming to find the optimal path through the state space.
Mathematical Formulation:
δ_t(j) = max_i × B_j(O_t)
Where:
δ_t(j) = probability of most likely path ending in state j at time t
A_ij = transition probability from state i to state j
B_j(O_t) = emission probability of observation O_t given state j
AMWT Implementation:
AMWT runs Viterbi over a rolling window (default 50 bars), computing the most likely state sequence and extracting:
• Current state estimate
• State confidence (probability of current state vs alternatives)
• State sequence for pattern detection
Online Learning (Baum-Welch Adaptation):
Unlike static HMMs, AMWT continuously updates its transition and emission matrices based on observed market behavior:
f_onlineUpdateHMM(prev_state, curr_state, observation, decay) =>
// Update transition matrix
A *= decay
A += (1.0 - decay)
// Renormalize row
// Update emission matrix
B *= decay
B += (1.0 - decay)
// Renormalize row
The decay parameter (default 0.85) controls adaptation speed:
• Higher decay (0.95): Slower adaptation, more stable, better for consistent markets
• Lower decay (0.80): Faster adaptation, more reactive, better for regime changes
Why This Matters for Trading:
Traditional indicators give you a number (RSI = 72). AMWT gives you a probabilistic state assessment :
"There is a 78% probability we are in IMPULSE_UP state, with 15% probability of CORRECTION and 7% distributed among other states. The transition matrix suggests 70% chance of remaining in IMPULSE_UP next bar, 20% chance of transitioning to CORRECTION."
This enables:
• Position sizing by confidence : 90% confidence = full size; 60% confidence = half size
• Risk management by transition probability : High correction probability = tighten stops
• Strategy selection by state : IMPULSE = trend-follow; CORRECTION = wait; ACCUMULATION = scale in
🎰 THE 3-BANDIT CONSENSUS SYSTEM
The Multi-Agent Philosophy:
No single analytical methodology works in all market conditions. Trend-following excels in trending markets but gets chopped in ranges. Mean-reversion excels in ranges but gets crushed in trends. Structure-based analysis works when structure is clear but fails in chaotic markets.
AMWT's solution: employ three independent agents , each analyzing the market from a different perspective, then use Thompson Sampling to learn which agents perform best in current conditions.
Agent 1: TREND AGENT
Philosophy : Markets trend. Follow the trend until it ends.
Analytical Components:
• EMA Alignment: EMA8 > EMA21 > EMA50 (bullish) or inverse (bearish)
• MACD Histogram: Direction and rate of change
• Price Momentum: Close relative to ATR-normalized movement
• VWAP Position: Price above/below volume-weighted average price
Signal Generation:
Strong Bull: EMA aligned bull AND MACD histogram > 0 AND momentum > 0.3 AND close > VWAP
→ Signal: +1 (Long), Confidence: 0.75 + |momentum| × 0.4
Moderate Bull: EMA stack bull AND MACD rising AND momentum > 0.1
→ Signal: +1 (Long), Confidence: 0.65 + |momentum| × 0.3
Strong Bear: EMA aligned bear AND MACD histogram < 0 AND momentum < -0.3 AND close < VWAP
→ Signal: -1 (Short), Confidence: 0.75 + |momentum| × 0.4
Moderate Bear: EMA stack bear AND MACD falling AND momentum < -0.1
→ Signal: -1 (Short), Confidence: 0.65 + |momentum| × 0.3
When Trend Agent Excels:
• Trend days (IB extension >1.5x)
• Post-breakout continuation
• Institutional accumulation/distribution phases
When Trend Agent Fails:
• Range-bound markets (ADX <20)
• Chop zones after volatility spikes
• Reversal days at major levels
Agent 2: REVERSION AGENT
Philosophy: Markets revert to mean. Extreme readings reverse.
Analytical Components:
• Bollinger Band Position: Distance from bands, percent B
• RSI Extremes: Overbought (>70) and oversold (<30)
• Stochastic: %K/%D crossovers at extremes
• Band Squeeze: Bollinger Band width contraction
Signal Generation:
Oversold Bounce: BB %B < 0.20 AND RSI < 35 AND Stochastic < 25
→ Signal: +1 (Long), Confidence: 0.70 + (30 - RSI) × 0.01
Overbought Fade: BB %B > 0.80 AND RSI > 65 AND Stochastic > 75
→ Signal: -1 (Short), Confidence: 0.70 + (RSI - 70) × 0.01
Squeeze Fire Bull: Band squeeze ending AND close > upper band
→ Signal: +1 (Long), Confidence: 0.65
Squeeze Fire Bear: Band squeeze ending AND close < lower band
→ Signal: -1 (Short), Confidence: 0.65
When Reversion Agent Excels:
• Rotation days (price stays within IB)
• Range-bound consolidation
• After extended moves without pullback
When Reversion Agent Fails:
• Strong trend days (RSI can stay overbought for days)
• Breakout moves
• News-driven directional moves
Agent 3: STRUCTURE AGENT
Philosophy: Market structure reveals institutional intent. Follow the smart money.
Analytical Components:
• Break of Structure (BOS): Price breaks prior swing high/low
• Change of Character (CHOCH): First break against prevailing trend
• Higher Highs/Higher Lows: Bullish structure
• Lower Highs/Lower Lows: Bearish structure
• Liquidity Sweeps: Stop runs that reverse
Signal Generation:
BOS Bull: Price breaks above prior swing high with momentum
→ Signal: +1 (Long), Confidence: 0.70 + structure_strength × 0.2
CHOCH Bull: First higher low after downtrend, breaking structure
→ Signal: +1 (Long), Confidence: 0.75
BOS Bear: Price breaks below prior swing low with momentum
→ Signal: -1 (Short), Confidence: 0.70 + structure_strength × 0.2
CHOCH Bear: First lower high after uptrend, breaking structure
→ Signal: -1 (Short), Confidence: 0.75
Liquidity Sweep Long: Price sweeps below swing low then reverses strongly
→ Signal: +1 (Long), Confidence: 0.80
Liquidity Sweep Short: Price sweeps above swing high then reverses strongly
→ Signal: -1 (Short), Confidence: 0.80
When Structure Agent Excels:
• After liquidity grabs (stop runs)
• At major swing points
• During institutional accumulation/distribution
When Structure Agent Fails:
• Choppy, structureless markets
• During news events (structure becomes noise)
• Very low timeframes (noise overwhelms structure)
Thompson Sampling: The Bandit Algorithm
With three agents giving potentially different signals, how do we decide which to trust? This is the multi-armed bandit problem —balancing exploitation (using what works) with exploration (testing alternatives).
Thompson Sampling Solution:
Each agent maintains a Beta distribution representing its success/failure history:
Agent success rate modeled as Beta(α, β)
Where:
α = number of successful signals + 1
β = number of failed signals + 1
On Each Bar:
1. Sample from each agent's Beta distribution
2. Weight agent signals by sampled probabilities
3. Combine weighted signals into consensus
4. Update α/β based on trade outcomes
Mathematical Implementation:
// Beta sampling via Gamma ratio method
f_beta_sample(alpha, beta) =>
g1 = f_gamma_sample(alpha)
g2 = f_gamma_sample(beta)
g1 / (g1 + g2)
// Thompson Sampling selection
for each agent:
sampled_prob = f_beta_sample(agent.alpha, agent.beta)
weight = sampled_prob / sum(all_sampled_probs)
consensus += agent.signal × agent.confidence × weight
Why Thompson Sampling?
• Automatic Exploration : Agents with few samples get occasional chances (high variance in Beta distribution)
• Bayesian Optimal : Mathematically proven optimal solution to exploration-exploitation tradeoff
• Uncertainty-Aware : Small sample size = more exploration; large sample size = more exploitation
• Self-Correcting : Poor performers naturally get lower weights over time
Example Evolution:
Day 1 (Initial):
Trend Agent: Beta(1,1) → samples ~0.50 (high uncertainty)
Reversion Agent: Beta(1,1) → samples ~0.50 (high uncertainty)
Structure Agent: Beta(1,1) → samples ~0.50 (high uncertainty)
After 50 Signals:
Trend Agent: Beta(28,23) → samples ~0.55 (moderate confidence)
Reversion Agent: Beta(18,33) → samples ~0.35 (underperforming)
Structure Agent: Beta(32,19) → samples ~0.63 (outperforming)
Result: Structure Agent now receives highest weight in consensus
Consensus Requirements by Mode:
Aggressive Mode:
• Minimum 1/3 agents agreeing
• Consensus threshold: 45%
• Use case: More signals, higher risk tolerance
Balanced Mode:
• Minimum 2/3 agents agreeing
• Consensus threshold: 55%
• Use case: Standard trading
Conservative Mode:
• Minimum 2/3 agents agreeing
• Consensus threshold: 65%
• Use case: Higher quality, fewer signals
Institutional Mode:
• Minimum 2/3 agents agreeing
• Consensus threshold: 75%
• Additional: Session quality >0.65, mode adjustment +0.10
• Use case: Highest quality signals only
🌀 INTELLIGENT CHOP DETECTION ENGINE
The Chop Problem:
Most trading losses occur not from being wrong about direction, but from trading in conditions where direction doesn't exist . Choppy, range-bound markets generate false signals from every methodology—trend-following, mean-reversion, and structure-based alike.
AMWT's chop detection engine identifies these low-probability environments before signals fire, preventing the most damaging trades.
Five-Factor Chop Analysis:
Factor 1: ADX Component (25% weight)
ADX (Average Directional Index) measures trend strength regardless of direction.
ADX < 15: Very weak trend (high chop score)
ADX 15-20: Weak trend (moderate chop score)
ADX 20-25: Developing trend (low chop score)
ADX > 25: Strong trend (minimal chop score)
adx_chop = (i_adxThreshold - adx_val) / i_adxThreshold × 100
Why ADX Works: ADX synthesizes +DI and -DI movements. Low ADX means price is moving but not directionally—the definition of chop.
Factor 2: Choppiness Index (25% weight)
The Choppiness Index measures price efficiency using the ratio of ATR sum to price range:
CI = 100 × LOG10(SUM(ATR, n) / (Highest - Lowest)) / LOG10(n)
CI > 61.8: Choppy (range-bound, inefficient movement)
CI < 38.2: Trending (directional, efficient movement)
CI 38.2-61.8: Transitional
chop_idx_score = (ci_val - 38.2) / (61.8 - 38.2) × 100
Why Choppiness Index Works: In trending markets, price covers distance efficiently (low ATR sum relative to range). In choppy markets, price oscillates wildly but goes nowhere (high ATR sum relative to range).
Factor 3: Range Compression (20% weight)
Compares recent range to longer-term range, detecting volatility squeezes:
recent_range = Highest(20) - Lowest(20)
longer_range = Highest(50) - Lowest(50)
compression = 1 - (recent_range / longer_range)
compression > 0.5: Strong squeeze (potential breakout imminent)
compression < 0.2: No compression (normal volatility)
range_compression_score = compression × 100
Why Range Compression Matters: Compression precedes expansion. High compression = market coiling, preparing for move. Signals during compression often fail because the breakout hasn't occurred yet.
Factor 4: Channel Position (15% weight)
Tracks price position within the macro channel:
channel_position = (close - channel_low) / (channel_high - channel_low)
position 0.4-0.6: Center of channel (indecision zone)
position <0.2 or >0.8: Near extremes (potential reversal or breakout)
channel_chop = abs(0.5 - channel_position) < 0.15 ? high_score : low_score
Why Channel Position Matters: Price in the middle of a range is in "no man's land"—equally likely to go either direction. Signals in the channel center have lower probability.
Factor 5: Volume Quality (15% weight)
Assesses volume relative to average:
vol_ratio = volume / SMA(volume, 20)
vol_ratio < 0.7: Low volume (lack of conviction)
vol_ratio 0.7-1.3: Normal volume
vol_ratio > 1.3: High volume (conviction present)
volume_chop = vol_ratio < 0.8 ? (1 - vol_ratio) × 100 : 0
Why Volume Quality Matters: Low volume moves lack institutional participation. These moves are more likely to reverse or stall.
Combined Chop Intensity:
chopIntensity = (adx_chop × 0.25) + (chop_idx_score × 0.25) +
(range_compression_score × 0.20) + (channel_chop × 0.15) +
(volume_chop × i_volumeChopWeight × 0.15)
Regime Classifications:
Based on chop intensity and component analysis:
• Strong Trend (0-20%): ADX >30, clear directional momentum, trade aggressively
• Trending (20-35%): ADX >20, moderate directional bias, trade normally
• Transitioning (35-50%): Mixed signals, regime change possible, reduce size
• Mid-Range (50-60%): Price trapped in channel center, avoid new positions
• Ranging (60-70%): Low ADX, price oscillating within bounds, fade extremes only
• Compression (70-80%): Volatility squeeze, expansion imminent, wait for breakout
• Strong Chop (80-100%): Multiple chop factors aligned, avoid trading entirely
Signal Suppression:
When chop intensity exceeds the configurable threshold (default 80%), signals are suppressed entirely. The dashboard displays "⚠️ CHOP ZONE" with the current regime classification.
Chop Box Visualization:
When chop is detected, AMWT draws a semi-transparent box on the chart showing the chop zone. This visual reminder helps traders avoid entering positions during unfavorable conditions.
💧 LIQUIDITY ANCHORING SYSTEM
The Liquidity Concept:
Markets move from liquidity pool to liquidity pool. Stop losses cluster at predictable locations—below swing lows (buy stops become sell orders when triggered) and above swing highs (sell stops become buy orders when triggered). Institutions know where these clusters are and often engineer moves to trigger them before reversing.
AMWT identifies and tracks these liquidity events, using them as anchors for signal confidence.
Liquidity Event Types:
Type 1: Volume Spikes
Definition: Volume > SMA(volume, 20) × i_volThreshold (default 2.8x)
Interpretation: Sudden volume surge indicates institutional activity
• Near swing low + reversal: Likely accumulation
• Near swing high + reversal: Likely distribution
• With continuation: Institutional conviction in direction
Type 2: Stop Runs (Liquidity Sweeps)
Definition: Price briefly exceeds swing high/low then reverses within N bars
Detection:
• Price breaks above recent swing high (triggering buy stops)
• Then closes back below that high within 3 bars
• Signal: Bullish stop run complete, reversal likely
Or inverse for bearish:
• Price breaks below recent swing low (triggering sell stops)
• Then closes back above that low within 3 bars
• Signal: Bearish stop run complete, reversal likely
Type 3: Absorption Events
Definition: High volume with small candle body
Detection:
• Volume > 2x average
• Candle body < 30% of candle range
• Interpretation: Large orders being filled without moving price
• Implication: Accumulation (at lows) or distribution (at highs)
Type 4: BSL/SSL Pools (Buy-Side/Sell-Side Liquidity)
BSL (Buy-Side Liquidity):
• Cluster of swing highs within ATR proximity
• Stop losses from shorts sit above these highs
• Breaking BSL triggers short covering (fuel for rally)
SSL (Sell-Side Liquidity):
• Cluster of swing lows within ATR proximity
• Stop losses from longs sit below these lows
• Breaking SSL triggers long liquidation (fuel for decline)
Liquidity Pool Mapping:
AMWT continuously scans for and maps liquidity pools:
// Detect swing highs/lows using pivot function
swing_high = ta.pivothigh(high, 5, 5)
swing_low = ta.pivotlow(low, 5, 5)
// Track recent swing points
if not na(swing_high)
bsl_levels.push(swing_high)
if not na(swing_low)
ssl_levels.push(swing_low)
// Display on chart with labels
Confluence Scoring Integration:
When signals fire near identified liquidity events, confluence scoring increases:
• Signal near volume spike: +10% confidence
• Signal after liquidity sweep: +15% confidence
• Signal at BSL/SSL pool: +10% confidence
• Signal aligned with absorption zone: +10% confidence
Why Liquidity Anchoring Matters:
Signals "in a vacuum" have lower probability than signals anchored to institutional activity. A long signal after a liquidity sweep below swing lows has trapped shorts providing fuel. A long signal in the middle of nowhere has no such catalyst.
📊 SIGNAL GRADING SYSTEM
The Quality Problem:
Not all signals are created equal. A signal with 6/6 factors aligned is fundamentally different from a signal with 3/6 factors aligned. Traditional indicators treat them the same. AMWT grades every signal based on confluence.
Confluence Components (100 points total):
1. Bandit Consensus Strength (25 points)
consensus_str = weighted average of agent confidences
score = consensus_str × 25
Example:
Trend Agent: +1 signal, 0.80 confidence, 0.35 weight
Reversion Agent: 0 signal, 0.50 confidence, 0.25 weight
Structure Agent: +1 signal, 0.75 confidence, 0.40 weight
Weighted consensus = (0.80×0.35 + 0×0.25 + 0.75×0.40) / (0.35 + 0.40) = 0.77
Score = 0.77 × 25 = 19.25 points
2. HMM State Confidence (15 points)
score = hmm_confidence × 15
Example:
HMM reports 82% probability of IMPULSE_UP
Score = 0.82 × 15 = 12.3 points
3. Session Quality (15 points)
Session quality varies by time:
• London/NY Overlap: 1.0 (15 points)
• New York Session: 0.95 (14.25 points)
• London Session: 0.70 (10.5 points)
• Asian Session: 0.40 (6 points)
• Off-Hours: 0.30 (4.5 points)
• Weekend: 0.10 (1.5 points)
4. Energy/Participation (10 points)
energy = (realized_vol / avg_vol) × 0.4 + (range / ATR) × 0.35 + (volume / avg_volume) × 0.25
score = min(energy, 1.0) × 10
5. Volume Confirmation (10 points)
if volume > SMA(volume, 20) × 1.5:
score = 10
else if volume > SMA(volume, 20):
score = 5
else:
score = 0
6. Structure Alignment (10 points)
For long signals:
• Bullish structure (HH + HL): 10 points
• Higher low only: 6 points
• Neutral structure: 3 points
• Bearish structure: 0 points
Inverse for short signals
7. Trend Alignment (10 points)
For long signals:
• Price > EMA21 > EMA50: 10 points
• Price > EMA21: 6 points
• Neutral: 3 points
• Against trend: 0 points
8. Entry Trigger Quality (5 points)
• Strong trigger (multiple confirmations): 5 points
• Moderate trigger (single confirmation): 3 points
• Weak trigger (marginal): 1 point
Grade Scale:
Total Score → Grade
85-100 → A+ (Exceptional—all factors aligned)
70-84 → A (Strong—high probability)
55-69 → B (Acceptable—proceed with caution)
Below 55 → C (Marginal—filtered by default)
Grade-Based Signal Brightness:
Signal arrows on the chart have transparency based on grade:
• A+: Full brightness (alpha = 0)
• A: Slight fade (alpha = 15)
• B: Moderate fade (alpha = 35)
• C: Significant fade (alpha = 55)
This visual hierarchy helps traders instantly identify signal quality.
Minimum Grade Filter:
Configurable filter (default: C) sets the minimum grade for signal display:
• Set to "A" for only highest-quality signals
• Set to "B" for moderate selectivity
• Set to "C" for all signals (maximum quantity)
🕐 SESSION INTELLIGENCE
Why Sessions Matter:
Markets behave differently at different times. The London open is fundamentally different from the Asian lunch hour. AMWT incorporates session-aware logic to optimize signal quality.
Session Definitions:
Asian Session (18:00-03:00 ET)
• Characteristics: Lower volatility, range-bound tendency, fewer institutional participants
• Quality Score: 0.40 (40% of peak quality)
• Strategy Implications: Fade extremes, expect ranges, smaller position sizes
• Best For: Mean-reversion setups, accumulation/distribution identification
London Session (03:00-12:00 ET)
• Characteristics: European institutional activity, volatility pickup, trend initiation
• Quality Score: 0.70 (70% of peak quality)
• Strategy Implications: Watch for trend development, breakouts more reliable
• Best For: Initial trend identification, structure breaks
New York Session (08:00-17:00 ET)
• Characteristics: Highest liquidity, US institutional activity, major moves
• Quality Score: 0.95 (95% of peak quality)
• Strategy Implications: Best environment for directional trades
• Best For: Trend continuation, momentum plays
London/NY Overlap (08:00-12:00 ET)
• Characteristics: Peak liquidity, both European and US participants active
• Quality Score: 1.0 (100%—maximum quality)
• Strategy Implications: Highest probability for successful breakouts and trends
• Best For: All signal types—this is prime time
Off-Hours
• Characteristics: Thin liquidity, erratic price action, gaps possible
• Quality Score: 0.30 (30% of peak quality)
• Strategy Implications: Avoid new positions, wider stops if holding
• Best For: Waiting
Smart Weekend Detection:
AMWT properly handles the Sunday evening futures open:
// Traditional (broken):
isWeekend = dayofweek == saturday OR dayofweek == sunday
// AMWT (correct):
anySessionActive = not na(asianTime) or not na(londonTime) or not na(nyTime)
isWeekend = calendarWeekend AND NOT anySessionActive
This ensures Sunday 6pm ET (when futures open) correctly shows "Asian Session" rather than "Weekend."
Session Transition Boosts:
Certain session transitions create trading opportunities:
• Asian → London transition: +15% confidence boost (volatility expansion likely)
• London → Overlap transition: +20% confidence boost (peak liquidity approaching)
• Overlap → NY-only transition: -10% confidence adjustment (liquidity declining)
• Any → Off-Hours transition: Signal suppression recommended
📈 TRADE MANAGEMENT SYSTEM
The Signal Spam Problem:
Many indicators generate signal after signal, creating confusion and overtrading. AMWT implements a complete trade lifecycle management system that prevents signal spam and tracks performance.
Trade Lock Mechanism:
Once a signal fires, the system enters a "trade lock" state:
Trade Lock Duration: Configurable (default 30 bars)
Early Exit Conditions:
• TP3 hit (full target reached)
• Stop Loss hit (trade failed)
• Lock expiration (time-based exit)
During lock:
• No new signals of same type displayed
• Opposite signals can override (reversal)
• Trade status tracked in dashboard
Target Levels:
Each signal generates three profit targets based on ATR:
TP1 (Conservative Target)
• Default: 1.0 × ATR
• Purpose: Quick partial profit, reduce risk
• Action: Take 30-40% off position, move stop to breakeven
TP2 (Standard Target)
• Default: 2.5 × ATR
• Purpose: Main profit target
• Action: Take 40-50% off position, trail stop
TP3 (Extended Target)
• Default: 5.0 × ATR
• Purpose: Runner target for trend days
• Action: Close remaining position or continue trailing
Stop Loss:
• Default: 1.9 × ATR from entry
• Purpose: Define maximum risk
• Placement: Below recent swing low (longs) or above recent swing high (shorts)
Invalidation Level:
Beyond stop loss, AMWT calculates an "invalidation" level where the wave hypothesis dies:
invalidation = entry - (ATR × INVALIDATION_MULT × 1.5)
If price reaches invalidation, the current market interpretation is wrong—not just the trade.
Visual Trade Management:
During active trades, AMWT displays:
• Entry arrow with grade label (▲A+, ▼B, etc.)
• TP1, TP2, TP3 horizontal lines in green
• Stop Loss line in red
• Invalidation line in orange (dashed)
• Progress indicator in dashboard
Persistent Execution Markers:
When targets or stops are hit, permanent markers appear:
• TP hit: Green dot with "TP1"/"TP2"/"TP3" label
• SL hit: Red dot with "SL" label
These persist on the chart for review and statistics.
💰 PERFORMANCE TRACKING & STATISTICS
Tracked Metrics:
• Total Trades: Count of all signals that entered trade lock
• Winning Trades: Signals where at least TP1 was reached before SL
• Losing Trades: Signals where SL was hit before any TP
• Win Rate: Winning / Total × 100%
• Total R Profit: Sum of R-multiples from winning trades
• Total R Loss: Sum of R-multiples from losing trades
• Net R: Total R Profit - Total R Loss
Currency Conversion System:
AMWT can display P&L in multiple formats:
R-Multiple (Default)
• Shows risk-normalized returns
• "Net P&L: +4.2R | 78 trades" means 4.2 times initial risk gained over 78 trades
• Best for comparing across different position sizes
Currency Conversion (USD/EUR/GBP/JPY/INR)
• Converts R-multiples to currency based on:
- Dollar Risk Per Trade (user input)
- Tick Value (user input)
- Selected currency
Example Configuration:
Dollar Risk Per Trade: $100
Display Currency: USD
If Net R = +4.2R
Display: Net P&L: +$420.00 | 78 trades
Ticks
• For futures traders who think in ticks
• Converts based on tick value input
Statistics Reset:
Two reset methods:
1. Toggle Reset
• Turn "Reset Statistics" toggle ON then OFF
• Clears all statistics immediately
2. Date-Based Reset
• Set "Reset After Date" (YYYY-MM-DD format)
• Only trades after this date are counted
• Useful for isolating recent performance
🎨 VISUAL FEATURES
Macro Channel:
Dynamic regression-based channel showing market boundaries:
• Upper/lower bounds calculated from swing pivot linear regression
• Adapts to current market structure
• Shows overall trend direction and potential reversal zones
Chop Boxes:
Semi-transparent overlay during high-chop periods:
• Purple/orange coloring indicates dangerous conditions
• Visual reminder to avoid new positions
Confluence Heat Zones:
Background shading indicating setup quality:
• Darker shading = higher confluence
• Lighter shading = lower confluence
• Helps identify optimal entry timing
EMA Ribbon:
Trend visualization via moving average fill:
• EMA 8/21/50 with gradient fill between
• Green fill when bullish aligned
• Red fill when bearish aligned
• Gray when neutral
Absorption Zone Boxes:
Marks potential accumulation/distribution areas:
• High volume + small body = absorption
• Boxes drawn at these levels
• Often act as support/resistance
Liquidity Pool Lines:
BSL/SSL levels with labels:
• Dashed lines at liquidity clusters
• "BSL" label above swing high clusters
• "SSL" label below swing low clusters
Six Professional Themes:
• Quantum: Deep purples and cyans (default)
• Cyberpunk: Neon pinks and blues
• Professional: Muted grays and greens
• Ocean: Blues and teals
• Matrix: Greens and blacks
• Ember: Oranges and reds
🎓 PROFESSIONAL USAGE PROTOCOL
Phase 1: Learning the System (Week 1)
Goal: Understand AMWT concepts and dashboard interpretation
Setup:
• Signal Mode: Balanced
• Display: All features enabled
• Grade Filter: C (see all signals)
Actions:
• Paper trade ONLY—no real money
• Observe HMM state transitions throughout the day
• Note when agents agree vs disagree
• Watch chop detection engage and disengage
• Track which grades produce winners vs losers
Key Learning Questions:
• How often do A+ signals win vs B signals? (Should see clear difference)
• Which agent tends to be right in current market? (Check dashboard)
• When does chop detection save you from bad trades?
• How do signals near liquidity events perform vs signals in vacuum?
Phase 2: Parameter Optimization (Week 2)
Goal: Tune system to your instrument and timeframe
Signal Mode Testing:
• Run 5 days on Aggressive mode (more signals)
• Run 5 days on Conservative mode (fewer signals)
• Compare: Which produces better risk-adjusted returns?
Grade Filter Testing:
• Track A+ only for 20 signals
• Track A and above for 20 signals
• Track B and above for 20 signals
• Compare win rates and expectancy
Chop Threshold Testing:
• Default (80%): Standard filtering
• Try 70%: More aggressive filtering
• Try 90%: Less filtering
• Which produces best results for your instrument?
Phase 3: Strategy Development (Weeks 3-4)
Goal: Develop personal trading rules based on system signals
Position Sizing by Grade:
• A+ grade: 100% position size
• A grade: 75% position size
• B grade: 50% position size
• C grade: 25% position size (or skip)
Session-Based Rules:
• London/NY Overlap: Take all A/A+ signals
• NY Session: Take all A+ signals, selective on A
• Asian Session: Only A+ signals with extra confirmation
• Off-Hours: No new positions
Chop Zone Rules:
• Chop >70%: Reduce position size 50%
• Chop >80%: No new positions
• Chop <50%: Full position size allowed
Phase 4: Live Micro-Sizing (Month 2)
Goal: Validate paper trading results with minimal risk
Setup:
• 10-20% of intended full position size
• Take ONLY A+ signals initially
• Follow trade management religiously
Tracking:
• Log every trade: Entry, Exit, Grade, HMM State, Chop Level, Agent Consensus
• Calculate: Win rate by grade, by session, by chop level
• Compare to paper trading (should be within 15%)
Red Flags:
• Win rate diverges significantly from paper trading: Execution issues
• Consistent losses during certain sessions: Adjust session rules
• Losses cluster when specific agent dominates: Review that agent's logic
Phase 5: Scaling Up (Months 3-6)
Goal: Gradually increase to full position size
Progression:
• Month 3: 25-40% size (if micro-sizing profitable)
• Month 4: 40-60% size
• Month 5: 60-80% size
• Month 6: 80-100% size
Scale-Up Requirements:
• Minimum 30 trades at current size
• Win rate ≥50%
• Net R positive
• No revenge trading incidents
• Emotional control maintained
💡 DEVELOPMENT INSIGHTS
Why HMM Over Simple Indicators:
Early versions used standard indicators (RSI >70 = overbought, etc.). Win rates hovered at 52-55%. The problem: indicators don't capture state. RSI can stay "overbought" for weeks in a strong trend.
The insight: markets exist in states, and state persistence matters more than indicator levels. Implementing HMM with state transition probabilities increased signal quality significantly. The system now knows not just "RSI is high" but "we're in IMPULSE_UP state with 70% probability of staying in IMPULSE_UP."
The Multi-Agent Evolution:
Original version used a single analytical methodology—trend-following. Performance was inconsistent: great in trends, destroyed in ranges. Added mean-reversion agent: now it was inconsistent the other way.
The breakthrough: use multiple agents and let the system learn which works . Thompson Sampling wasn't the first attempt—tried simple averaging, voting, even hard-coded regime switching. Thompson Sampling won because it's mathematically optimal and automatically adapts without manual regime detection.
Chop Detection Revelation:
Chop detection was added almost as an afterthought. "Let's filter out obviously bad conditions." Testing revealed it was the most impactful single feature. Filtering chop zones reduced losing trades by 35% while only reducing total signals by 20%. The insight: avoiding bad trades matters more than finding good ones.
Liquidity Anchoring Discovery:
Watched hundreds of trades. Noticed pattern: signals that fired after liquidity events (stop runs, volume spikes) had significantly higher win rates than signals in quiet markets. Implemented liquidity detection and anchoring. Win rate on liquidity-anchored signals: 68% vs 52% on non-anchored signals.
The Grade System Impact:
Early system had binary signals (fire or don't fire). Adding grading transformed it. Traders could finally match position size to signal quality. A+ signals deserved full size; C signals deserved caution. Just implementing grade-based sizing improved portfolio Sharpe ratio by 0.3.
🚨 LIMITATIONS & CRITICAL ASSUMPTIONS
What AMWT Is NOT:
• NOT a Holy Grail : No system wins every trade. AMWT improves probability, not certainty.
• NOT Fully Automated : AMWT provides signals and analysis; execution requires human judgment.
• NOT News-Proof : Exogenous shocks (FOMC surprises, geopolitical events) invalidate all technical analysis.
• NOT for Scalping : HMM state estimation needs time to develop. Sub-minute timeframes are not appropriate.
Core Assumptions:
1. Markets Have States : Assumes markets transition between identifiable regimes. Violation: Random walk markets with no regime structure.
2. States Are Inferable : Assumes observable indicators reveal hidden states. Violation: Market manipulation creating false signals.
3. History Informs Future : Assumes past agent performance predicts future performance. Violation: Regime changes that invalidate historical patterns.
4. Liquidity Events Matter : Assumes institutional activity creates predictable patterns. Violation: Markets with no institutional participation.
Performs Best On:
• Liquid Futures : ES, NQ, MNQ, MES, CL, GC
• Major Forex Pairs : EUR/USD, GBP/USD, USD/JPY
• Large-Cap Stocks : AAPL, MSFT, TSLA, NVDA (>$5B market cap)
• Liquid Crypto : BTC, ETH on major exchanges
Performs Poorly On:
• Illiquid Instruments : Low volume stocks, exotic pairs
• Very Low Timeframes : Sub-5-minute charts (noise overwhelms signal)
• Binary Event Days : Earnings, FDA approvals, court rulings
• Manipulated Markets : Penny stocks, low-cap altcoins
Known Weaknesses:
• Warmup Period : HMM needs ~50 bars to initialize properly. Early signals may be unreliable.
• Regime Change Lag : Thompson Sampling adapts over time, not instantly. Sudden regime changes may cause short-term underperformance.
• Complexity : More parameters than simple indicators. Requires understanding to use effectively.
⚠️ RISK DISCLOSURE
Trading futures, stocks, options, forex, and cryptocurrencies involves substantial risk of loss and is not suitable for all investors. Adaptive Market Wave Theory, while based on rigorous mathematical frameworks including Hidden Markov Models and multi-armed bandit algorithms, does not guarantee profits and can result in significant losses.
AMWT's methodologies—HMM state estimation, Thompson Sampling agent selection, and confluence-based grading—have theoretical foundations but past performance is not indicative of future results.
Hidden Markov Model assumptions may not hold during:
• Major news events disrupting normal market behavior
• Flash crashes or circuit breaker events
• Low liquidity periods with erratic price action
• Algorithmic manipulation or spoofing
Multi-agent consensus assumes independent analytical perspectives provide edge. Market conditions change. Edges that existed historically can diminish or disappear.
Users must independently validate system performance on their specific instruments, timeframes, and broker execution environment. Paper trade extensively before risking capital. Start with micro position sizing.
Never risk more than you can afford to lose completely. Use proper position sizing. Implement stop losses without exception.
By using this indicator, you acknowledge these risks and accept full responsibility for all trading decisions and outcomes.
"Elliott Wave was a first-order approximation of market phase behavior. AMWT is the second—probabilistic, adaptive, and accountable."
Initial Public Release
Core Engine:
• True Hidden Markov Model with online Baum-Welch learning
• Viterbi algorithm for optimal state sequence decoding
• 6-state market regime classification
Agent System:
• 3-Bandit consensus (Trend, Reversion, Structure)
• Thompson Sampling with true Beta distribution sampling
• Adaptive weight learning based on performance
Signal Generation:
• Quality-based confluence grading (A+/A/B/C)
• Four signal modes (Aggressive/Balanced/Conservative/Institutional)
• Grade-based visual brightness
Chop Detection:
• 5-factor analysis (ADX, Choppiness Index, Range Compression, Channel Position, Volume)
• 7 regime classifications
• Configurable signal suppression threshold
Liquidity:
• Volume spike detection
• Stop run (liquidity sweep) identification
• BSL/SSL pool mapping
• Absorption zone detection
Trade Management:
• Trade lock with configurable duration
• TP1/TP2/TP3 targets
• ATR-based stop loss
• Persistent execution markers
Session Intelligence:
• Asian/London/NY/Overlap detection
• Smart weekend handling (Sunday futures open)
• Session quality scoring
Performance:
• Statistics tracking with reset functionality
• 7 currency display modes
• Win rate and Net R calculation
Visuals:
• Macro channel with linear regression
• Chop boxes
• EMA ribbon
• Liquidity pool lines
• 6 professional themes
Dashboards:
• Main Dashboard: Market State, Consensus, Trade Status, Statistics
📋 AMWT vs AMWT-PRO:
This version includes all core AMWT functionality:
✓ Full Hidden Markov Model state estimation
✓ 3-Bandit Thompson Sampling consensus system
✓ Complete 5-factor chop detection engine
✓ All four signal modes
✓ Full trade management with TP/SL tracking
✓ Main dashboard with complete statistics
✓ All visual features (channels, zones, pools)
✓ Identical signal generation to PRO
✓ Six professional themes
✓ Full alert system
The PRO version adds the AMWT Advisor panel—a secondary dashboard providing:
• Real-time Market Pulse situation assessment
• Agent Matrix visualization (individual agent votes)
• Structure analysis breakdown
• "Watch For" upcoming setups
• Action Command coaching
Both versions generate identical signals . The Advisor provides additional guidance for interpreting those signals.
Taking you to school. - Dskyz, Trade with probability. Trade with consensus. Trade with AMWT.
[ST] Killzones - Minimal Killzones — Minimal
User Manual
1. Purpose of the Indicator
Killzones — Minimal is a session-based market structure tool designed to highlight the highest-liquidity time windows of the trading day.
Instead of generating signals, this indicator provides context by visually marking the ICT Killzones, allowing the trader to:
Identify where liquidity is built
See which session created the range
Anticipate where liquidity is likely to be taken
Align SMC / Wyckoff / Order Flow analysis with time-based institutional behavior
This tool is especially effective for Crypto, Forex, and Indices, where markets run continuously and liquidity cycles matter more than exchange open times.
2. Killzones Covered (São Paulo Time – UTC-3)
The indicator draws one minimal, dotted box per session:
Session Time (SP) Role in Market Structure
ASIA 21:00 – 03:00 Range formation & liquidity buildup
LONDON 04:00 – 07:00 First liquidity raid & manipulation
NEW YORK (Killzone) 10:00 – 13:00 True displacement & delivery
These are ICT Killzones, not official stock exchange open times.
3. Visual Design Philosophy
The indicator is intentionally minimalist:
Dotted borders → no visual clutter
Optional fill → focus on structure, not noise
No signals or arrows → forces contextual reading
One box per session → clean session boundaries
The goal is to let price action and liquidity tell the story, not indicators.
4. How the Boxes Behave
Each session box:
Starts on the first candle of the session
Expands dynamically to include the session High and Low
Stops updating once the session ends
Remains fixed on the chart as historical context
This allows you to instantly see:
Which session created the current range
Where stop-loss clusters are likely resting
Which session was manipulated or delivered price
5. How to Use the Indicator (Practical Workflow)
Step 1 — Identify the Current Session
Ask:
Are we inside Asia, London, or New York?
Your expectations should change depending on the session.
Step 2 — Read Session Intent
ASIA
Expect compression and balance
Focus on identifying Asia High / Asia Low
Avoid aggressive trades inside the range
LONDON
Look for liquidity raids on Asia High/Low
Many London moves are manipulative
A failed raid is often a setup for NY
NEW YORK
Look for true displacement
High probability of:
Continuation
Reversal after a sweep
Best session to execute trades
Step 3 — Trade Liquidity, Not Candles
Use the boxes as liquidity maps, not entries.
High-probability ideas come from:
Asia range being swept during London
London manipulation being reversed during NY
NY taking remaining liquidity and delivering direction
6. Example Use Cases
Setup 1 — Asia Range Sweep
Asia forms a tight range
London sweeps Asia High or Low
Price fails to continue
Market shifts structure
Entry on OB / FVG toward the opposite side
Setup 2 — London Manipulation → NY Delivery
London sweeps liquidity but stalls
New York opens
NY takes the opposite side liquidity
Strong displacement occurs
Entry on NY pullback
Setup 3 — Session Breakout
No sweep
Immediate strong displacement
Clean continuation
Trade only after confirmation
7. What NOT to Do
Do not trade inside the middle of session boxes
Do not assume every sweep means reversal
Do not force trades without structure shift
Do not treat sessions as signals
The indicator shows where to pay attention, not when to click Buy or Sell.
8. Best Confluence Tools
This indicator works best when combined with:
Market Structure (BOS / CHoCH)
Order Blocks
Fair Value Gaps
Liquidity pools
Volume-based candle analysis (e.g. CandleFlow)
9. Final Notes
Killzones — Minimal is a contextual framework, not a strategy.
If you wait for:
Liquidity to be taken
Structure to shift
Price to confirm intent
You will trade with the market narrative, not against it.
Time reveals intent. Liquidity confirms it.
Market Structure [odnac]Overview
This indicator is a comprehensive tool designed for traders utilizing Smart Money Concepts (SMC) and Price Action. It automatically identifies and labels significant market structure shifts, specifically BOS (Break of Structure) and CHoCH (Change of Character), helping you stay on the right side of the trend.
Key Features
Dual Logic Modes (V1 & V2):
V1 (Fixed Pivot): Only utilizes confirmed pivot points. Ideal for conservative traders looking for major swing levels.
V2 (Dynamic Update): Automatically updates swing points to the actual highest high or lowest low between breaks. This provides a more fluid and accurate representation of price flow.
Smart Confirmation: Unlike basic pivot scripts, this indicator uses a multi-bar confirmation logic (checking candle polarity and close sequences) to filter out market noise and false pivots.
Automatic Trend Detection: The indicator tracks the current market bias (Bullish/Bearish) and visualizes it through customizable background colors or shapes.
Clear Visual Cues: * BOS: Indicates a continuation of the current trend.
CHoCH: Signals a potential trend reversal.
How to Use
Identify Trend Direction: Use the background coloring or the shapes at the bottom to quickly identify if the market is in a Bullish (Green) or Bearish (Red) phase.
Look for Structure Breaks: * When price breaks a previous high/low, the indicator will draw a line and label it as BOS if the trend continues, or CHoCH if the trend flips.
Customize for Your Assets: * For volatile assets like XLM or other cryptocurrencies, you can adjust the Swing Left/Right Bars inputs to filter for either micro-structures or macro-trends.
Input Settings
Version: Choose between V1 (Strict Pivots) and V2 (Dynamic Ranges).
Swing Left/Right Bars: Determines the sensitivity of high/low detection. Increase these values to find "stronger" structural points.
Trend Visualization: Toggle between Background fills, Shape markers at the bottom, or None for a cleaner look.
Show Swings: Toggle the visibility of the white circles marking confirmed pivot points.
Disclaimer
Market structure is a lagging indicator by nature as it requires confirmation. Always use this tool in conjunction with other technical analysis methods (Order Blocks, Fair Value Gaps, or Volume) for the best results.
Volume-Weighted Hybrid Channel [Capitalize Labs]Volume-Weighted Hybrid Channel (VWHC) is a channel-only indicator designed to visualise mean and volatility structure using a blended framework. It combines a configurable mean engine (SuperSmoother, EMA, SMA, or RMA) with an anchored VWAP component, then builds a four-level band ladder around a hybrid mean using a hybrid width that blends a range engine (ATR or true range variants) with anchored, volume-weighted standard deviation. The result is a smooth, adaptive channel intended to help us contextualise price location and volatility expansion or contraction relative to the hybrid mean.
The indicator supports Weekly or Session anchoring for the VWAP and sigma components, and includes optional transition smoothing after anchor resets to reduce visual stepping. Band levels are user-defined (with automatic ordering enforcement), and optional gradient fills can be enabled for clearer zone recognition. An optional Band Occupancy Table is included to show how frequently price closes inside each zone, either over a rolling lookback or since the most recent anchor reset. This table is informational only and does not generate signals.
This script is an indicator, not a strategy. It does not place trades, generate alerts, or provide entry or exit instructions. Outputs depend on chart symbol, timeframe, and data quality, including volume availability. The channel is designed to be non-repainting in the sense that it uses confirmed bar data and does not use forward-looking logic; however, like all indicators, the current bar can update until it closes.
Risk Warning
This material is educational research only and does not constitute financial advice, investment recommendation, or a solicitation to buy or sell any instrument. Foreign exchange and CFDs are complex, leveraged products that carry a high risk of rapid losses; leverage amplifies both gains and losses, and you should not trade with funds you cannot afford to lose. Market conditions can change without notice, and news or illiquidity may cause gaps and slippage; stop-loss orders are not guaranteed.
The analysis presented does not take into account your objectives, financial situation, or risk tolerance. Before acting, assess suitability in light of your circumstances and consider seeking advice from a licensed professional. Past performance and back-tested or hypothetical scenarios are not reliable indicators of future results, and no outcome or level mentioned here is assured. You are solely responsible for all trading decisions, including position sizing and risk management. No external links, promotions, or contact details are provided, in line with TradingView House Rules.
Disclaimer
Use of this indicator is at our own discretion and risk. It is a visual analysis tool and should be validated through independent testing and a documented trading plan before being used in live decision-making.
5 Layer Script P5 ICT Identifier Package (Sessions + Narrative)This script is a session-based market narrative framework designed to help traders understand where price is likely seeking liquidity and alignment, rather than focusing on isolated entries.
This script mainly identifies and labels the Asia, London, and New York trading sessions, providing structure for how price behavior evolves throughout the day. It is intended to be used as a context and timing tool.
How it works
-Automatically maps Asia, London, and New York sessions
-Highlights session ranges and transitions
-Helps visualize accumulation, expansion, and distribution phases
-No repainting once a session is completed
How to use it
-Use Asia to observe range formation and liquidity build-up
-Use London for expansion, manipulation, or early continuation
-Use New York for confirmation, continuation, or reversal (IMPORTANT)
-Align session behavior with:
Higher-timeframe bias
Midpoint equilibrium levels
Fair Value Gaps
Signal or Potential Reversal confirmations
Best practices
-Avoid treating sessions as directional signals
-Focus on session objectives, not candle patterns
-Most effective on futures, indices, and liquid FX pairs
-Works best when combined with higher-timeframe structure
This package is intentionally narrative-driven and non-mechanical, allowing traders to frame intraday price action within a repeatable session logic rather than reactive decision-making.
ADDITIONAL: If youve made it this far i will tell you a cheat code to this specific script. Once you alligned your standard time for the sessions you will notice that if you set the sessions to close properly i recommend asking Chatgpt or any other AI tool, you will notice that the sessions end a few hours earlier for NY. You should see a label pop up for the NY just like the Asia and London session. That signal will tell you the next potential move only if you utilize the ICT killzones cheatsheet, easy to find on google images and I will attach it here if possible. its definetly mixed up but thats just market structure, only one you should pay attention to take a trade is the end of the NY session if adjusted properly. over 90% success rate following this strategy. I will add the link for the full cheat sheet below
www.scribd.com
[turpsy] Midnight Opening Range-Fractal Midnight Open Range-Fractal Combined Trading System
Overview
This indicator combines Midnight Opening Range (MOR) analysis with HTF candle structure and fractal patterns to provide a comprehensive intraday trading framework. Unlike simple mashups, this system integrates three complementary methodologies that work together to identify high-probability trading zones.
Core Components & Synergy
1. MOR (Midnight Opening Range) Indicator
- Tracks the first 30 minutes of each trading day (00:00-00:30)
- Draws historical and current session boxes with quartile levels (25%, 50%, 75%)
- Custom opening price lines for key market times (NY Open 9:30, London Close, etc.)
- Concept:
Price tends to respect the opening range boundaries; quartiles act as support/resistance
2. HTF (Higher Timeframe) Candles
- Displays up to 6 higher timeframe candles alongside your chart
- Shows Fair Value Gaps (FVG) and Volume Imbalances (VI)
- Presents First Presented FVG (PFVG) - the initial gap after a fractal
- Concept:
HTF structure provides context for LTF entries; FVGs are magnetic price targets
3. Fractal Pattern Detection with CISD
- Identifies swing highs/lows using HTF candle structure
- CISD (Change in State of Delivery) lines mark confirmed fractal breaks
- Chart sweeps show liquidity grabs
- Concept: Fractals mark key market structure; CISD confirms directional bias
4. Killzones & Session Analysis
- Asia, London, NewYork AM/PM, and Lunch sessions
- Session highs/lows with pivot tracking
- Day/Week/Month opens and separators
- Concept: Specific sessions show characteristic volatility and directional behavior
5. ADR/CDR Analysis
- Average Daily Range and Current Daily Range tracking
- Shows percentage of ADR completed
- Concept: Helps gauge if there's room for continuation or if exhaustion is likely
How They Work Together
1. Context: It uses HTF candles and MOR boxes to identify the bigger picture structure
2. Timing: It uses Killzones to show when institutional activity is highest
3. Entry: It uses Fractals with CISD confirm structure breaks; FVGs provide entry zones
4. Risk Management: ADR/CDR helps set realistic profit targets and assess if move is extended
Original Contributions
This script significantly improves upon the base components by:
- Integrating 1-minute data feed for accurate Midnight Open Range calculations on all timeframes
- Adding PFVG detection synchronized with fractal patterns
- Creating logarithmic midpoint calculations between HTF candles
- Implementing chart sweep detection for liquidity analysis
- Adding CISD projection lines at 0.5, 1.0, 1.5, 2.0 extensions
How to Use
1. Enable desired HTF timeframes and MOR settings
2. Watch for PFVG formation after HTF candle closes
3. Look for CISD line breaks during killzone sessions
4. Enter at FVG mitigation zones aligned with MOR quartiles
5. Monitor ADR% to gauge move potential
Credits
- HTF Candles base structure: fadizeidan & tradeforopp
- Midnight opening range: trades-dont-lie
- I made the Significant modifications and integration
5 Layer Script FVG P3 Identifier Package True vs FalseThis script is a Fair Value Gap (FVG) identification framework designed to highlight price inefficiencies created by displacement, not to predict reversals or force entries. The script automatically detects and plots true three candle fair value gaps, allowing traders to objectively identify areas where price moved with imbalance and may later seek re-equilibration. Where you will see the FVG will update from a regular fvg to a True FVG.
How it works
-Identifies valid FVGs based on price displacement, not arbitrary candle size
-Plots FVG zones only after they are fully formed and confirmed
-Zones remain on the chart until price interacts with them
-No repainting once an FVG is printed
How to use it
-Use FVGs as areas of interest, not entry signals
-Best applied when price is returning after expansion
-Combine with: Higher-timeframe bias and Midpoint equilibrium levels
-Market structure shifts
-Liquidity sweeps or session timing
Entries should be taken only after confirmation (reaction, rejection, or shift)
This can be a good entry tool.
Adaptive Kinetic Trend [AKT] Pure MathTitolo: Adaptive Kinetic Trend - Pure Math
Descrizione:
Overview The Adaptive Kinetic Trend is a custom-built trend following system designed to filter noise and adapt to changing market volatility. Unlike standard indicators that rely on a static calculation, the AKT introduces a "Kinetic" component that adjusts the trend baseline according to price velocity (Momentum) and market intensity (ADX).
The "Pure Math" Implementation To ensure maximum stability and prevent potential discrepancies associated with data gaps or library updates, this script features a 100% manual mathematical library. It does not use TradingView's native ta.* functions for its core logic. Every calculation—including Wilder's Smoothing (RMA), Weighted Moving Averages (WMA), and True Range (TR)—is computed explicitly within the code from raw price data. This provides a transparent look at how the signals are derived.
Key Features
1. Kinetic Center Line The backbone of the indicator is an adaptive moving average that shifts its sensitivity based on a manually calculated RSI (Velocity).
High Velocity: The line reacts faster to capture breakout momentum.
Low Velocity: The line smooths out to prevent whipsaws during corrections.
2. Dynamic Volatility Expansion Using a custom ADX calculation (Intensity), the bands automatically expand during high-volatility events. This helps keep positions open during strong trends where standard ATR stops might be triggered prematurely.
3. Visual Filters (Color Logic) The script uses a strict color-coding system to guide analysis:
🟢 Green / 🔴 Red (Trend): The market is in a validated trend phase with sufficient intensity.
⚪ Gray (Choppy Filter): When Intensity falls below the threshold (default 20), the bars turn gray and signals are suppressed. This filters out low-probability ranging markets.
🟡 Yellow (Proximity Zone): When price trades within 0.5 ATR of the trend line, bars turn yellow. This indicates price is testing the trend structure.
4. Smart Pullback Signals (PB) Small triangles labeled "PB" appear when the price retraces to test the trend line.
Visual Intensity: The signals feature adaptive transparency. They appear bright during strong trends (High Probability) and faded/transparent during choppy conditions (Lower Probability), helping users filter signal quality visually.
5. Live Dashboard A data panel provides real-time metrics:
Trend Status: BULL, BEAR, or RANGE.
Intensity: Raw ADX value to gauge trend strength.
Dist ATR: The precise distance from the close price to the stop-loss line, measured in ATR multiples.
How to Use
Trend Analysis: Identify the main direction via Green/Red candles.
Filtering: Use the Gray bars to identify periods of low volatility/consolidation where trend strategies typically fail.
Re-entries: Use PB triangles to identify potential continuation points within an existing trend.
Risk Monitoring: Use Yellow bars (Proximity) to monitor price action near the invalidation level.
Disclaimer This script is intended for technical analysis and educational purposes only. It provides a visual representation of market trends based on historical data and does not guarantee future performance.
TA Confluence Scanner v2.9 | Mint_Algo📘 TA Confluence Scanner
Introduction
The TA Confluence Scanner is a multi-factor trend system designed to filter market noise and identify high-probability trade setups. By combining adaptive algorithms (KAMA) with Price Action methodologies (SMC, Breakouts, Fractals), this indicator operates on the principle of Confluence : a signal is only valid when multiple independent tools agree on the direction.
Instead of relying on a single lagging indicator (like just MA fast and slow crossover), this script acts as a "Scanner," evaluating the market state through Volatility, Trend Structure, and Equilibrium.
───────────────────────────────────────────────────
Important Note
To make this "Plug & Play," I have included optimized presets in the settings for different timeframes (1m/15m-1h/4h-1D) and trading styles (Scalper, Intraday, Swing, Investor) tested on symbols:
FX:EURUSD
IG:NASDAQ
BITSTAMP:BTCUSD
BINANCE:ETHUSD
CAPITALCOM:US500
OANDA:XAUUSD
NASDAQ:AAPL
NASDAQ:TSLA
BUT default settings already include a good preset which excludes most of the noise and grabs the trend better (fewer entries, but quality is higher).
Check the presets at the bottom 👇
───────────────────────────────────────────────────
Core Features
Adaptive Trend Filter (KAMA): Adjusts to market volatility to distinguish between chop and true trends.
SMC Equilibrium (EQ) Fans: A three-tiered dynamic structure (Fast, Medium, Slow) for trailing stops and targets.
Confluence Counter: Visually displays the strength of a signal (e.g., "Strong 4/6") based on how many factors align.
Re-Entry Logic: Identifies low-risk entry points within an existing trend.
Automated S/R & Breakouts: Detects key pivot levels and structural breaks.
───────────────────────────────────────────────────
Settings & Components Breakdown
1. KAMA (Primary Trend Filter)
The backbone of the system. It calculates the Efficiency Ratio (ER) of price movement.
How it works: If the ER is high (strong trend), KAMA follows price closely. If ER is low (ranging), KAMA flattens out to prevent false signals.
Tuning:
Fast (ER ~100/5/60): For Scalping.
Smooth: Default settings are optimized for a balance between lag and noise reduction.
2. SMC Equilibrium (EQ Structure)
Based on the HL2 formula (High+Low / 2), this creates a "fan" of three lines:
EQ1 (Fast): The aggressive line. Used for early exits or scalping stops.
EQ2 (Medium): The baseline trend structure.
EQ3 (Slow): The major trend container. Used for position trading.
Usage: Use these lines to gauge how far price has deviated from its "fair value."
3. Breakout & Internal Trend
Lookback Period: Defines the range for a valid breakout. A lower lookback (e.g., 10) gives earlier signals but more noise; a higher lookback (e.g., 20-30) confirms significant structural breaks.
Internal Trend: A simplified SMA check to ensure immediate momentum aligns with the macro trend.
4. Signal Strength (The Confluence Meter)
The indicator counts active signals from: KAMA, Internal Trend, S/R, FVG, Breakout, and EQ.
Strong Signal: When the count hits your threshold (e.g., 4/6 ). This suggests a high-probability reversal or breakout.
Medium Signal (Triangles): These appear when the trend is active but not all filters align. These are excellent continuation/re-entry points.
───────────────────────────────────────────────────
How to Trade (Strategy Guide)
🎯 The Entry
Wait for a Strong Signal (Large Label). This confirms that volatility, structure, and momentum have aligned.
Conservative: Wait for the candle to close.
Aggressive: Enter on the breakout of the KAMA line.
🔄 Re-Entry & Continuation
Markets rarely move in a straight line.
Scenario: You missed the initial "Strong" entry, or you took profit and want to re-enter.
The Signal: Look for the small Triangles (Medium signals). These often appear after a pullback when price resumes the main trend.
Logic: If the main KAMA trend is still green/red, but the "Strong" signal isn't firing, a Triangle indicates a safe place to add to a position.
⚠️ Pyramiding & Risk Management (Advanced)
The EQ Lines (Fast/Medium/Slow) are designed for a tiered position management strategy:
Entry: Open position (e.g., 0.03 lots).
First Take Profit: When price extends far beyond EQ1 (Fast) , lock in partial profits.
Trailing Stop: Move your Stop Loss to trace the EQ2 (Medium) line.
Trend Riding: Hold the "Runner" portion of your position until price closes back under EQ3 (Slow) or the KAMA line.
Tip: Use William Fractals (Period 2) to pinpoint exact swing highs/lows for tightening stops.
───────────────────────────────────────────────────
Presets & Optimized Settings
To make this "Plug & Play," I have included optimized presets in the settings for different trading styles.
(If you don't see some parameters, that means they are turned off in trading mode)
⚡ SCALPER (1m - 5m)
KAMA:
ER: 100
Fast Length: 15
Slow Length: 30
FVG:
Size %: 0.01
Trend Detection:
Length: 20
Breakout:
Lookback Period: 10
S/R Detection:
Pivot Length: 10
Tolerance: 0.3
SMC EQ:
Default: 10
EQ1: 10
EQ2 (Main): 30
EQ3: 120
Signal Strength:
Strong: 4
Medium: 3
📊 INTRADAY (15m - 1H)
KAMA:
ER: 100
Fast Length: 5
Slow Length: 30
Trend Detection:
Length: 100
Breakout:
Lookback Period: 30
S/R Detection:
Pivot Length: 20
Tolerance: 0.5
SMC EQ:
Default: 10
EQ1: 10
EQ2 (Main): 40
EQ3: 80
Signal Strength:
Strong: 4
Medium: 3
📈 SWING (4H - 1D)
KAMA:
ER: 30
Fast Length: 4
Slow Length: 30
Trend Detection:
Length: 50
Breakout:
Lookback Period: 20
S/R Detection:
Pivot Length: 30
Tolerance: 0.7
SMC EQ:
Default: 10
EQ1: 10
EQ2: 50
EQ3 (Main): 60
Signal Strength:
Strong: 4
Medium: 3
💼 INVESTOR (4H - 1D+)
KAMA:
ER: 30
Fast Length: 5
Slow Length: 10
Trend Detection:
Length: 100
Breakout:
Lookback Period: 50
S/R Detection:
Pivot Length: 30
Tolerance: 0.7
SMC EQ:
Default: 10
EQ1: 10
EQ2: 50
EQ3 (Main): 100
Signal Strength:
Strong: 4
Medium: 3
───────────────────────────────────────────────────
Notes
FVG (Fair Value Gaps): Optional. Enable if you trade volatile assets like Crypto/Gold where imbalances are common.
Support/Resistance: The built-in Pivot system is optional. Disable it if you prefer drawing your own levels to keep the chart clean.
Recommended Pairing:
For best results, pair this with a momentum oscillator like RSI to detect the range regime of a trend. Or DI+ and DI- (when it crosses over each other, that means the "range of possible" regime change of a trend).
───────────────────────────────────────────────────
Disclaimer:
This tool is for informational purposes only. "Confluence" increases probability but does not guarantee results. Always manage your risk.
SPX Iron Fly Session TrackerOverview
This indicator provides visual tracking for iron fly option structures designed for SPX 0-day-to-expiration (0DTE) intraday trading. It implements a two-phase position management system that adapts to different market conditions throughout the trading day.
This is a visualization and tracking tool only. It does not execute trades, access real options data, or calculate actual profit and loss. All displayed positions are theoretical representations based on underlying price movement.
Strategy Goal and Context
The Core Objective:
The strategy aims to have SPX price expire within your iron fly positions at end of day. When price expires inside a fly's profit zone (between the wings), that position captures maximum premium. The challenge is that price moves throughout the day, so static positioning rarely succeeds.
The Solution: Active Management
Rather than setting positions and hoping price cooperates, this approach continuously manages and repositions flies to keep price centered within your profit zones. As SPX drifts during the trading session, you add new flies at current price levels and close flies that price has moved away from.
The Goal: Multiple Profitable Expirations
By session end, you want as many flies as possible to have price expire within their center zones. This requires:
Adding new flies as price moves away from existing positions
Closing flies when price crosses beyond their optimal range
Building layered coverage in the afternoon to increase probability of capture
Adapting wing widths to time of day and volatility
The Reality: Capital and Time Intensive
This is not a passive strategy. Successful implementation requires:
Substantial capital (each fly requires margin, multiple flies compound this)
Active monitoring throughout trading sessions
Quick decision-making as positions trigger
Multiple position adjustments per session
Disciplined adherence to management rules
How This Indicator Helps:
For backtesting:
Use replay mode to study how positions would have managed on historical sessions
Test different parameter combinations to find optimal settings
Observe position behavior during various market conditions
Understand timing and frequency of position adds and closes
Validate whether your capital can support the required position count
For live session support:
Real-time visual tracking shows current position coverage
Alerts notify you immediately when new positions should be added
Position closure alerts help you manage exits promptly
Reference strike tracking shows where you're measuring movement from
History table provides audit trail of all position activity
The indicator handles the complex tracking and rule application, allowing you to focus on execution and risk management.
Key Use Cases
1. Replay Mode - Backtest and Study
Use TradingView's replay feature to validate the strategy on historical sessions:
Step through past SPX sessions bar-by-bar
See exactly when positions would have opened and closed
Count how many flies would have expired profitably
Analyze different parameter settings on the same historical data
Study position behavior during trending vs ranging conditions
Calculate approximate capital requirements for your setup
Refine your parameters before risking real capital
2. Live Session Alerts
Set up real-time notifications for active trading sessions:
Get alerted immediately when new positions trigger
Receive notifications when positions close
Alerts include strike level, wing width, and closure reason
Works on mobile, desktop, email, or webhook
Never miss a position signal during active trading
Maintain awareness even when away from screens briefly
3. Fully Customizable Parameters
Adapt every aspect to your risk tolerance and capital:
Adjust trigger distances for more or fewer position adds
Modify wing widths for different volatility environments
Change session timing to match your trading schedule
Set maximum concurrent positions to your capital limits
Fine-tune spacing to match available strike increments
Iron Fly Structure
An iron fly is a neutral options strategy with four legs:
- Short 1 ATM Call
- Short 1 ATM Put
- Long 1 OTM Call (upper wing protection)
- Long 1 OTM Put (lower wing protection)
The structure creates a defined risk zone. Maximum profit occurs when price expires at the center strike. Loss increases as price moves toward the wings (breakeven points). Maximum loss is defined and occurs beyond the wings.
Expiration Goal:
You want SPX to close inside the fly's wings. If SPX expires at the strike, you capture maximum premium. If SPX expires between the strike and either wing, you still profit (reduced). If SPX expires beyond the wings, you realize a loss (but it's defined and limited by the wings).
Two-Phase Management System
The indicator tracks positions across two distinct trading phases with different management rules:
Phase 1: TWO_GLASS - Morning Session (Default 10am-1pm ET)
Conservative positioning with active repositioning:
- Trigger new positions when price moves 7.5 points from reference strike (configurable)
- Maintain maximum 2 concurrent positions (configurable)
- 10-point spacing between position strikes (configurable)
- 40-point wing width (configurable)
- Exit rule: When two positions are active and price crosses to one strike level, close the OTHER position
This phase uses a "follow the price" approach. You're not trying to stack multiple positions yet - you're maintaining one or two flies centered on wherever price currently is. As price drifts, you add a new fly at the current level and close the old one when price moves too far away.
Phase 2: THREE_GLASS - Afternoon Session (Default 1pm-4pm ET)
Accumulation mode with layered coverage:
- Trigger new positions every 2.5 points of price movement (configurable)
- Maintain maximum 6 concurrent positions (configurable)
- 5-point spacing between strikes (configurable)
- 20-point wings early, reducing to 10 points after 3pm (configurable)
- Exit rule: Positions only close when price reaches wing extremes
This phase builds a stacked profit zone. Instead of swapping positions, you accumulate multiple flies as price moves. The goal is to have several flies active at expiration, creating a wider net to capture price. Tighter spacing and more frequent triggers create this layered coverage.
Why Two Different Phases?
Morning (Phase 1):
Earlier in the day, price has more time to move substantially. Maintaining many concurrent positions is riskier because price could trend and hit multiple wings. The strategy uses selective positioning with wider wings and active replacement.
Afternoon (Phase 2):
Closer to expiration, price movements typically compress. Time for large moves decreases. The strategy shifts to accumulation, building a net of positions to increase probability that final expiration price falls within at least one (ideally several) of your flies. Tighter wings and more positions become appropriate.
Exit Mechanisms
Strike Cross Exit (Phase 1 Only)
When two positions are active, if price moves to or beyond one position's strike level, the OTHER position closes. This keeps your coverage centered on current price action rather than maintaining positions price has moved away from.
Example: Flies at 5900 and 5910 are open. Price moves to 5910. The fly at 5900 closes because price has moved to the 5910 level. You're now positioned at current price (5910) rather than maintaining coverage at old price (5900).
Wing Extreme Exit (Both Phases)
Any position closes immediately when price touches its upper or lower wing boundary. This represents the breakeven/maximum loss point, so the position is closed to prevent further deterioration.
Dynamic Wing Adjustment
Wing widths automatically adjust based on time of day:
- Phase 1 (Morning): 40 points (customizable)
- Phase 2 Early (1pm-3pm): 20 points (customizable)
- Phase 2 Late (3pm-4pm): 10 points (customizable)
This progressive tightening reflects decreasing price movement potential as expiration approaches. Wider wings earlier provide more protection when price could move substantially. Tighter wings later allow more precise positioning when price movements typically compress.
All values are fully adjustable to match your risk parameters and observed market volatility.
Customization Guide
Every parameter can be modified to suit your trading style, risk tolerance, and capital:
Session Timing
- TWO_GLASS Start Hour: When Phase 1 begins (default: 10am ET)
- THREE_GLASS Start Hour: When Phase 2 begins (default: 1pm ET)
- Wing Width Change Hour: When wings tighten (default: 3pm ET)
- Session End Hour: When tracking stops (default: 4pm ET)
Phase 1 Parameters (Fully Adjustable)
- Trigger Distance: How far price must move from reference strike to add new position (default: 7.5, range: 0.1+)
- Fly Spacing: Distance between position strikes (default: 10, range: 1.0+)
- Wing Width: Distance from strike to wings (default: 40, range: 5.0+)
- Max Flies: Maximum concurrent positions (default: 2, range: 1-10)
Phase 2 Early Parameters (Fully Adjustable)
- Trigger Distance: Movement needed to add new position (default: 2.5, range: 0.1+)
- Fly Spacing: Distance between strikes (default: 5, range: 1.0+)
- Wing Width: Strike to wing distance (default: 20, range: 5.0+)
- Max Flies: Maximum concurrent positions (default: 6, range: 1-20)
Phase 2 Late Parameters
- Wing Width: Reduced width after 3pm (default: 10, range: 5.0+)
General Settings
- Strike Rounding: Round strikes to nearest multiple (default: 5.0, range: 1.0+)
- Bars Before Check: Bars to wait before allowing closure (default: 2, prevents premature exits)
Display Options
- Show History Table: Toggle detailed position log (default: on)
- History Table Rows: Number of positions displayed (default: 15, range: 5-30)
Alert Settings
- Enable Alerts: Toggle notifications for opens/closes (default: on)
How to Use
For Backtesting in Replay Mode:
Select a historical SPX trading session
Apply indicator to 1-5 minute timeframe
Configure your preferred parameters
Activate TradingView's replay feature
Play through the session (step-by-step or continuous)
Observe when positions open (green boxes appear)
Watch position closures (boxes turn gray)
Count how many flies would have expired with price inside (green at session end)
Note total number of position adds throughout session
Calculate approximate capital needed (positions × margin per fly)
Test different parameter combinations on same historical data
Study position behavior during trending vs ranging sessions
For Live Trading Sessions:
Apply indicator to SPX on 1-5 minute timeframe
Configure parameters based on your backtest results
Create alerts for "Iron Fly Opened" and "Iron Fly Closed"
Set alert frequency to "Once Per Bar Close"
Choose notification method (popup, mobile app, email, webhook)
Monitor the status table (top-right) for current session and reference strike
Review history table (bottom-right) for position log with timestamps
When alert triggers, use visual cues to manually place actual option orders
Execute position adds and closes as indicated by the tracker
Visual Interpretation:
Green boxes = Active positions (theoretical profit zones)
White lines (Phase 1) / Aqua lines (Phase 2) = Strike levels
Red/Blue dotted lines = Wing boundaries (breakeven/risk limits)
Gray boxes = Closed positions (historical reference)
Current SPX price line = Shows where price is relative to positions
Top-right table = Current session status, reference strike, open/closed counts
Bottom-right table = Complete position history with open/close timestamps
Alert System Details
The indicator generates detailed alert messages for position management:
Position Opened:
- Strike level where fly should be placed
- Wing width (±points from strike)
- Session phase (Phase 1 or Phase 2)
- Alert format example: "Iron Fly OPENED | Strike: 5900 | Wings: ±40 | Session: TWO_GLASS"
Position Closed:
- Strike level of fly being closed
- Closure reason (strike cross, wing extreme, etc.)
- Session phase
- Alert format example: "Iron Fly CLOSED | Strike: 5900 | Reason: Price crossed to lower fly | Session: TWO_GLASS"
Configure alerts once before market open, then receive automatic notifications as positions trigger throughout the trading session.
Parameter Optimization Suggestions
For Higher Volatility Environments:
- Increase trigger distances (e.g., Phase 1: 10-15 points, Phase 2: 3-5 points)
- Widen wing widths (e.g., Phase 1: 50-60 points, Phase 2: 25-30 points early, 15-20 late)
- Increase strike spacing to reduce position frequency
For Lower Volatility Environments:
- Decrease trigger distances (e.g., Phase 1: 5-7 points, Phase 2: 1.5-2 points)
- Tighten wing widths (e.g., Phase 1: 30-35 points, Phase 2: 15-18 points early, 8-10 late)
- Reduce strike spacing for more granular coverage
For Conservative Risk Management:
- Reduce maximum concurrent positions (Phase 1: 1, Phase 2: 3-4)
- Widen wing widths for more breathing room
- Increase bars before check to avoid whipsaws
- Use wider trigger distances to reduce position frequency
For Aggressive Positioning:
- Increase maximum concurrent positions (Phase 2: 8-10)
- Tighten trigger distances for more frequent adds
- Reduce bars before check for faster responses
- Use tighter spacing to create denser coverage
Capital Considerations:
Remember that each fly requires margin. If Phase 2 allows 6 concurrent flies and each requires $10,000 margin, you need $60,000 in available capital just for position requirements, plus additional cushion for adverse movement.
Use replay mode to count maximum concurrent positions that would have occurred on historical sessions with your parameters, then calculate total capital needed.
Practical Application
This tool provides visual guidance and management support. To implement the strategy:
Backtest thoroughly in replay mode first
Validate capital requirements for your parameter settings
Confirm you can actively monitor positions during trading hours
Use displayed positions as reference for manual order placement
Match indicator parameters to your actual option contracts
Account for real-world factors: commissions, slippage, bid-ask spreads, option availability
Implement proper position sizing based on available capital
Set up alerts before market open to catch all signals
Execute actual trades manually in your brokerage platform
Track actual results versus indicator expectations
Important Limitations
Theoretical tracking only - not an automated trading system
No access to real option prices, Greeks, or implied volatility
No profit/loss calculations or risk metrics
Does not account for time decay (theta), delta, gamma, vega changes
Assumes continuous price action - gaps or halts not handled
Designed for 0DTE SPX options - not suitable for other timeframes or instruments
Assumes option availability at all strike levels - may not reflect reality
Does not model actual option bid/ask spreads or liquidity
Assumes instant execution at desired strikes - slippage not considered
Historical replay shows theoretical behavior only - actual market conditions may differ
Does not adjust for changing implied volatility throughout session
Position count and timing may not match what's executable in real markets
Capital and Time Requirements
This strategy is resource-intensive:
Capital Requirements:
Each iron fly requires margin (varies by broker and strike width)
Multiple concurrent positions multiply capital needs
Example: 6 flies at $10,000 each = $60,000 minimum
Additional cushion needed for adverse movement
Pattern Day Trader rules may apply (requires $25,000 minimum)
Time Requirements:
Active monitoring during trading hours (typically 10am-4pm ET)
Quick response to position add/close signals
Multiple position adjustments per session possible
Cannot be passive or set-and-forget
Requires ability to place orders promptly when alerted
Use replay mode to understand the commitment level before attempting live implementation.
Risk Considerations
Iron fly trading involves substantial risk. This indicator provides visualization and management support only - it does not constitute financial advice or trading recommendations.
Options trading can result in total loss of capital. The indicator's theoretical positions do not reflect actual trading results. Backtest analysis and historical visualization do not guarantee similar future outcomes. Multiple concurrent positions multiply both profit potential and loss risk.
Always conduct independent research, understand all risks, validate capital requirements, and never trade with funds you cannot afford to lose. Consider starting with paper trading to validate execution capability before risking real capital.
Technical Notes
The indicator uses price-based triggers only. It does not:
Connect to options data feeds
Calculate theoretical option values or Greeks
Execute trades automatically
Provide specific trading signals or recommendations
Account for option-specific factors (implied volatility, time decay, bid/ask spreads)
All displayed information represents theoretical position placement based solely on underlying SPX price movement and user-configured parameters. The tool helps visualize the management framework but requires the trader to handle all actual execution and risk management decisions.
This is an educational and analytical tool for understanding iron fly position management concepts. It requires active interpretation, backtesting validation, and manual implementation by the user.
deKoder | Whale Prints [WP]deKoder | Whale Prints | Large Trade Orderflow Detection
This open-source indicator is a clean, precision tool for revealing hidden large-volume activity directly on your chart. By scanning ultra-low timeframes while you view higher ones, it projects statistically significant volume spikes as intuitive markers giving you a clear window into institutional orderflow without visually overwhelming the price action.
Key Features & Strengths
True Intra-Bar Detection | Monitors lower timeframes down to 1-second bars, catching aggressive block trades and absorption that occur within a single higher-TF candle.
Accurate Trade Levels | Markers are placed at the actual hl2 price of the aggressive lower-TF bar, providing a far more accurate estimate of where the large trade executed than typical mid-candle approximations.
Multiple Trades Per Bar | If several significant volume spikes occur inside one higher-TF candle, all qualifying levels are displayed individually – offering greater granularity and context.
Adaptive Thresholding | Uses higher-TF volume standard deviation (stable baseline) intelligently scaled to the lower timeframe, reducing noise in quiet markets while remaining sensitive to genuine outliers.
Clean Visual Hierarchy | Three tiers (Small 🞉 / Medium ⏣ / Large 🞊) with dynamic symbol size, line thickness, transparency, and user-definable bullish/bearish coloring based on LTF candle direction.
How to Use It as an Orderflow Tool
Large volume spikes often mark the footprints of institutional players. This indicator helps you read those footprints in real time.
Small (🞉) | Moderate excess volume: early interest, probing, or building positions.
Medium (⏣) | Strong spike: increasing conviction, potential momentum shift.
Large (🞊) | Extreme outlier: frequently climactic volume signalling exhaustion or major absorption.
Why Price Often Reverses at These Levels
Large players frequently place limit orders in areas rich with liquidity – commonly just beyond recent highs/lows where retail stop-losses cluster. When price sweeps those zones:
Stop hunts trigger a cascade of forced exits, creating liquidity for larger participants to fill their limit orders.
Breakout traders who entered on the move are trapped offside and become forced buyers/sellers when price reverses.
Institutions use this liquidity to execute large orders at favorable prices with minimal immediate market impact.
The result is aggressive volume at the extreme, followed by reversal as smart money finishes filling and price returns toward fair value. Clusters of medium/large markers at swing points are classic signs of this dynamic.
Practical Analysis Tips
Reversals/Absorption | Clusters of large markers at swing highs/lows (especially opposing-color spikes) signal potential turns – buyers or sellers stepping in aggressively.
Level Defense | Trades piling up at key support/resistance suggest institutions protecting or building positions.
Trapped Traders | Large spikes beyond range pivots followed by reversal back into the range often highlight trapped breakout traders who add fuel to a move when they are forced to liquidate their positions.
Use Offset (-3 to +3) to shift markers away from current price for clearer viewing.
Pro tip: Zoom into the lower TF occasionally to see how these projected levels align exactly with aggressive candles.
Recommended Pairings
This is designed as a pure orderflow overlay to be layered with your existing setup:
Support & Resistance (horizontals, pivots, Volume Profile POC/VAH/VAL)
Market Structure tools (swing points, order blocks, fair value gaps)
Trend filters (EMAs, SuperTrend, higher-TF bias)
Momentum oscillators for timing confluence
Best Suited For
Scalping & day trading (1–15 min charts with 5–30S lower TF)
Swing trading entries (1H–4H charts with 1–5 min lower TF)
High-liquidity markets: crypto perpetuals, forex majors, volatile stocks
Add this indicator to start seeing the hidden aggression driving price and expose the hidden edges beyond the noise.
☠ FR33FA11 | deKoder ☠
Released January 2025 | Open Source
Rolling Volume Structure: HVN & SentimentTitle:
Rolling Volume Structure: HVN & Sentiment
Description:
This indicator visualizes the distribution of volume over price levels for a user-defined rolling period. It is designed to identify structural market nodes (HVN/LVN) and correlate them with Pivot Points to filter out market noise.
NOTE: This script utilizes a mathematical array binning algorithm to calculate the profile efficiently on the chart timeframe, avoiding the runtime timeouts often associated with standard iterative volume profiles.
How it works (Technical Methodology)
Binning Algorithm: The script calculates the price range (Highest High - Lowest Low) of the lookback period and divides it into a fixed number of vertical bins defined by the Resolution input.
Volume Allocation: It iterates through historical bars once. The volume of each bar is assigned to the corresponding price bin based on the bar's closing price.
Sentiment Approximation: Since tick-level Bid/Ask data is not available for historical bars in standard Pine Script strategies, this indicator estimates directional volume based on candle polarity:
If Close > Open: Volume is categorized as "Up Volume" (Buying Sentiment).
If Close < Open: Volume is categorized as "Down Volume" (Selling Sentiment).
Disclaimer: This is a standard approximation for structural analysis and does not represent true tick-data delta.
Why this Combination? (Originality & Synergy)
This script addresses the problem of validating structural levels. Traders often use Pivots and Volume Profiles separately. This script combines them programmatically to provide context:
Pivot Confluence: A Pivot Point is only plotted if it aligns with significant volume structure.
HVN Validation: A pivot occurring within a High Volume Node (HVN) suggests a high-liquidity reversal zone, whereas a pivot in a Low Volume Node (LVN) may indicate a liquidity void or a "weak" high/low.
The Dashboard summarizes these metrics (Position relative to Value Area, Net Sentiment, and Trend), removing the need for multiple separate indicators.
Educational Use for Beginners
If you are new to Volume Profile, think of the market structure in these simple terms:
Value Area (VA): This is the "Fair Price" zone where 70% of trading happened. If price is inside here, the market is balanced. If price breaks out, it may be starting a trend.
HVN (High Volume Nodes - Colored Boxes): Think of these as "Traffic Jams". Price often slows down, bounces, or gets stuck here because there are many orders. They act as Support or Resistance.
LVN (Low Volume Nodes - Gray Strips): Think of these as "Empty Highways". Because there is little volume here, price tends to move through these zones very quickly to get to the next HVN.
Features
HVN (High Volume Nodes): Colored boxes highlighting areas of high accumulation.
LVN (Low Volume Nodes): Gray strips highlighting gaps or acceleration zones.
Value Area (VA): Displays the VAH, VAL, and PoC (Point of Control).
Volume-Filtered Pivots: Plots pivots only when supported by the profile structure.
Sentiment Coloring: The profile bins are colored based on the net bullish/bearish candle volume.
Settings
Rolling Period: The lookback window size (default 150 bars).
Resolution: Precision of the profile bins (higher = more detail, lower = smoother).
HVN Thresholds: Percentage of PoC volume required to identify a node.
Global Text Size: Adjusts labels and dashboard for 4K or standard screens.
Credits: The core binning logic is adapted from generic open-source array management concepts for custom volume profiles.
Apex ICT Delivery & Session Flow ProDescription
The Apex ICT Delivery & Session Flow Pro is a high-precision technical analysis indicator designed for inner-circle traders who prioritize a clean, institutional-grade chart. This script specializes in identifying real-time liquidity levels and displacement zones while utilizing an automated "Cleanup Engine" to ensure that only the most relevant, unmitigated data remains visible.
Core Functionalities
Multi-Timeframe Displacement Engine: The script scans across multiple timeframes (1m, 5m, 15m, 1H) to identify Fair Value Gaps (FVG) created by high-displacement price action. It automatically plots the FVG boxes and the 50% Consequent Encroachment (CE) line for precise entry and target mapping.
Dynamic Session Liquidity: Automatically identifies and tracks the Highs and Lows of the Asia, London, and New York sessions. These levels are explicitly labeled and extended to act as magnet levels for price or points of liquidity reversal.
CISD (Change in State of Delivery): Visualizes shifts in order flow by marking the opening prices of the last opposite candle when price action confirms a change in delivery state. This provides immediate visual feedback on market sentiment shifts.
NY-Specific VWAP: Features a strict New York Session VWAP that resets daily at the NY open (08:00). This serves as the "Mean" for the session, helping traders identify premium and discount zones specifically within the high-volume New York hours.
The "Clean Chart" Cleanup Engine: Unlike standard indicators that clutter the screen with historical data, this script features an intelligent removal system:
FVGs & Order Blocks: Automatically deleted once price trades through them or if they move too far from current price (Proximity Filter).
Broken Session Levels: Highs and Lows are instantly removed once they are breached by price.
Temporal Decay: CISD markers are automatically cleared after 20 candles to keep the focus on immediate delivery.
Apex ICT: Proximity & Delivery FlowThis indicator is a specialized ICT execution tool that automates the identification of Order Blocks, Fair Value Gaps, and Changes in State of Delivery (CISD). Unlike standard indicators that clutter the screen, this script uses a Proximity Logic Engine to ensure you only see tradeable levels. It automatically purges old data (50-candle CISD limit) and deletes mitigated zones the moment they are breached, leaving you with a clean, institutional-grade chart.






















