Daily Floor PivotsDaily Floor Pivots with Comprehensive Statistical Analysis
Overview
This indicator combines traditional floor pivot levels with golden zone analysis and comprehensive statistical insights derived from 15 years of historical NQ futures data. While the pivot levels and golden zones can be applied to any instrument, the statistical tables are specifically calibrated for NQ/MNQ futures based on analysis of 2,482 NY Regular Trading Hours (RTH) sessions from 2010-2025.
What Makes This Indicator Original
Unlike standard pivot indicators that merely plot levels, this tool provides:
Enhanced Golden Zone Analysis: Calculates not only the main golden zone (0.5-0.618 retracement of previous day's range) but also golden zones between each pivot pair (PP-R1, R1-R2, R2-R3, PP-S1, S1-S2, S2-S3)
Data-Driven Statistical Tables: Two comprehensive tables displaying real statistics from 2,482 trading days of NQ analysis, including:
Probability-based touch rates and continuation patterns
Context-aware statistics based on opening position
Gap analysis and behavioral patterns
First touch dynamics and time-to-reach averages
Granular Customization: Every visual element and statistical section can be independently toggled, allowing traders to focus on what matters most to their strategy
How It Works
Pivot Calculation Methodology
The indicator uses the standard floor pivot formula based on the previous day's price action:
Pivot Point (PP) = (Previous High + Previous Low + Previous Close) / 3
Resistance Levels: R1, R2, R3 calculated from PP and previous range
Support Levels: S1, S2, S3 calculated from PP and previous range
Golden Zone Calculations
Main Golden Zone: The 0.5 to 0.618 Fibonacci retracement of the previous day's range, representing a key reversal and continuation area.
Inter-Pivot Golden Zones: For each adjacent pivot pair, golden zones are calculated as:
Resistance pairs (PP→R1, R1→R2, R2→R3): 0.5-0.618 range from the lower pivot
Support pairs (PP→S1, S1→S2, S2→S3): 0.382-0.5 range from the upper pivot
These zones represent high-probability areas where price tends to react when moving between pivot levels.
Statistical Analysis Source
All statistics displayed in the tables are derived from external Python analysis of 15 years of 1-minute NQ futures data (2010-2025), specifically analyzing NY RTH sessions (9:30 AM - 4:00 PM EST). The analysis tracked:
2,482 complete trading days
Intraday pivot touches and closes
Opening position context
Gap behavior relative to previous day
Time-of-day patterns
Sequential pivot interactions
IMPORTANT: While the pivot levels and golden zones are universally applicable mathematical calculations that work on any instrument, the statistical percentages shown in the tables are specific to NQ/MNQ behavior only. Do not assume these statistics transfer to other instruments.
Configuration Guide
Basic Settings
Number of Periods Back (1-20, default: 3)
Controls how many historical pivot periods are displayed on the chart
Setting to 1 shows only current day's pivots
Higher values show more historical context
Labels Position (Left/Right)
Choose whether pivot labels appear on the left or right side of each level line
Line Width (1-5, default: 2)
Adjust the thickness of all pivot and golden zone lines
Golden Zone Customization
Show Daily Golden Zone (0.5-0.618)
Toggle the main golden zone on/off
When enabled, displays a shaded box between the 0.5 and 0.618 retracement levels
Line Color / Fill Color
Customize the appearance of the main golden zone
Fill color determines the shaded box transparency
Show Labels / Show Prices
Control whether "0.5" and "0.618" labels appear
Control whether price values are displayed on labels
Inter-Pivot Golden Zones
Six toggle options allow you to show/hide individual golden zones:
PP to R1 / PP to S1: Most frequently touched (60.8% / 50.9%)
R1 to R2 / S1 to S2: Moderately touched (25.2% / 24.0%)
R2 to R3 / S2 to S3: Rarely touched (9.4% / 10.5%)
Line Color / Fill Color: Customize appearance of all inter-pivot zones
Show Labels / Show Prices: Control labeling for inter-pivot zones
Usage Tip: Disable outer zones (R2-R3, S2-S3) on lower volatility days to reduce chart clutter.
Pivot Display
Show Support/Resistance Levels: Master toggle for all pivot lines
Show SR Labels / Show SR Prices: Control labeling on pivot levels
Individual level toggles and colors:
PP (Pivot Point): The central reference point
R1/S1: Primary resistance/support (38.9% / 35.4% touch rate)
R2/S2: Secondary levels (15.6% / 16.1% touch rate)
R3/S3: Extended levels (5.1% / 7.3% touch rate)
Color Customization: Each level's color can be independently set
Overall Statistics Table
Show Overall Statistics Table: Master toggle
Table Size: tiny/small/normal/large/huge/auto
Table Position: Top Left/Top Right/Bottom Left/Bottom Right
Section Toggles (enable/disable individual sections):
Current Session Info
Touch & Close Rates
Continue & Reject Rates
First Touch Statistics
Golden Zone Statistics
Daily Close Distribution
Highest/Lowest Levels Reached
Context Statistics Table
Show Context Statistics Table: Master toggle
Table Size: tiny/small/normal/large/huge/auto
Table Position: Top Left/Top Right/Bottom Left/Bottom Right
Section Toggles:
Current Opening Zone
Opening Zone Statistics
Previous Day Gap Context
Understanding the Statistical Tables
TABLE 1: OVERALL STATISTICS
This table presents universal statistics from 2,482 days of NQ analysis.
Current Session Info
Displays real-time context for the active session:
Open: Where the current RTH session opened relative to pivots (e.g., "GZ_TO_R1" means opened between the PP-R1 golden zone and R1)
Now: Current price position relative to pivots
Direction: Bull (close > open), Bear (close < open), or Flat
How to use: This section helps you quickly understand where price opened and where it currently is, providing immediate context for the day's action.
Touch & Close Rates
Shows probability that each pivot level will be reached during RTH:
Touch %: Percentage of days where price touched this level at any point
Example: R1 touched 38.9% of days, PP touched 57.5% of days
Close %: Percentage of days where price closed beyond this level
Example: R1 close beyond happened 39.8% of days
How to interpret:
Higher touch rates indicate more reliable levels for intraday targeting
The difference between touch and close rates shows rejection frequency
PP has the highest touch rate (57.5%), making it the most magnetic level
Outer levels (R3/S3) have low touch rates (5.1%/7.3%), indicating rare extension days
Continue & Reject Rates
When a level is touched, these statistics show what happens next:
Continue %: Probability price continues through the level
Example: When PP is touched, price continues 88.1% of the time
Reject %: Probability price rejects from the level and reverses
Example: When R1 is touched, price rejects 50.9% of the time
How to interpret:
PP shows highest continuation (88.1%), confirming it's a poor reversal level
Support levels (S1/S2/S3) show strong rejection rates (62.5%/60.7%/56.1%), making them better reversal candidates
Continuation rates above 80% suggest the level is better as a target than an entry
First Touch Statistics
Analyzes which pivot is typically touched first during RTH:
1st Touch %: Probability this level is the first pivot encountered
PP is first touched 37.1% of days (most common)
R1 is first touched 26.0% of days
S1 is first touched 10.9% of days
1st→Continue: If this level is touched first, probability of continuation
S1-S3 show 95.6%-100% continuation when touched first
This means when price reaches support first, it usually continues lower
Avg Time: Minutes after 9:30 AM EST before first touch
PP: 1h 6m average
S3: 19m average (when bearish)
R3: 3h 19m average (when bullish)
How to interpret:
Opening away from PP means higher probability of reaching extremes (R2/R3 or S2/S3)
When support is touched first (within first 2 hours), expect continuation lower
Late-day first touches (after 2 PM) often indicate strong trending days
Multi-Touch: Shows how often levels are tested multiple times (92.8%-95.0% across all levels)
Golden Zone Statistics
Main GZ: 58.5% touch rate for the 0.5-0.618 zone
Inter-Pivot zones:
PP-R1: 60.8% (highest probability)
PP-S1: 50.9%
R1-R2: 25.2%
S1-S2: 24.0%
R2-R3: 9.4%
S2-S3: 10.5%
How to interpret:
Main GZ is touched more often than any individual resistance level
PP-R1 and PP-S1 golden zones are high-probability mean reversion areas
Outer golden zones (R2-R3, S2-S3) are only relevant on high volatility days
Daily Close Distribution
Shows where RTH sessions typically close:
Above/Below PP: 58.5% close above, 41.5% below (slight bullish bias)
Above R1: 24.5% of days
Below S1: 18.7% of days
In GZ: Only 6.3% close in the golden zone (typically transits through it)
How to interpret:
Most days (58.5%) have bullish bias (close above PP)
Less than 25% of days are strong trending days (beyond R1/S1)
Golden zone is an action area, not a resting area
Highest/Lowest Levels Reached
Distribution of the most extreme level reached:
High Resist: R1 (26.0%), R2 (10.8%), R3 (5.1%)
Low Support: S1 (35.4%), S2 (1.9%), S3 (0.6%)
How to interpret:
Most days don't reach beyond R1 or S1
R3/S3 are rare events (5.1%/0.6%), indicating major trending days
S1 is reached as lowest level more often than R1 as highest, suggesting downside is more frequently tested
TABLE 2: CONTEXT STATISTICS
This table provides conditional statistics based on how the session opened.
Current Opening Zone
Displays which of 13 possible zones the RTH session opened in:
ABOVE_R3, R2_TO_R3, R1_TO_R2, GZ_TO_R1, IN_GZ, PP_TO_GZ, AT_PP, GZ_TO_PP, S1_TO_GZ, S2_TO_S1, S3_TO_S2, BELOW_S3
How to use: This immediately tells you the market structure and what type of day to expect.
Opening Zone Statistics
Detailed statistics for the current opening zone (only shows for 6 major zones):
For each zone, you see:
Occurs: How often this opening scenario happens
GZ_TO_R1: 38.4% (most common)
AT_PP: 12.8%
S1_TO_GZ: 24.2%
R1_TO_R2: 9.4%
S2_TO_S1: 6.3%
IN_GZ: 3.8%
Bull/Bear %: Close direction probability
Example: GZ_TO_R1 is perfectly balanced (50.0% bull / 49.6% bear)
R1_TO_R2 is bullish (58.1% bull / 41.0% bear)
Levels Hit: Probability of reaching each pivot level from this opening
Helps identify high-probability targets
Example: From GZ_TO_R1, PP is hit 52.9%, R1 is hit 49.0%, S1 is hit 21.6%
How to interpret:
GZ_TO_R1 (most common): Balanced day, watch PP and GZ for direction clues
AT_PP: Slight bullish bias (56.9%), high chance of touching both PP (92.8%) and GZ (90.3%)
R1_TO_R2: Bullish bias (58.1%), expect continuation to R2 (58.1% chance)
S2_TO_S1: Bullish reversal setup (59.9%), very high chance of S1 touch (82.8%)
IN_GZ: Rare opening (3.8%), bullish bias, virtually guaranteed GZ touch (100%)
Previous Day Gap Context
Shows current gap scenario and typical behavior:
Three scenarios:
GAP UP: Opened Above Yesterday's High (20.5% of days)
R1 Touch: 65.9% (high probability)
R2 Touch: 42.1%
S1 Touch: 15.0% (low probability)
Bias: Bullish continuation
GAP DOWN: Opened Below Yesterday's Low (11.3% of days)
S1 Touch: 71.5% (high probability)
S2 Touch: 55.2%
R1 Touch: 12.1% (low probability)
Bias: Bearish continuation
NO GAP: Opened Within Yesterday's Range (68.2% of days)
PP Touch: 69.5%
GZ Touch: 71.7%
R1 Touch: 35.2%
Bias: Balanced (watch for direction at PP/GZ)
How to interpret:
Gap days (up or down) tend to continue in the gap direction
When gapping, fade trades are low probability (15.0% and 12.1%)
Most days (68.2%) open within previous range, making PP and GZ critical decision zones
The "bias" line provides clear directional guidance for trade selection
Practical Application Examples
Example 1: Standard Day Setup
Scenario: RTH opens at 20,450
PP: 20,400
GZ: 20,390-20,395
R1: 20,425
Previous day high: 20,460
What the tables tell you:
Opening Zone: "GZ_TO_R1" (38.4% occurrence)
Gap Context: "NO GAP" (68.2% occurrence)
Expected behavior: Balanced (50/50 bull/bear)
High probability: PP touch (52.9%), GZ touch (56.8%)
Moderate probability: R1 touch (49.0%), S1 touch (21.6%)
Trade plan:
Wait for price to reach PP (52.9% chance) or GZ (56.8% chance)
Look for directional confirmation at these levels
First target R1 if bullish, S1 if bearish
Avoid assuming direction without confirmation (perfectly balanced opening)
Example 2: Gap Up Day
Scenario: RTH opens at 20,510
Previous day high: 20,460
R1: 20,425
R2: 20,475
What the tables tell you:
Gap Context: "GAP UP" (20.5% occurrence)
R1 touch: 65.9% probability
R2 touch: 42.1% probability
S1 touch: Only 15.0% probability
Bias: Bullish continuation
Trade plan:
Favor long setups
Target R1 first (65.9% chance), then R2 (42.1%)
If R1 breaks, R2 becomes likely target
Shorting is low probability (only 15.0% reach S1)
Example 3: Opening in Golden Zone
Scenario: RTH opens at 20,393
PP: 20,400
GZ: 20,390-20,395
What the tables tell you:
Opening Zone: "IN_GZ" (rare, only 3.8% occurrence)
Bullish bias: 58.1%
GZ touch: 100% (guaranteed - already there)
PP touch: 75.3%
R1 touch: 41.9%
Trade plan:
Expect price to test PP (75.3% chance)
Slight bullish bias suggests long setups better than shorts
Watch how price reacts at PP - likely to continue to R1 (41.9%)
This is an uncommon opening, suggesting potential for larger moves
Best Practices
Match Your Instrument: Remember, statistics are NQ-specific. If trading other instruments, use the levels but disregard the statistical percentages.
Combine with Price Action: Use the statistics for probability context, not as standalone signals. Always confirm with price action, volume, and your trading methodology.
Adapt Table Display: Don't display all sections all the time. Toggle based on your trading phase:
Pre-market: Focus on "Gap Context" to understand the setup
Market open: Watch "Opening Zone Statistics" for directional bias
Intraday: Monitor "Current Session Info" for position tracking
Understand Context: A 60% touch rate doesn't mean guaranteed—it means 40% of days don't touch. Use these probabilities to size positions and manage expectations.
Inter-Pivot Golden Zones: These are most useful when price is already in motion toward a level. For example, if price breaks above PP heading to R1, the PP-R1 golden zone (60.8% touch rate) becomes a high-probability pullback area.
Time Awareness: The "Avg Time" statistics help you understand urgency. If it's 10:30 AM and S1 hasn't been touched (average is 55 minutes), the window for bearish moves is closing.
Technical Notes
Time Zone: All times referenced are NY/EST
Session Definition: RTH is 9:30 AM - 4:00 PM EST
Calculation Period: Pivots update daily based on previous 24-hour period (18:00 previous day to 17:00 current day)
Data Source: Statistics derived from 12 years of NQ 1-minute futures data (2013-2025)
Sample Size: 2,482 complete RTH trading sessions
Disclaimer
This indicator provides statistical probabilities based on historical NQ futures data. Past performance does not guarantee future results. The statistical tables are educational tools and should not be the sole basis for trading decisions. Always:
Use proper risk management
Combine with your own analysis
Understand that probabilities are not certainties
Remember that statistics are instrument-specific (NQ/MNQ only)
Credits
Statistical analysis performed using Python analysis of 12 years of historical NQ futures data. All pivot and golden zone calculations use standard mathematical formulas applicable to any instrument.
Statistics
GOLD QUANTUM MASTER🥇 GOLD QUANTUM MASTER 🥇
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
A high-performance technical analysis suite engineered for institutional-grade precision on Gold (XAUUSD) and Bitcoin (BTCUSD). This Core Edition focuses on raw analytical power without external API overhead.
🚀 KEY FEATURES:
• INSTITUTIONAL FOOTPRINT: Advanced volume-to-MA filters to identify "Big Money" participation.
• HTF REVERSAL SCANNER: Specialized logic for 30m, 1H, and 4H charts to detect Pinbar and Engulfing reversals.
• LIQUIDITY FLOW ANALYTICS: Detects and highlights Previous Day High (PDH) and Low (PDL) sweeps.
• TREND EXHAUSTION FILTERS: Built-in RSI divergence logic to prevent entries at trend peaks or bottoms.
• PREMIUM DATA LABELS: Real-time on-chart display of Signal Mode, Quality Score, and dynamic targets.
• NEON VISUAL SYSTEM: High-contrast, glassmorphic layout for maximum clarity during trading sessions.
BEST FOR: Technical Analysts, Manual Traders, and High-Performance Charting.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The best work on Higher time frames, I still not tested on lower time frames, but should be also precise.
Feel free to adjust the settings to your own needs.
Make your own decisions when you trade, do not put all confidence into a script, it may fail also.
TheStrat MasterThe Strat refers to a trading strategy that simplifies market analysis by focusing on price action and candlestick patterns. Here are some key points about The Strat:
Candlestick Patterns: The Strat categorizes price bars into Inside Bars, Directional Bars, and Outside Bars, which help traders identify potential trading opportunities.
1
Simple Rules: It emphasizes three main components: price action, direction, and time frame alignment, making it accessible for both new and experienced traders.
1
Decision-Making: The Strat provides a framework for making decisions based on price movements, reducing emotional trading and improving accuracy.
1
Educational Resources: There are various resources available, including cheat sheets and mentorship programs, to help traders learn and apply The Strat effectively.
1
For more detailed information, you can explore the resources provided in the results.
First Candle com TargetsThis Pine Script implements a "First Candle of the Day" breakout strategy with targets:
Strategy Logic:
Identifies the first hourly candle of each trading day
Calculates the high, low, and range (distance) of that candle
Draws four horizontal levels on the chart:
High level (red solid line)
Low level (green solid line)
Buy target (blue dashed): High + Daily Range
Sell target (purple dashed): Low - Daily Range
Generates signals when price breaks above/below these levels:
BUY signal: When price closes ABOVE the Buy target (High + Range)
SELL signal: When price closes BELOW the Sell target (Low - Range)
Visualizes all levels with labels showing exact price values
Key Features:
Uses 1-hour timeframe
Lines extend 500 bars forward from the first candle
Automatic cleanup and update of levels each new day
Includes alert conditions for automated trading notifications
Marks the first candle of each day with a blue label
Trading Approach:
Breakout long when price exceeds the first candle's high by its full daily range
Breakout short when price falls below the first candle's low by its full daily range
The strategy assumes the first candle's range establishes intraday volatility boundaries
Fifty Two Week Highs and Lows Displays 52-week highs and lows with percentage distance context, optional dashboard, and visual connections between successive new highs for long-term range awareness.
Fifty Two Week Highs and Lows
This indicator provides clear, objective context around price location within its 52-week range. It is designed to help users quickly assess how extended or compressed price is relative to its long-term highs and lows, without generating trade signals or placing orders.
What the indicator does
Calculates 52-week highs and lows using one of two reference definitions:
Daily (252 bars): Rolling high and low over a configurable number of daily bars, best suited for Daily charts.
Weekly (52 weeks): True weekly 52-week high and low values projected onto the active chart timeframe.
Displays a compact dashboard showing:
Percent below the 52-week high
Percent above the 52-week low
Both values are color-coded to provide immediate visual context.
Optionally draws lines connecting successive new 52-week highs, making sequences of higher highs easier to observe.
Alerts
Optional indicator alerts are included for:
New 52-week highs (Daily or Weekly mode)
Price entering defined distance zones relative to the 52-week high or low
All alerts are evaluated on confirmed bar close.
How to use
Add the indicator to any chart and select the preferred 52-week reference mode.
Use the dashboard values as context, not signals, to understand where price sits within its long-term range.
Enable alerts if you want notifications when price reaches specific distance thresholds.
Notes
In Weekly mode, values are derived from higher-timeframe weekly data and projected onto the active chart.
This script is an indicator only and does not place trades.
Educational and informational use only.
Lunch Hour Stats 1200 to 1300 NYSilver Futures Lunch Hour Statistics - how much does the price of silver fluctuate between the beginning of New York Lunch hour at 12 to 1pm. How often is it moving up vs down, by how much, etc.
PA Bar Count (First Edition)This script is written by FanFan.
It is designed to count price action bars and identify the bar number in a sequence.
The script helps traders track bar structure and improve PA analysis.
DERYA Dynamic Efficiency Regime Yield AnalyzerDERYA: Dynamic Efficiency Regime Yield Analyzer
Mathematical Concept and Problem Statement
Most traditional trend and momentum indicators (e.g., RSI, ADX, MACD) focus on price displacement across a series of bars. However, they are mathematically "blind" to the internal structure of each individual bar. The DERYA indicator solves the "Velocity Trap" and "Lagging Confirmation" issues by shifting the measurement space from price displacement to intrabar efficiency. It quantifies the ratio between net price progress and the total effort (range) expended within the bar.
Logic and Components
The script does not reuse any existing open-source library logic; the methodology is derived from original research. However, it utilizes standard built-in Pine Script functions for structural stabilization:
Efficiency Metaphor: The core logic calculates a proxy for microstructural health using the formula |Close - Close | / (High - Low).
Use of Exponential Moving Average (EMA): A standard ta.ema is applied to the raw efficiency data. Reason for use: Raw microstructural data is inherently noisy due to high-frequency fluctuations. The EMA is used here specifically as a low-pass filter to extract the underlying structural trend of efficiency without the overhead of more complex digital filters.
Use of Min-Max Normalization: The script utilizes ta.highest and ta.lowest over a lookback period. Reason for use: To convert an absolute efficiency metric into a bounded state variable (0-100). This ensures the indicator is adaptive to different volatility regimes, preventing the signal from becoming obsolete as market conditions change.
Interpretation
Expansion Regime (>60): Indicates a high-efficiency environment where price movement is achieved with minimal internal friction.
Collapse Regime (<40): Indicates a structural deterioration where price effort (range) significantly outweighs price progress (displacement), often signaling an imminent trend break.
Visual Integration: The script includes a barcolor feature that highlights bars where DERYA falls below 30, visually flagging points of extreme structural inefficiency directly on the price chart.
Compliance Note
This script is an original implementation of the DERYA methodology. It does not contain "copy-pasted" code from other public indicators. Standard functions (ta.ema, ta.highest, ta.lowest) are used only for their intended mathematical smoothing and normalization purposes as described above.
Scientific Documentation & Research Paper
This implementation is based on the following published research:
Title: DERYA: Dynamic Efficiency Regime Yield Analyzer - A New Microstructural State Variable for Financial Markets
Published on: Zenodo (CERN)
zenodo.org
DOI: 10.5281/zenodo.18181902
Author: Bülent Duman (Independent Researcher)
Copyright: (C) 2026 Bülent Duman
Cumulative % Change & Inflation-Adjusted (Auto CPI by Currency)This indicator tracks an asset’s cumulative performance from a user-defined start date (T0) and compares nominal returns with inflation-adjusted (“real”) returns, automatically selecting the appropriate CPI series based on the asset currency (USD or EUR).
What it shows
Nominal cumulative return (%) from T0, based on the selected price series.
Inflation change (%) from T0, using a monthly CPI index:
USD assets: US CPI (FRED CPIAUCSL)
EUR assets: Euro Area CPI (TradingView Economics EUCPI)
Real cumulative return (%) from T0, i.e., nominal return deflated by cumulative CPI.
Key inputs
T0 (start date): Year / month / day used as the reference point.
Asset currency (USD/EUR): Drives automatic CPI selection.
Initial capital: Starting value expressed in the asset’s currency; used to display current nominal and real (inflation-adjusted) portfolio value.
Performance ticker (optional): Lets you compute performance using a different symbol than the chart (e.g., a total-return series or an accumulating ETF). If left empty, the script uses the chart’s symbol.
Outputs
Plots
Nominal cumulative % change
Real (inflation-adjusted) cumulative % change
CPI % change
Summary table
Nominal return %
Real return %
CPI change %
Reference date (T0)
Initial value
Current nominal value
Current inflation-adjusted value
Performance ticker used
Notes
CPI is monthly, so the inflation line updates in steps.
If you use a price series that does not include dividends (standard “close”), nominal/real returns may underestimate total return for dividend-paying assets.
Silver vs S&P 500 (Rebased to 100) I have ensured that silver prices and the s&p 500 price are overlayed to give the common folk an understanding. The important part is that the prices are rebased in nature. i.e. if they both started at 100 from an n year which in this case is 1992.
NY VWAP 2std to 3std Probabilities + Exit ZonesHow it works:
Time buckets
Early: 10:30 – 12:00
Mid: 12:00 – 14:00
Late: 14:00 – 16:00
Bands
2σ band (s2up / s2dn) → this is where the “potential breakout” starts.
3σ band (s3up / s3dn) → this is the “target” for the 2→3σ move.
Counting logic
If during a given bucket, the price touches the 2σ band, it counts as a 2σ hit.
If after that, in the same bucket, the price also touches the 3σ band, it counts as a 3σ hit.
Probability calculation
\text{Probability 2→3σ} = \frac{\text{# of 3σ hits}}{\text{# of 2σ hits}} \times 100
For example, if in the late session the lower 2σ band is hit 10 times, and of those 10 times, 6 eventually hit the lower 3σ band, the script will show 60%.
Labels / lines
On the chart, Upper/Lower 2→3σ probabilities are displayed per bucket.
So yes: “Late Lower 2σ → 3σ: 60%” means: if price touches the lower 2σ band in the late session, historically, 60% of those touches continued to the 3σ band.
⚠ Important caveats:
These are historical probabilities, not predictions.
Small sample sizes in a bucket can make percentages unstable early in the day.
The script only counts session NY bars (0930–1600) and ignores pre-10:30 hits to reduce opening volatility noise.
Compression-to-Expansion Early Warning (CEEWS)The Compression → Expansion Early Warning System (CEEWS) is a volatility-structure and market-timing indicator designed to identify periods of statistical price compression and to signal when that compression transitions into directional expansion. Rather than predicting direction in advance, CEEWS focuses on detecting when price action becomes tightly constrained and then confirms when stored energy begins to release.
CEEWS quantifies compression using a composite of volatility contraction, range tightening, candle overlap, and reference-level convergence, producing a normalized Build score (0–100) that reflects the degree of latent price pressure. Elevated Build values indicate that the market is coiled and increasingly susceptible to movement, while expansion signals occur only when volatility begins to expand and price breaks from its recent range.
The indicator is intended as a timing and transition tool, not a standalone trend or directional system. CEEWS is most effective when paired with broader regime or trend-health indicators and is particularly well suited for index funds and highly liquid markets, where prolonged consolidation phases often precede sharp directional moves. Its primary purpose is to help traders identify when the market is likely to move, not to forecast where it will go.
Adjustable Price Line Size with Countdown Timer (Larger)Adjustable Size and Color for the Price Line and Timer so I Can See it Better From Across the Room...
Adjustments include: Price Line Width Size and Color (Small, Normal, Large, Huge)
Adjustment for: Solid Line, Dashed or Dotted Line
Countdown Timer: ON/OFF
I Can Now See The Price and Price Line From Across the Room!!
[GYTS] VolatilityToolkit LibraryVolatilityToolkit Library
🌸 Part of GoemonYae Trading System (GYTS) 🌸
🌸 --------- INTRODUCTION --------- 🌸
💮 What Does This Library Contain?
VolatilityToolkit provides a comprehensive suite of volatility estimation functions derived from academic research in financial econometrics. Rather than relying on simplistic measures, this library implements range-based estimators that extract maximum information from OHLC data — delivering estimates that are 5–14× more efficient than traditional close-to-close methods.
The library spans the full volatility workflow: estimation, smoothing, and regime detection.
💮 Key Categories
• Range-Based Estimators — Parkinson, Garman-Klass, Rogers-Satchell, Yang-Zhang (academically-grounded variance estimators)
• Classical Measures — Close-to-Close, ATR, Chaikin Volatility (baseline and price-unit measures)
• Smoothing & Post-Processing — Asymmetric EWMA for differential decay rates
• Aggregation & Regime Detection — Multi-horizon blending, MTF aggregation, Volatility Burst Ratio
💮 Originality
To the best of our knowledge, no other TradingView script combines range-based estimators (Parkinson, Garman-Klass, Rogers-Satchell, Yang-Zhang), classical measures, and regime detection tools in a single package. Unlike typical volatility implementations that offer only a single method, this library:
• Implements four academically-grounded range-based estimators with proper mathematical foundations
• Handles drift bias and overnight gaps, issues that plague simpler estimators in trending markets
• Integrates with GYTS FiltersToolkit for advanced smoothing (10 filter types vs. typical SMA-only)
• Provides regime detection tools (Burst Ratio, MTF aggregation) for systematic strategy integration
• Standardises output units for seamless estimator comparison and swapping
🌸 --------- ADDED VALUE --------- 🌸
💮 Academic Rigour
Each estimator implements peer-reviewed methodologies with proper mathematical foundations. The library handles aspects that are easily missed, e.g. drift independence, overnight gap adjustment, and optimal weighting factors. All functions include guards against edge cases (division by zero, negative variance floors, warmup handling).
💮 Statistical Efficiency
Range-based estimators extract more information from the same data. Yang-Zhang achieves up to 14× the efficiency of close-to-close variance, meaning you can achieve the same estimation accuracy with far fewer bars — critical for adapting quickly to changing market conditions.
💮 Flexible Smoothing
All estimators support configurable smoothing via the GYTS FiltersToolkit integration. Choose from 10 filter types to balance responsiveness against noise reduction:
• Ultimate Smoother (2-Pole / 3-Pole) — Near-zero lag; the 3-pole variant is a GYTS design with tunable overshoot
• Super Smoother (2-Pole / 3-Pole) — Excellent noise reduction with minimal lag
• BiQuad — Second-order IIR filter with quality factor control
• ADXvma — Adaptive smoothing based on directional volatility
• MAMA — Cycle-adaptive moving average
• A2RMA — Adaptive autonomous recursive moving average
• SMA / EMA — Classical averages (SMA is default for most estimators)
Using Infinite Impulse Response (IIR) filters (e.g. Super Smoother, Ultimate Smoother) instead of SMA avoids the "drop-off artefact" where volatility readings crash when old spikes exit the window.
💮 Plug-and-Play Integration
Standardised output units (per-bar log-return volatility) make it trivial to swap estimators. The annualize() helper converts to yearly volatility with a single call. All functions work seamlessly with other GYTS components.
🌸 --------- RANGE-BASED ESTIMATORS --------- 🌸
These estimators utilise High, Low, Open, and Close prices to extract significantly more information about the underlying diffusion process than close-only methods.
💮 parkinson()
The Extreme Value Method -- approximately 5× more efficient than close-to-close, requiring about 80% less data for equivalent accuracy. Uses only the High-Low range, making it simple and robust.
• Assumption: Zero drift (random walk). May be biased in strongly trending markets.
• Best for: Quick volatility reads when drift is minimal.
• Parameters: smoothing_length (default 14), filter_type (default SMA), smoothing_factor (default 0.7)
Source: Parkinson, M. (1980). The Extreme Value Method for Estimating the Variance of the Rate of Return. Journal of Business, 53 (1), 61–65. DOI
💮 garman_klass()
Extends Parkinson by incorporating Open and Close prices, achieving approximately 7.4× efficiency over close-to-close. Implements the "practical" analytic estimator (σ̂²₅) which avoids cross-product terms whilst maintaining near-optimal efficiency.
• Assumption: Zero drift, continuous trading (no gaps).
• Best for: Markets with minimal overnight gaps and ranging conditions.
• Parameters: smoothing_length (default 14), filter_type (default SMA), smoothing_factor (default 0.7)
Source: Garman, M.B. & Klass, M.J. (1980). On the Estimation of Security Price Volatilities from Historical Data. Journal of Business, 53 (1), 67–78. DOI
💮 rogers_satchell()
The drift-independent estimator correctly isolates variance even in strongly trending markets where Parkinson and Garman-Klass become significantly biased. Uses the formula: ln(H/C)·ln(H/O) + ln(L/C)·ln(L/O).
• Key advantage: Unbiased regardless of trend direction or magnitude.
• Best for: Trending markets, crypto (24/7 trading with minimal gaps), general-purpose use.
• Parameters: smoothing_length (default 14), filter_type (default SMA), smoothing_factor (default 0.7)
Source: Rogers, L.C.G. & Satchell, S.E. (1991). Estimating Variance from High, Low and Closing Prices. Annals of Applied Probability, 1 (4), 504–512. DOI
💮 yang_zhang()
The minimum-variance composite estimator — both drift-independent AND gap-aware. Combines overnight returns, open-to-close returns, and the Rogers-Satchell component with optimal weighting to minimise estimator variance. Up to 14× more efficient than close-to-close.
• Parameters: lookback (default 14, minimum 2), alpha (default 1.34, optimised for equities).
• Best for: Equity markets with significant overnight gaps, highest-quality volatility estimation.
• Note: Unlike other estimators, Yang-Zhang does not support custom filter types — it uses rolling sample variance internally.
Source: Yang, D. & Zhang, Q. (2000). Drift-Independent Volatility Estimation Based on High, Low, Open, and Close Prices. Journal of Business, 73 (3), 477–491. DOI
🌸 --------- CLASSICAL MEASURES --------- 🌸
💮 close_to_close()
Classical sample variance of logarithmic returns. Provided primarily as a baseline benchmark — it is approximately 5–8× less efficient than range-based estimators, requiring proportionally more data for the same accuracy.
• Parameters: lookback (default 14), filter_type (default SMA), smoothing_factor (default 0.7)
• Use case: Comparison baseline, situations requiring strict methodological consistency with academic literature.
💮 atr()
Average True Range -- measures volatility in price units rather than log-returns. Directly interpretable for stop-loss placement (e.g., "2× ATR trailing stop") and handles gaps naturally via the True Range formula.
• Output: Price units (not comparable across different price levels).
• Parameters: smoothing_length (default 14), filter_type (default SMA), smoothing_factor (default 0.7)
• Best for: Position sizing, trailing stops, any application requiring volatility in currency terms.
Source: Wilder, J.W. (1978). New Concepts in Technical Trading Systems . Trend Research.
💮 chaikin_volatility()
Rate of Change of the smoothed trading range. Unlike level-based measures, Chaikin Volatility shows whether volatility is expanding or contracting relative to recent history.
• Output: Percentage change (oscillates around zero).
• Parameters: length (default 10), roc_length (default 10), filter_type (default EMA), smoothing_factor (default 0.7)
• Interpretation: High values suggest nervous, wide-ranging markets; low values indicate compression.
• Best for: Detecting volatility regime shifts, breakout anticipation.
🌸 --------- SMOOTHING & POST-PROCESSING --------- 🌸
💮 asymmetric_ewma()
Differential smoothing with separate alphas for rising versus falling volatility. Allows volatility to spike quickly (fast reaction to shocks) whilst decaying slowly (stability). Essential for trailing stops that should widen rapidly during turbulence but narrow gradually.
• Parameters: alpha_up (default 0.1), alpha_down (default 0.02).
• Note: Stateful function — call exactly once per bar.
💮 annualize()
Converts per-bar volatility to annualised volatility using the square-root-of-time rule: σ_annual = σ_bar × √(periods_per_year).
• Parameters: vol (series float), periods (default 252 for daily equity bars).
• Common values: 365 (crypto), 52 (weekly), 12 (monthly).
🌸 --------- AGGREGATION & REGIME DETECTION --------- 🌸
💮 weighted_horizon_volatility()
Blends volatility readings across short, medium, and long lookback horizons. Inspired by the Heterogeneous Autoregressive (HAR-RV) model's recognition that market participants operate on different time scales.
• Default horizons: 1-bar (short), 5-bar (medium), 22-bar (long).
• Default weights: 0.5, 0.3, 0.2.
• Note: This is a weighted trailing average, not a forecasting regression. For true HAR-RV forecasting, it would be required to fit regression coefficients.
Inspired by: Corsi, F. (2009). A Simple Approximate Long-Memory Model of Realized Volatility. Journal of Financial Econometrics .
💮 volatility_mtf()
Multi-timeframe aggregation for intraday charts. Combines base volatility with higher-timeframe (Daily, Weekly, Monthly) readings, automatically scaling HTF volatilities down to the current timeframe's magnitude using the square-root-of-time rule.
• Usage: Calculate HTF volatilities via request.security() externally, then pass to this function.
• Behaviour: Returns base volatility unchanged on Daily+ timeframes (MTF aggregation not applicable).
💮 volatility_burst_ratio()
Regime shift detector comparing short-term to long-term volatility.
• Parameters: short_period (default 8), long_period (default 50), filter_type (default Super Smoother 2-Pole), smoothing_factor (default 0.7)
• Interpretation: Ratio > 1.0 indicates expanding volatility; values > 1.5 often precede or accompany explosive breakouts.
• Best for: Filtering entries (e.g., "only enter if volatility is expanding"), dynamic risk adjustment, breakout confirmation.
🌸 --------- PRACTICAL USAGE NOTES --------- 🌸
💮 Choosing an Estimator
• Trending equities with gaps: yang_zhang() — handles both drift and overnight gaps optimally.
• Crypto (24/7 trading): rogers_satchell() — drift-independent without the lag of Yang-Zhang's multi-period window.
• Ranging markets: garman_klass() or parkinson() — simpler, no drift adjustment needed.
• Price-based stops: atr() — output in price units, directly usable for stop distances.
• Regime detection: Combine any estimator with volatility_burst_ratio().
💮 Output Units
All range-based estimators output per-bar volatility in log-return units (standard deviation). To convert to annualised percentage volatility (the convention in options and risk management), use:
vol_annual = annualize(yang_zhang(14), 252) // For daily bars
vol_percent = vol_annual * 100 // Express as percentage
💮 Smoothing Selection
The library integrates with FiltersToolkit for flexible smoothing. General guidance:
• SMA: Classical, statistically valid, but suffers from "drop-off" artefacts when spikes exit the window.
• Super Smoother / Ultimate Smoother / BiQuad: Natural decay, reduced lag — preferred for trading applications.
• MAMA / ADXvma / A2RMA: Adaptive smoothing, sometimes interesting for highly dynamic environments.
💮 Edge Cases and Limitations
• Flat candles: Guards prevent log(0) errors, but single-tick bars produce near-zero variance readings.
• Illiquid assets: Discretisation bias causes underestimation when ticks-per-bar is small. Use higher timeframes for more reliable estimates.
• Yang-Zhang minimum: Requires lookback ≥ 2 (enforced internally). Cannot produce instantaneous readings.
• Drift in Parkinson/GK: These estimators overestimate variance in trending conditions — switch to Rogers-Satchell or Yang-Zhang.
Note: This library is actively maintained. Suggestions for additional estimators or improvements are welcome.
Growth DashboardThe Multi-Year Growth Dashboard provides a high-level snapshot of an asset’s historical performance directly on your chart. It calculates the total percentage growth for 1-year, 3-year, and 5-year periods based on exact calendar dates.
Unlike simple bar-counting scripts, this indicator uses a "Time-Capsule" logic:
- Calendar Precision: It calculates specific timestamps for 365, 1,095, and 1,825 days ago.
- Persistent Memory: Using the var keyword, the script scans historical bars and "captures" the closing price as it crosses those specific dates.
- Dividend Adjustment: It respects the chart's ADJ (Adjusted for Dividends) toggle, ensuring your total return figures are accurate for stocks like AAPL or MSFT.
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.
USDT: Market cap changeUSDT: Market Cap Change
This indicator tracks the market capitalization changes of major stablecoins (USDT, USDC, and DAI) to help identify capital flows in the cryptocurrency market.
Features:
Monitor daily and custom period market cap changes for selected stablecoins
Configurable stablecoin selection (USDT, USDC, DAI)
Adjustable lookback period for measuring market cap changes
Multiple moving average types (SMA, EMA, HMA, WMA, RMA) for trend analysis
Visual representation with columns for daily changes and area fill for custom period changes
How to Use:
The indicator displays two main metrics: daily market cap change (shown as columns) and custom period change (shown as a line with area fill). Positive values indicate capital inflow into stablecoins, which may suggest accumulation or risk-off sentiment. Negative values indicate capital outflow, potentially signaling deployment into other crypto assets.
The moving average overlay helps identify trends in stablecoin market cap changes over time.
Settings:
Select which stablecoins to track
Adjust the lookback period (default: 60 days)
Toggle and configure the moving average overlay
Customize MA type and length
Data Source:
Uses Glassnode market capitalization data for USDT, USDC, and DAI on a daily timeframe.
US Index Market Snapshot Cash, Futures & ETFsBrief Description
This study displays a real-time table of major U.S. equity indices—Dow Jones, S&P 500, Nasdaq, and Russell—across Cash, Futures, and ETF markets.
Each cell shows the current price along with the daily percentage change, with color-coded backgrounds for quick trend identification.
Designed as a compact market dashboard, it provides an at-a-glance view of cross-market alignment and relative performance.
Alternative Title Options
US Indices Dashboard (Cash • Futures • ETFs)
Index Market Matrix – Prices & Daily Change
Multi-Market US Index Table
FVG & OB [odnac]This indicator is a sophisticated tool designed for Smart Money Concepts (SMC) traders. It automates the detection of two critical institutional footprints: Order Blocks (OB) and Fair Value Gaps (FVG), with a focus on candle momentum and mitigation tracking.
Key Features
1. Advanced Momentum Filtering (3 Versions)
Unlike basic indicators, this script uses three different mathematical approaches to ensure the middle candle represents a "strong" move:
V1 (Body Focus): Compares the bodies of the surrounding candles to the middle candle.
V2 (Hybrid): Uses a mix of candle ranges and bodies to identify expansion.
V3 (Range Focus): The most aggressive filter; it ensures the total range of the middle candle dwarfs the surrounding candles.
2. Automatic Mitigation Tracking
The indicator doesn't just draw static boxes. It tracks price action in real-time:
Dynamic Extension: Boxes extend to the right automatically as long as price has not returned to "test" or "fill" the zone.
Smart Clean-up: Once the price touches the zone (Mitigation), the box stops extending or is removed. This keeps your chart clean and focused only on "fresh" (unmitigated) levels.
3. Smart Money Concept Integration
Order Blocks (White Boxes): Identifies where institutional buying or selling occurred before a strong move.
Fair Value Gaps (Yellow Boxes): Highlights price imbalances where the market moved too fast, leaving a gap that often acts as a magnet for future price action.
Technical Logic Breakdown
Detection Logic
The script looks at a 3-candle sequence:
Candle (The Origin): Defines the boundary of the OB or FVG.
Candle (The Expansion): Must be a "Strong Candle" based on your selected setting (V1, V2, or V3).
Candle (The Confirmation): Ensures that the "Tail Gap" condition is met (the wick of Candle 2 and Candle 0 do not touch).
Box Management
The script uses Pine Script Arrays to manage up to 500 boxes. It constantly loops through active boxes to check:
Time Limit: If a box exceeds the max_bars_extend limit, it is removed to save memory.
Price Touch: If low or high enters the box coordinates, the zone is considered "mitigated" and the extension stops.
Asia & London Session High/Low Description:
This indicator plots the highest and lowest points of the Asian and London trading sessions based on Eastern Time (ET).
Features:
Draws horizontal rays for session highs and lows
Automatically resets for each session
Perfect for I CT-style liquidity analysis , range breaks , and session-based trading setups
Clean chart : no labels or clutter, just the key session levels
Use it to identify liquidity zones , plan entries , and anticipate potential session raids in your trading strategy.
CFD Position Sizing Tool (ATR-Based)A visual dashboard is included. This is an ATR Designed robust position sizing calculator for the on the fly traders.






















