LO1_News2025H1Library "LO1_News2025H1"
Support Library for News Events
f_loadNewsRows()
f_loadExcSevByTypeId()
f_loadExcTagByTypeId()
f_loadExcDelayAfterNewsMins()
Wskaźniki i strategie
LO1_News2024H2Library "LO1_News2024H2"
Support Library for News Events
f_loadNewsRows()
f_loadExcSevByTypeId()
f_loadExcTagByTypeId()
f_loadExcDelayAfterNewsMins()
Legacy Lab FX Pro [Ultra]Legacy Lab FX Pro is a comprehensive trading system designed to automate the detection of institutional liquidity sweeps during the New York Session. Built on the logic that "breakouts" during specific time windows are often liquidity traps, this tool helps traders identify high-probability reversals at the 8:00 AM EST Open.
1. The Methodology: The London Sweep
The core logic of this indicator is based on time-segmented price action. It tracks the specific "Liquidity Build" phase established during the London Session (default 02:00 – 07:00 EST).
The Trap: Retail traders often place stop losses just above or below this range.
The Sweep: Institutions push price past these levels to collect liquidity before reversing.
The Logic: The indicator waits for a "Sweep" (a wick that breaks the range but closes back inside) during the Execution Window (08:00 – 12:00 EST).
2. Key Features
A. Visual Liquidity Ranges The script automatically highlights the specific Highs and Lows of the London session with an Orange Liquidity Box. This removes the need to manually draw lines or calculate time zones.
B. "Gold Candle" Confirmation When a valid sweep occurs that meets all filter criteria (ATR, Trend, Time), the signal candle is painted GOLD. This serves as a visual execution trigger.
C. Integrated Risk Management The indicator projects a fixed, rule-based risk framework onto the chart:
Stop Loss (Red): Fixed pip distance (Default: 10 pips) from the sweep level.
TP1 (Green): 0.8R (Conservative banking).
TP2 (Green): 1.6R (Standard target).
TP3 (Green): 2.4R (Extended institutional target).
D. Smart Data Dashboard The bottom-right panel provides real-time backtesting data for the current chart. It features a unique "Best Reached" logic, which calculates the maximum potential R-multiple of every signal (e.g., if price hits TP2 then reverses, it is recorded as a +1.6R win rather than a loss).
Win Rate %
Net R (Return on Risk)
Total Trade Count
3. Institutional Filters
To prevent false signals during high-volatility news events or strong trends, the script includes:
ATR Filter: Rejects signals if the candle is abnormally large (Volatility protection).
Trend Filter: Optional 200 EMA filter to only take trades in the direction of the long-term trend.
Sweep Size: Configurable minimum pip distance required for a sweep to be valid.
4. How to Use
Timezone: Ensure your chart is set to New York time (or adjust the settings to match your local time).
Wait: Allow the Orange Liquidity Box to form (2am-7am).
Signal: Wait for a Gold Candle to appear during the 8am-12pm window.
Execute: Enter at the close of the Gold Candle. Place SL at the Red Line and TPs at the Green Lines.
5. Settings Configuration
Session Timing: fully customizable start/end times for the range and the entry window.
Risk Protocol: Adjust the fixed SL pips and R-Multiples for TP1, TP2, and TP3.
Backtest Engine: Toggle between "TP1 Only" mode (conservative stats) or "Best Reached" mode (maximum potential stats).
This script is Invite-Only. It is the official tool of the Legacy Lab FX trading community. Access is granted to members to ensure proper understanding of the liquidity protocols used within the code.
TL HITL v3.3 (Pine v6) Bespoke Dynamic Trendline Alerts Indicator - you're free to take a look at it, but I'm only publishing it so I can access it from external workflows that are activated by webhook alerts
LO1_NewsTypesLibrary "LO1_NewsTypes" -
Support library for news system, allow selectable news events.
f_hhmmToMs(_hhmm)
Parameters:
_hhmm (int)
f_addNews(_d, _hhmm, _tid, _dArr, _tArr, _idArr)
Parameters:
_d (string)
_hhmm (int)
_tid (int)
_dArr (array)
_tArr (array)
_idArr (array)
f_addNewsMs(_d, _ms, _tid, _dArr, _tArr, _idArr)
Parameters:
_d (string)
_ms (int)
_tid (int)
_dArr (array)
_tArr (array)
_idArr (array)
f_loadTypeSevByTypeId()
LO1_TradersPostLibrary "LO1_TradersPost"
Enhanced TradersPost integration library with comprehensive order management
_buildJSONField(key, value, required)
Build a JSON field with proper handling of required vs optional fields
Parameters:
key (string) : The JSON key name
value (string) : The value to include (any type, will be converted to string)
required (bool) : If true, field is always included even if value is na/empty
Returns: String containing JSON field or empty string if optional and na/empty
_buildConditionalField(key, value)
Build a conditional JSON field that's only included if value is valid
Parameters:
key (string) : The JSON key name
value (string) : The value to include
Returns: String containing JSON field or empty string if value is na/empty
_buildConditionalNumericField(key, value)
Build a conditional JSON field for numeric values
Parameters:
key (string) : The JSON key name
value (float) : The numeric value
Returns: String containing JSON field or empty string if value is na
_buildNestedObject(objectType, price, amount, percent, stopType, limitPrice, trailAmount, trailPercent)
Build nested JSON objects for takeProfit/stopLoss
Parameters:
objectType (string) : The type of object being built ("takeProfit" or "stopLoss")
price (float) : The limit price for TP or stop price for SL
amount (float) : The dollar amount (optional)
percent (float) : The percentage (optional)
stopType (series StopLossType) : The stop loss type - only for stopLoss
limitPrice (float) : The limit price for stop_limit orders - only for stopLoss
trailAmount (float) : Trailing amount for trailing stops - only for stopLoss
trailPercent (float) : Trailing percent for trailing stops - only for stopLoss
Returns: String containing nested JSON object or empty string if no valid data
_validateAndBuildJSON(ticker, action, quantity, quantityType, orderType, sentiment, cancel, timeInForce, limitPrice, stopPrice, trailAmount, trailPercent, takeProfitPrice, takeProfitAmount, takeProfitPercent, stopLossPrice, stopLossAmount, stopLossPercent, stopLossType, stopLossLimitPrice, extendedHours, optionType, intrinsicValue, expiration, strikePrice, signalPrice, comment)
Master JSON builder that validates parameters and constructs JSON
Parameters:
ticker (string) : The trading symbol
action (series Action) : The order action (buy, sell, exit, etc.)
quantity (float) : The order quantity
quantityType (series QuantityType) : The type of quantity (fixed, dollar, percent)
orderType (series OrderType) : The order type (market, limit, stop, etc.)
sentiment (series Sentiment) : The position sentiment (long, short, flat) - optional
cancel (bool) : Controls order cancellation (true = cancel existing orders, false = don't cancel)
timeInForce (series TimeInForce) : Time in force for the order (DAY, GTC, IOC, FOK)
limitPrice (float) : Price for limit orders
stopPrice (float) : Price for stop orders
trailAmount (float) : Trailing amount for trailing stops
trailPercent (float) : Trailing percent for trailing stops
takeProfitPrice (float) : Take profit limit price (absolute)
takeProfitAmount (float) : Take profit dollar amount (relative)
takeProfitPercent (float) : Take profit percentage (relative)
stopLossPrice (float) : Stop loss price (absolute)
stopLossAmount (float) : Stop loss dollar amount (relative)
stopLossPercent (float) : Stop loss percentage (relative)
stopLossType (series StopLossType) : Stop loss order type
stopLossLimitPrice (float) : Limit price for stop_limit orders
extendedHours (bool) : Enable extended hours trading (boolean)
optionType (series OptionType) : Option type for options trading (both/call/put)
intrinsicValue (series IntrinsicValue) : Intrinsic value filter for options (itm/otm)
expiration (string) : Option expiration (date string)
strikePrice (float) : Option strike price
signalPrice (float) : The market price at alert time (for slippage tracking)
comment (string) : Optional comment for the order (shows in TradersPost UI for debugging)
Returns: ErrorResponse with success status and JSON string or error details
ValidateOrder(ticker, action, orderType, limitPrice, stopPrice)
Validate order parameters before JSON construction
Parameters:
ticker (string) : Trading symbol
action (series Action) : Order action
orderType (series OrderType) : Order type (market, limit, stop, etc.)
limitPrice (float) : Limit price for limit orders
stopPrice (float) : Stop price for stop orders
Returns: ErrorResponse with validation results
ValidateQuantity(quantity, quantityType)
Validate quantity based on type and constraints
Parameters:
quantity (float) : The quantity value
quantityType (series QuantityType) : The type of quantity
Returns: ErrorResponse with validation results
ValidatePrices(entryPrice, stopPrice, takeProfitPrice, action)
Validate price relationships and values
Parameters:
entryPrice (float) : Entry price for the order
stopPrice (float) : Stop loss price
takeProfitPrice (float) : Take profit price
action (series Action) : Order action (buy/sell)
Returns: ErrorResponse with validation results
ValidateSymbol(ticker)
Validate trading symbol format
Parameters:
ticker (string) : The symbol to validate
Returns: ErrorResponse with validation results
CombineValidationResults(validationResults)
Create validation error collection and reporting system
Parameters:
validationResults (array) : Array of ErrorResponse objects from multiple validations
Returns: Combined ErrorResponse with all validation results
ValidateCompleteOrder(ticker, action, quantity, quantityType, orderType, limitPrice, stopPrice, takeProfitPrice)
Comprehensive validation for all order parameters
Parameters:
ticker (string) : Trading symbol
action (series Action) : Order action
quantity (float) : Order quantity
quantityType (series QuantityType) : Type of quantity
orderType (series OrderType) : Order type
limitPrice (float) : Limit price (optional)
stopPrice (float) : Stop price (optional)
takeProfitPrice (float) : Take profit price (optional)
Returns: ErrorResponse with complete validation results
CreateErrorResponse(success, errorMessages, message, severity, context, functionName)
Create standardized error response
Parameters:
success (bool) : Whether the operation succeeded
errorMessages (array) : Array of error messages
message (string) : Summary message
severity (series ErrorSeverity) : Error severity level
context (string) : Context where error occurred
functionName (string) : Name of function that generated error
Returns: EnhancedErrorResponse with all error details
HandleValidationError(validationResult, context, functionName)
Handle validation errors with context
Parameters:
validationResult (ErrorResponse) : The validation result to handle
context (string) : Description of what was being validated
functionName (string) : Name of calling function
Returns: Processed error response with enhanced context
LogError(errorResponse, displayOnChart)
Log error with appropriate level
Parameters:
errorResponse (EnhancedErrorResponse) : The error response to log
displayOnChart (bool) : Whether to show error on chart
CreateSuccessResponse(message, context, functionName)
Create success response
Parameters:
message (string) : Success message
context (string) : Context of successful operation
functionName (string) : Name of function
Returns: Success response
_validateJSONConstruction(jsonString)
Validate JSON construction and handle malformed data
Parameters:
jsonString (string) : The constructed JSON string
Returns: ErrorResponse indicating if JSON is valid
CreateDetailedError(success, errors, warnings, severity, context)
Create detailed error response with context
Parameters:
success (bool) : Operation success status
errors (array) : Array of error messages
warnings (array) : Array of warning messages
severity (series ErrorSeverity) : Error severity level
context (string) : Context where error occurred
Returns: DetailedErrorResponse object
LogDetailedError(response)
Log detailed error response with appropriate severity
Parameters:
response (DetailedErrorResponse) : DetailedErrorResponse to log
Returns: Nothing - logs to Pine Script console
CombineIntoDetailedResponse(responses, context)
Combine multiple error responses into detailed response
Parameters:
responses (array) : Array of ErrorResponse objects to combine
context (string) : Context for the combined operation
Returns: DetailedErrorResponse with combined results
SendAdvancedOrder(ticker, action, quantity, quantityType, orderType, sentiment, cancel, limitPrice, stopPrice, trailAmount, trailPercent, takeProfitPrice, takeProfitAmount, takeProfitPercent, stopLossPrice, stopLossAmount, stopLossPercent, stopLossType, stopLossLimitPrice, extendedHours, optionType, intrinsicValue, expiration, strikePrice, signalPrice, comment)
Send advanced order with comprehensive parameter validation and JSON construction
Parameters:
ticker (string) : Symbol to trade (defaults to syminfo.ticker)
action (series Action) : Order action (buy/sell/exit/cancel/add)
quantity (float) : Order quantity
quantityType (series QuantityType) : Type of quantity (fixed/dollar/percent)
orderType (series OrderType) : Type of order (market/limit/stop/stop_limit/trailing_stop)
sentiment (series Sentiment) : Position sentiment (long/short/flat, optional)
cancel (bool) : Controls order cancellation (true = cancel existing, false = don't cancel, na = use defaults)
limitPrice (float) : Limit price for limit orders
stopPrice (float) : Stop price for stop orders
trailAmount (float) : Trailing amount for trailing stops
trailPercent (float) : Trailing percent for trailing stops
takeProfitPrice (float) : Take profit limit price (absolute)
takeProfitAmount (float) : Take profit dollar amount (relative)
takeProfitPercent (float) : Take profit percentage (relative)
stopLossPrice (float) : Stop loss price (absolute)
stopLossAmount (float) : Stop loss dollar amount (relative)
stopLossPercent (float) : Stop loss percentage (relative)
stopLossType (series StopLossType) : Stop loss order type
stopLossLimitPrice (float) : Limit price for stop_limit orders
extendedHours (bool) : Enable extended hours trading (boolean)
optionType (series OptionType) : Option type for options trading (both/call/put)
intrinsicValue (series IntrinsicValue) : Intrinsic value filter for options (itm/otm)
expiration (string) : Option expiration (date string)
strikePrice (float) : Option strike price
signalPrice (float) : The market price at alert time (for slippage tracking)
comment (string) : Optional comment for the order (shows in TradersPost UI for debugging)
Returns: ErrorResponse with success status and JSON or error details
SendSentiment(ticker, sentiment, quantity, quantityType, signalPrice, comment)
Send sentiment-based position management order
Parameters:
ticker (string) : Symbol to manage (defaults to syminfo.ticker)
sentiment (series Sentiment) : Target position sentiment (long/short/flat)
quantity (float) : Position size (optional, uses account default if not specified)
quantityType (series QuantityType) : Type of quantity specification
signalPrice (float) : The market price at alert time (for slippage tracking)
comment (string) : Optional comment
Returns: ErrorResponse with success status
SendCancelAll(ticker, comment)
Cancel all open orders for the specified symbol
Parameters:
ticker (string) : Symbol to cancel orders for (defaults to syminfo.ticker)
comment (string) : Optional comment for the cancellation
Returns: ErrorResponse with success status
SendOrderNoCancelExisting(ticker, action, quantity, quantityType, orderType, sentiment, limitPrice, stopPrice, takeProfitPrice, takeProfitAmount, takeProfitPercent, stopLossPrice, stopLossAmount, stopLossPercent, stopLossType, stopLossLimitPrice, signalPrice, comment)
Send order without canceling existing orders
Parameters:
ticker (string) : Symbol to trade (defaults to syminfo.ticker)
action (series Action) : Order action (buy/sell/exit)
quantity (float) : Order quantity
quantityType (series QuantityType) : Type of quantity (fixed/dollar/percent)
orderType (series OrderType) : Type of order (market/limit/stop/stop_limit)
sentiment (series Sentiment) : Position sentiment (long/short/flat, optional)
limitPrice (float) : Limit price for limit orders
stopPrice (float) : Stop price for stop orders
takeProfitPrice (float) : Take profit price
takeProfitAmount (float) : Take profit amount (optional)
takeProfitPercent (float)
stopLossPrice (float) : Stop loss price
stopLossAmount (float) : Stop loss amount (optional)
stopLossPercent (float) : Stop loss percentage (optional)
stopLossType (series StopLossType) : Stop loss order type
stopLossLimitPrice (float) : Limit price for stop_limit orders
signalPrice (float) : The market price at alert time (for slippage tracking)
comment (string) : Optional comment
Returns: ErrorResponse with success status
_buildBracketOrderParams(orderType, entryPrice, entryLimitPrice)
Build bracket order parameters by routing entryPrice to correct parameter based on orderType
This helper function maps the conceptual "entryPrice" to the technical parameters needed
Parameters:
orderType (series OrderType) : The order type for the entry order
entryPrice (float) : The desired entry price (trigger for stops, limit for limits)
entryLimitPrice (float) : The limit price for stop_limit orders (optional)
Returns: array with correct routing
SendBracketOrder(ticker, action, quantity, quantityType, orderType, entryPrice, entryLimitPrice, takeProfitPrice, stopLossPrice, takeProfitAmount, takeProfitPercent, stopLossAmount, stopLossPercent, stopLossType, stopLossLimitPrice, signalPrice, comment)
Send bracket order (entry + take profit + stop loss)
Parameters:
ticker (string) : Symbol to trade
action (series Action) : Entry action (buy/sell)
quantity (float) : Order quantity
quantityType (series QuantityType) : Type of quantity specification
orderType (series OrderType) : Type of entry order
entryPrice (float) : Entry price (trigger price for stop orders, limit price for limit orders)
entryLimitPrice (float) : Entry limit price (only for stop_limit orders, defaults to entryPrice if na)
takeProfitPrice (float) : Take profit price
stopLossPrice (float) : Stop loss price
takeProfitAmount (float) : Take profit dollar amount (alternative to price)
takeProfitPercent (float) : Take profit percentage (alternative to price)
stopLossAmount (float) : Stop loss dollar amount (alternative to price)
stopLossPercent (float) : Stop loss percentage (alternative to price)
stopLossType (series StopLossType) : Stop loss order type
stopLossLimitPrice (float) : Limit price for stop_limit orders
signalPrice (float) : The market price at alert time (for slippage tracking)
comment (string) : Optional comment
Returns: ErrorResponse with success status
SendOTOOrder(primaryTicker, primaryAction, primaryQuantity, primaryOrderType, primaryPrice, secondaryTicker, secondaryAction, secondaryQuantity, secondaryOrderType, secondaryPrice, signalPrice, comment)
Send One-Triggers-Other (OTO) order sequence
Note: OTO linking must be configured in TradersPost strategy settings
This sends two separate orders - TradersPost handles the OTO logic
Parameters:
primaryTicker (string) : Primary order ticker
primaryAction (series Action) : Primary order action
primaryQuantity (float) : Primary order quantity
primaryOrderType (series OrderType) : Primary entry type
primaryPrice (float) : Primary order price
secondaryTicker (string) : Secondary order ticker (defaults to primary ticker)
secondaryAction (series Action) : Secondary order action
secondaryQuantity (float) : Secondary order quantity
secondaryOrderType (series OrderType) : Secondary entry type
secondaryPrice (float) : Secondary order price
signalPrice (float) : The market price at alert time (for slippage tracking)
comment (string) : Optional comment for both orders
Returns: ErrorResponse with success status
SendOCOOrder(ticker, firstAction, firstQuantity, firstOrderType, firstPrice, secondAction, secondQuantity, secondOrderType, secondPrice, signalPrice, comment)
Send One-Cancels-Other (OCO) order pair
Note: OCO linking must be configured in TradersPost strategy settings
This sends two separate orders - TradersPost handles the OCO logic
Parameters:
ticker (string) : Symbol for both orders
firstAction (series Action) : Action for first order
firstQuantity (float) : Quantity for first order
firstOrderType (series OrderType) : Order type for first order
firstPrice (float) : Price for first order
secondAction (series Action) : Action for second order
secondQuantity (float) : Quantity for second order
secondOrderType (series OrderType) : Order type for second order
secondPrice (float) : Price for second order
signalPrice (float) : The market price at alert time (for slippage tracking)
comment (string) : Optional comment
Returns: ErrorResponse with success status
ErrorResponse
Fields:
success (series bool)
errors (array)
message (series string)
EnhancedErrorResponse
Fields:
success (series bool)
errors (array)
message (series string)
severity (series ErrorSeverity)
context (series string)
timestamp (series int)
functionName (series string)
DetailedErrorResponse
Fields:
success (series bool)
errors (array)
warnings (array)
severity (series ErrorSeverity)
context (series string)
message (series string)
ORB Asia London NYThis script plots the highs & lows of all three market sessions Asia, London, and NY. in UTC The time frames can be adjusted to you're own ORB strategy.
The time period of opening range & the max timeframe to display it on can be adjusted from the settings.
So for eg. if want to use 15m NY ORB to trade, then set "NY time " as 14:30-14:45
Volumetrix Mean Reversion [by Oberlunar] VolumeTRIX Mean Reversion is a volume-oriented mean-reversion and confirmation indicator built around one core principle: reversal opportunities become higher quality when “price stretch” is not just visible on one feed, but confirmed across venues and supported by internal market pressure.
Mean reversion is often explained with the “rubber band” metaphor, but in real trading, it’s more concrete than that. When price runs too far from a working equilibrium, the market tends to accumulate imbalances: liquidity gets thin in spots, inventories get skewed, and positioning becomes one-sided. Very often, the next meaningful move is not continuation, but a repair move—price coming back toward areas where business was actually done. That doesn’t mean the market must revert every time. It means that when displacement becomes extreme, reversion becomes *plausible*, and sometimes structurally incentivised.
This is why Volumetrix does not treat a single overbought/oversold trigger as a trade. It treats mean reversion as a multi-factor event that needs alignment.
The first pillar is multi-venue consensus. The script can track the same instrument across up to five brokers/exchanges and look for agreement. In crypto and CFDs, a large portion of “signals” are simply microstructure artefacts: isolated wicks, temporary dislocations, exchange-specific liquidity holes, short-lived imbalances.
I believe that a stretch that shows up on one venue may be noise; a stretch that shows up across venues at the same time is far more likely to be structural.
The second pillar is how the indicator defines “stretch.” Volumetrix intentionally blends different families of mean-reversion logic because each one captures a different way markets deviate from equilibrium. Statistical displacement (think Z-score) asks how far the price has moved away from its recent average in volatility units. Anchored equilibrium (VWAP) asks whether the price is trading away from a fair value built on *where volume actually traded*.
Volatility envelopes (Keltner-style bands) translate stretch into something regime-aware: what is “far” in a quiet market is not “far” in a fast one. None of these views is perfect alone, but together they describe displacement in a much more robust way than a single oscillator.
Then comes the part most traders miss: mean reversion is not just a distance problem, it’s a *regime* problem. That is where the Ornstein–Uhlenbeck idea matters. OU is the textbook mean-reverting process: deviations don’t just wander, they tend to be pulled back toward an equilibrium, and the strength of that pull defines how “elastic” the market feels. In trading terms, some environments punish deviations quickly; other environments reward drift and make reversals late and painful.
VolumeTRIX Mean Reversion uses an OU-style bias to estimate that temperament, so the script is not only asking “are we stretched?”, but also “does this market currently behave like it wants to revert, or like it’s comfortable drifting?”
From there, Volumetrix combines four perspectives (the “lanes”) into a single directional decision. The mean-reversion trust lane quantifies stretch and converts it into a normalised confidence. The OU lane adds the regime lens—how mean-reverting the market appears right now. TRIX adds momentum context because fading a move while momentum is still expanding is one of the fastest ways to get chopped up. Finally, the volumetric pressure gate looks at internal buy/sell pressure and asks a practical question: is the move still being *defended*, or is dominance starting to fade?
The real edge is not in any one component. The edge is in how they are forced to agree. Volumetrix allows you to determine the level of strictness in the agreement (All / Majority / Any). That’s an ensemble approach: each lane can be wrong, but they tend to be mistaken in different conditions. When multiple independent views of the market line up, you’re filtering for moments where the signal is less likely to be random and more likely to reflect an actual imbalance that can unwind.
So the question I'm trying to answer with this indicator is simple, and trader-practical: “Are we stretched across venues, is the current regime compatible with reversion (OU-style), is momentum no longer dominating (TRIX), and is volume pressure no longer supporting continuation?” When those answers align, the odds of a usable reversal improve.
Operationally, signals print only on confirmed bars and are hard-constrained to the most liquid global sessions (London and US), because mean-reversion quality tends to degrade in thin windows and produce low-quality signals.
The indicator also includes an internal forward-stat tracker that estimates how often signals reach a reasonable target move within a maximum number of bars. It is not a strategy backtest, and it doesn’t simulate compounding; it’s a calibration tool to compare settings and understand expectancy behaviour without guessing.
As always, this is an indicator, not financial advice. Mean reversion can fail hard in expansion regimes, so risk management and context always come first.
Enjoy!
Oberlunar 👁★
FVVO Oscillator 2.0 [RayAlgo]RayAlgo Flux Velocity & Volume Oscillator 2.0 (FVVO)
Premium volatility bands • Fisher-normalized momentum • Volume-weighted flow • Divergences • Sniper vertices • Pressure Burst diamonds • Momentum Ribbon
FVVO is a purpose-built oscillator designed to visualize momentum “flow” with a smooth, liquid core line while highlighting statistically meaningful extremes, turning-point vertices, and divergence-based momentum shifts. The 2.0 build focuses on signal clarity (infrequent event markers + full alert suite).
Core Concept (What this oscillator measures)
FVVO combines:
Normalized momentum (range-normalized + Fisher transform) to make momentum swings more readable.
Optional relative-volume weighting to slightly amplify momentum when volume supports the move.
Dynamic volatility bands around the oscillator mean (volatility-adaptive “overbought/oversold” context).
Vertex logic (“Sniper” dots) that marks local turning points only when the oscillator has stretched into band extremes.
What you see on the chart
1) Flux Oscillator (main line)
A smooth momentum stream that reacts to directional strength while avoiding noisy micro-flips as much as possible.
2) Volatility Bands
Three styles:
Minimal – subtle channel
Flag – inner/outer structure for cleaner “zone reading”
Glow – layered gradient feel toward extremes + optional edge glow
3) Sniper Dots (Turning-point vertices)
Bull sniper dot prints when a local bottom forms after oversold stretch.
Bear sniper dot prints when a local top forms after overbought stretch.
4) Divergence Engine (Regular divergence)
Bullish divergence: price makes a lower low while oscillator makes a higher low
Bearish divergence: price makes a higher high while oscillator makes a lower high
Divergences are drawn with dashed lines + “DIV” label.
5) Pressure Burst Diamonds
Detects COMPRESSION → EXPANSION transitions in oscillator velocity.
They are calculated by measuring the bar-to-bar velocity of the oscillator and comparing it to its own recent average. When oscillator velocity stays below a compression threshold, momentum is considered compressed. When velocity then expands above an expansion threshold, a burst event is triggered.
Prints a diamond symbol:
Bull diamond (cyan) when above the oscillator mean
Bear diamond (pink) when below the oscillator mean
Think of these as “energy released” moments—useful for breakout continuation or reversal readiness depending on context.
6) Momentum Ribbon (top/bottom strip)
A lightweight regime strip showing direction + strength:
Becomes more visible as the oscillator stretches away from its mean/bands.
Can be placed at the Top or Bottom of the pane.
How to Use (practical workflow)
A) Trend + Momentum Context
Treat the oscillator mean / zero area as a regime guide.
Stronger “impulses” often appear when the oscillator pushes toward band extremes.
B) Sniper Dots = “confirmed vertex at an extreme”
Best used as a timing trigger, not as a standalone strategy.
Higher confidence when aligned with:
Market structure / trend direction
Support/resistance
Higher timeframe bias
C) Divergence = “momentum disagreement”
Use divergences as an early warning, then look for confirmation (structure break, candle confirmation, etc.).
D) Pressure Burst Diamonds = “compression release”
Use as an event marker:
In trends: can signal continuation momentum returning.
Near key levels: can signal a meaningful “decision moment”.
Settings Guide:
Signal Smoothing: main control for reactivity (higher = smoother)
Weight by Relative Volume: boosts/dampens oscillator slightly based on rVOL
Band Style / Multipliers: controls your volatility envelope behavior
Divergence pivots: controls divergence strictness (higher = fewer, cleaner)
Burst thresholds: controls how selective burst events are
Ribbon contrast: visual strength indicator
Alerts (Full suite included)
Sniper Buy / Sniper Sell
Bullish Divergence / Bearish Divergence
Burst Release (Compression → Expansion)
Bull Burst / Bear Burst (directional burst variants)
Notes & Best Practices
No oscillator is perfect in chop—combine signals with structure, levels, and HTF bias.
Divergences can persist; treat them as probabilities, not guarantees.
Disclaimer
This indicator is an analytical and educational tool only. It does not provide financial advice or trade recommendations. All signals, levels, and visual elements are meant to assist in market analysis and must be used alongside proper risk management and independent decision-making. Trading involves risk, and past performance does not guarantee future results.
All-in-one trend clarityTrendLens is a multi-layer, all-in-one overlay indicator designed to visually detect and filter market direction — not a buy/sell strategy.
It highlights early trend shifts based on candle behavior, then supports that view using Pivot High/Low structure, three customizable EMAs, and a visible daily session window to focus on active market hours.
What’s included (All inside one indicator)
Structural Trend Candles
If price closes above the highest high of the previous N bars → candle turns white (bullish structural breakout).
If price closes below the lowest low of the previous N bars → candle turns black (bearish structural breakdown).
Pivot High / Pivot Low Markers
Detects swing highs/lows using adjustable left/right bars (default 7) and plots small gray triangle markers on the chart.
Active Session Window
Highlights a fixed daily time window (default 06:00–18:00 UTC) with a transparent green background to visually mark the active trading session.
3 Customizable EMAs
EMA Fast (default 10)
EMA Mid (default 20)
EMA Long (default 100)
Each EMA supports custom length, source, color, and thickness.
How to use it
Use white/black candles as a quick trend filter and early structure shift cue.
Use EMA100 as the main trend bias reference; use EMA10/EMA20 positioning to gauge momentum.
Use Pivot High/Low to spot structure levels for potential support/resistance and risk management.
Enable the session highlight to focus analysis on high-activity hours.
Disclaimer
This indicator is a technical analysis helper, not a trading strategy.
It does not provide buy/sell recommendations. You are responsible for your own trade decisions and risk management.
UTC Daily High / Low Tracker (UTC Anchored)This indicator will track the Daily high and low AKA daily range of each day using UTC (00:00)
NWOG & NDOG Dynamic GapsThis indicator is designed for Price Action and ICT traders who need to track New Week Opening Gaps (NWOG) and New Day Opening Gaps (NDOG) without cluttering their charts.
Unlike standard gap indicators that leave static boxes behind, this script features Dynamic Mitigation Logic. As price trades into the open gap, the box automatically shrinks in real-time to show only the remaining, unfilled portion of the gap. Once a gap is fully closed (filled to the tick), it is automatically removed from the chart.
Key Features:
- Smart Detection: Automatically identifies gaps at the daily (NDOG) and weekly (NWOG) open.
- Dynamic Shrinking: The gap box updates on every bar. If price wicks into the gap, the box resizes to reflect the new support/resistance level.
- Clean Chart: Gaps are deleted immediately upon full closure.
- Priority Logic: Weekly gaps take precedence over daily gaps to prevent overlapping visuals.
Advanced Scalping Suite v1.0# Advanced Scalping Suite - Quick Reference Guide
## Overview
A comprehensive all-in-one scalping indicator designed for 1-15 minute timeframes that combines multiple technical analysis tools, intelligent signal generation, and automatic market condition detection to help traders identify high-probability entry and exit points.
---
## Core Capabilities
### 1. **Multi-Indicator Analysis**
- **RSI (Relative Strength Index)** - Identifies overbought/oversold conditions with automatic divergence detection for early reversal warnings
- **EMA Ribbon (8/21/55)** - Visual trend identification with color-coded fills showing trend direction and strength
- **VWAP (Volume Weighted Average Price)** - Tracks institutional interest and intraday bias
- **ATR (Average True Range)** - Measures market volatility and filters out low-volatility periods
- **ADX (Average Directional Index)** - Quantifies trend strength (>25 = trending, <25 = range-bound)
- **Higher Timeframe Trend Confirmation** - Aligns trades with larger market direction
### 2. **Intelligent Signal Generation**
The indicator provides three tiers of buy/sell signals:
**STRONG Signals** (3+ confirmations)
- High-probability setups combining RSI extremes, divergences, VWAP position, EMA alignment, and chart patterns
- Best for conservative traders and high-confidence entries
- Includes HTF trend confirmation when enabled
**MEDIUM Signals** (2 confirmations)
- Balanced risk/reward setups for active scalpers
- Good for trend-following entries during established moves
**WEAK Signals** (1 confirmation)
- Early warning signals for aggressive traders
- Useful for quick scalp entries when market momentum is clear
### 3. **Automatic Market Condition Detection**
The indicator intelligently identifies market phases:
**Trending Markets** - Strong directional moves with stacked EMAs and high ADX
- Trades with the trend using momentum signals
- EMA ribbon shows clear green (uptrend) or red (downtrend) fill
**Choppy/Consolidation** - Range-bound price action with compressed EMAs and low ADX
- Yellow background warning alerts you to reduce position size or avoid trading
- Prevents false signals during sideways markets
**Low Volatility** - Insufficient ATR for profitable scalping
- Orange background warning indicates tight price ranges
- Automatically filters signals when volatility is too low
### 4. **Chart Pattern Recognition**
Automatically detects and draws common reversal patterns:
- **Double Tops** - Bearish reversal pattern marked with "DT" label
- **Double Bottoms** - Bullish reversal pattern marked with "DB" label
- Pattern lines drawn directly on chart for visual confirmation
- Contributes to signal strength calculations
### 5. **RSI Divergence Detection**
Identifies powerful leading indicators of trend reversals:
- **Bullish Divergence** - Price makes lower low while RSI makes higher low (marked with diamond)
- **Bearish Divergence** - Price makes higher high while RSI makes lower high (marked with diamond)
- Often precedes major price movements by several candles
### 6. **Real-Time Dashboard**
Top-right info panel displays:
- Current market condition (Trending/Choppy/Consolidation)
- Live RSI, ADX, and ATR% values with color-coded status
- Trend strength assessment (Weak/Moderate/Strong)
- Higher timeframe trend direction (UP ▲ / DOWN ▼ / NEUTRAL)
- Position relative to VWAP (Above ▲ / Below ▼)
- Reversal Probability percentage (0-100%)
- Current active signal status
### 7. **Customizable Alert System**
Built-in alerts for all signal types:
- Strong/Medium/Weak buy and sell signals
- Confirmed signals (candle close confirmation)
- Trend changes and EMA crossovers
- RSI divergences
- Chart pattern detection
- Choppy market warnings
---
## Practical Use Cases
### For Day Traders
- Use on 5-15 minute charts with higher timeframe set to 1H or 4H
- Filter for "Strong Only" or "Medium & Strong" signals
- Enable HTF confirmation to trade with daily trend
- Avoid trading during yellow (choppy) or orange (low volatility) backgrounds
### For Scalpers
- Use on 1-3 minute charts with higher timeframe set to 15-30 minutes
- Enable "All Signals" to catch quick momentum moves
- Watch for weak signals that align with EMA ribbon direction
- Focus on high ATR periods (morning session, news events)
### For Swing Traders
- Use indicator on lower timeframes to fine-tune entries for swing positions
- Wait for "Confirmed Only" signals that align with your swing direction
- Use reversal probability % to gauge timing of position exits
### For Risk Management
- Yellow background = Reduce position size by 50%
- Orange background = Consider sitting out
- Only take signals that have HTF confirmation enabled
- Reversal probability >50% = Prepare to exit or take profits
---
## Key Settings to Adjust
**Signal Filter Options:**
- "All Signals" - See everything (best for experienced traders)
- "Strong Only" - High-probability setups only (conservative)
- "Medium & Strong" - Balanced approach (recommended for most)
- "Confirmed Only" - Wait for candle close (reduces false signals)
**Higher Timeframe:** Set to 3-5x your chart timeframe (e.g., 15-min on 3-min chart, 1H on 15-min chart)
**RSI Period:** 7 for ultra-fast response, 9 for balanced (default), 14 for smoother
**Require HTF Confirmation:** Toggle on to only trade with larger trend (reduces trades, increases win rate)
---
## What Makes This Different
Unlike single-purpose indicators, this suite combines multiple confirmation factors to generate high-probability signals while automatically adjusting to market conditions. It won't spam you with signals during choppy markets, it respects volatility requirements, and it provides clear visual feedback about market state through the EMA ribbon, background colors, and comprehensive dashboard.
The multi-tier signal system allows traders of all styles to use the same tool - conservatives can wait for strong signals, while aggressive scalpers can act on weak signals during confirmed trends. The pattern detection and divergence identification provide additional edge by spotting setups before price action confirms them.
---
## Quick Start Checklist
1. Add indicator to your chart
2. Set Higher Timeframe to 3-5x your chart timeframe
3. Choose your Signal Filter preference (start with "Medium & Strong")
4. Enable "Require HTF Trend Confirmation" for safety
5. Set alerts for your preferred signal types
6. Watch the info panel for market condition changes
7. Avoid trading during yellow/orange backgrounds
8. Take signals that align with EMA ribbon direction
---
**Remember:** No indicator is perfect. This tool is designed to stack probabilities in your favor by combining multiple technical factors, but always use proper risk management, position sizing, and stop losses on every trade.
XAU PDH-PDL REV (Buy the Dip)Indicator Description – Buy the Dip first, then Continuation
This indicator is designed for trading Gold (XAUUSD) with an institutional, pullback-focused mindset. It prioritises **REV (Reversal) signals** to *buy the dip* or *sell the rip* after a **significant ATR-based pullback**, without relying on EMA reclaim (so strong trends aren’t missed). Only when no valid reversal is present will it allow **CONT (Continuation) signals**, aligned with trend and EMA pullbacks. Key targets are based on **Daily, Weekly, or Rolling liquidity levels**, and all prices are shown as **whole numbers** for clarity. Session awareness (NZ time) helps contextualise signals, while cooldown logic reduces noise and over-trading.
Triple EMA 200, 50, 7 you can change any of this on settingsXAUUSD Scalping – EMA Price Indicator
This indicator is designed for XAUUSD scalping, combining multiple EMAs applied to price with RSI-based momentum logic to identify high-probability intraday trading opportunities.
It focuses on trend alignment and pullback entries, helping traders stay on the correct side of the market while avoiding low-quality signals.
🔹 Key Features
📈 EMA Trend Structure
EMA 7 – Fast reaction to short-term price movements
EMA 50 – Medium-term directional bias
EMA 200 – Main trend filter
Trades are only considered when price structure is aligned with the EMA 200, ensuring entries follow the dominant trend.
📊 RSI Confirmation (Logic Only)
RSI is used internally to confirm momentum conditions.
The RSI is not plotted, keeping the chart clean and price-focused.
🔔 Trading Signals
BUY:
Price above EMA 200
EMA 7 above EMA 50
SELL:
Price below EMA 200
EMA 7 below EMA 50
⏱️ Recommended Usage
Best suited for lower timeframes (M1 – M15)
Optimized for XAUUSD (Gold), but adaptable to other markets
Ideal for scalpers and short-term traders
Strength Relative to XXX [Hysteresis Smoothed]Strength Relative to XXX
█ OVERVIEW
This versatile indicator measures the relative strength of the current charted asset against any user-selected benchmark symbol (e.g., BTC, ETH, SP:SPX, TVC:GOLD, or any other asset). Green fill = Current asset outperforming the benchmark (bullish relative strength).
Red fill = Current asset underperforming the benchmark (bearish relative weakness). Perfect for rotation strategies across crypto, stocks, forex, and commodities — quickly identify assets gaining momentum edge over a chosen benchmark.
█ HOW IT WORKS
• Relative Ratio : Calculates current close / benchmark close for normalized comparison.
• Smoothing : Applies a Simple Moving Average (SMA) to the ratio (adjustable length).
• Oscillator : Plots deviation from the SMA, centered around zero.
• Hysteresis Enhancement : Adds a small relative threshold (~0.03% default) to prevent rapid color flips from minor noise. Color persists until a convincing cross — stable blocks without lag.
█ FEATURES & INPUTS
• Compare to : Symbol input for any benchmark (match exchange for accuracy).
• MA Length : Smoothing period (default 10).
• Relative Hysteresis Threshold : Noise filter strength (default 0.0003; tweak for responsiveness vs. stability).
█ USAGE TIPS
• Apply to ALT/BTC pairs for crypto rotations, stocks vs. SP:SPX for sector strength, or any custom comparison.
• Works on all timeframes — ideal for short-term scans on 4H/daily.
• Green zones = potential outperformance; red = caution.
• Combine with volume or momentum for confluence.
This refined relative strength oscillator delivers clean, reliable visuals in volatile markets.
G_zonePublished by Mahmoud Galal
Indicator used to identify the 3 Crtitcal trading Zone.
for further info , contact : galal.mahmoud@gmail.com
NQ Order Blocks with Buy/Sell & QtyA function call is split across multiple lines
Or arguments are broken after a comma
Or indentation is inconsisten
NQ Order Blocks (Smart Money)Shows the order blocks for different time frames
Detects Bullish Order Blocks (last down candle before impulsive up move)
Detects Bearish Order Blocks (last up candle before impulsive down move)
Plots rectangles (zones) on the chart
Works well on NQ 1m–15m and HTF confirmation
Lightweight & free
MA RespectRatio RespectRatio
A Structural Moving Average Quality Indicator
What is RespectRatio
RespectRatio is a statistical indicator designed to evaluate *how reliably a stock respects a specific moving average over time.
Instead of asking “Did price touch the MA?”, it answers a more meaningful question:
Does this moving average actually function as support for this stock consistently and structurally?
The indicator focuses on *historical behavior, not short-term signals, and is intended to support buy / hold / reduce decisions rather than precise trade timing.
Why RespectRatio Exists
Many stocks frequently touch moving averages, but only some of them:
Rebound cleanly
Hold above the average
Do so repeatedly over long periods
RespectRatio was built to separate real support from visual noise.
Core Concept
RespectRatio treats every interaction between price and the moving average as a measurable event.
Each event ends in one of two outcomes:
• Bounce — price respects the moving average
• Break — price fails and breaks below it
Over time, these outcomes form a probability profile of how the stock behaves around that average.
How an Event Starts
An event begins when price meaningfully interacts with the moving average, either by:
• Entering a volatility-adjusted proximity zone around the MA, or
• Crossing below the MA (including gap-downs)
The proximity zone is adaptive and defined as:
k = ATR% × kMultiplier
This keeps the definition of “close enough” consistent across assets and volatility regimes.
Event Outcomes
Bounce (Respect)
An event is classified as a Bounce when price:
• Moves back above the moving average
• Clears a minimal buffer above it
• *Maintains that position for a defined number of sessions.
This confirms that the moving average acted as real support not a temporary pause.
Break (Failure)
An event becomes a Break when price:
• Remains below the moving average for too long, or
• Falls significantly below it and fails to reclaim it within a short window
A Break signals structural weakness at that average.
Noise Control
To avoid statistical distortion:
• Only one outcome per event is recorded
• A cooldown period prevents immediate re-counting of the same struggle
• Each event is counted once, regardless of intraday noise
This ensures clean, independent data points.
The Final Metric
The indicator produces a single core metric:
RespectRatio = Bounces / (Bounces + Breaks)
Calculated over a rolling historical window.
How to Interpret RespectRatio
• High RespectRatio
The moving average has historically acted as reliable support
→ suitable for accumulation or holding strategies
• Low RespectRatio
The moving average is frequently violated
→ caution when relying on it as support
RespectRatio does not predict future price, but measures structural trustworthiness.
What RespectRatio Is Not
• Not a buy/sell signal generator
• Not a trend-following indicator
• Not a momentum oscillator
It is a contextual filter* that improves decision quality.
Typical Use Cases
• Evaluating whether a stock deserves to be bought near a long-term MA
• Comparing multiple stocks using the same moving average
• Filtering candidates before applying other strategies
• Long-term portfolio decision support
One-Sentence Summary
RespectRatio quantifies how often the market actually respects a moving average — turning a visual assumption into measurable probability.*
Volume-Weighted RSI [VWRSI 2D Pro]A modular, volume-weighted RSI indicator built for clarity and control.
✅ Profile-based auto modes (Scalping → Macro)
✅ Toggleable Buy/Sell signals with strict mode
✅ RSI MA overlays for smoother entries
Buy Signal
RSI crosses above RSI MA
RSI > 50 (or > 55 in strict mode)
Sell Signal
RSI crosses below RSI MA
RSI < 50 (or < 45 in strict mode)
Strict mode filters out weak signals for higher conviction entries.
Volatility-Adaptive RSI Thresholds:
Traditional RSI uses static levels (70/30).
VWRSI Pro replaces these with dynamic bands:
🔹dynHigh = mean + mult × deviation
🔹 dynLow = mean − mult × deviation
Technical write-up can be found here: github.com
Adaptive Market Wave Theory - ProAdaptive 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 Advisor : Market Pulse, Agent Matrix, Structure, Watch For
Taking you to school. - Dskyz, Trade with probability. Trade with consensus. Trade with AMWT.
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.






















