Indicatore

Indicatore

Indicatore

Indicatore

Liquidity Tessera [JOAT]Liquidity Tessera
Introduction
Liquidity Tessera is an advanced open-source volume intelligence pane that fuses Cumulative Volume Delta (CVD), Weis Wave volume clustering, multi-design intensity bars, volume absorption and climax detection, CVD momentum ribbon, liquidity exhaustion tracking, session-partitioned delta accumulation, and a comprehensive 16-row dashboard into a unified volume analysis system. This indicator transforms raw volume data into actionable intelligence about who controls the market โ buyers or sellers โ and whether that control is strengthening or weakening.
Standard volume indicators show you how much trading occurred. Liquidity Tessera shows you the character of that trading: whether volume is flowing in or out (CVD), whether volume waves are expanding or contracting (Weis Wave), whether institutions are absorbing supply or distributing into demand (absorption detection), and whether a move is reaching climactic exhaustion (climax and exhaustion signals). The indicator operates in its own pane below the price chart, providing a complete volume intelligence layer without cluttering price action.
Core Concepts
1. Cumulative Volume Delta (CVD)
CVD approximates the net buying and selling pressure by assigning each bar's volume as positive (buying) when the close is above the open, and negative (selling) when the close is below the open:
float barDelta = close > open ? volume : close < open ? -volume : 0.0
var float cvdRaw = 0.0
cvdRaw := nz(cvdRaw ) + barDelta
The cumulative sum of these deltas creates a running total of net order flow. Rising CVD indicates net buying pressure is accumulating; falling CVD indicates net selling pressure. The indicator offers optional normalization using a z-score approach (CVD relative to its rolling mean and standard deviation), which makes CVD comparable across different instruments and timeframes.
CVD divergences from price are particularly significant: when price makes a new high but CVD does not confirm (it stays below its recent high), it suggests the rally lacks genuine buying conviction and may be vulnerable to reversal.
2. Weis Wave Volume Clustering
The Weis Wave method groups volume into directional waves. Rather than looking at volume bar-by-bar, it accumulates volume during each directional swing. A wave reversal is triggered when price moves against the current wave direction by more than a configurable ATR-based threshold:
float waveThreshold = ta.atr(waveAtrLen) * waveAtrMul
// When price reverses by more than the threshold, the wave completes
// and accumulated volume is plotted as a single wave column
This reveals the Wyckoff-style volume pattern: are up-waves attracting more volume than down-waves (accumulation), or are down-waves attracting more volume (distribution)? The indicator tracks wave history and detects divergences between price swings and their corresponding wave volumes.
3. Volume Absorption Detection
Institutional absorption occurs when large players absorb selling pressure (or buying pressure) without allowing price to move significantly. The indicator detects this by identifying bars where volume is extremely high relative to average (above the configurable threshold, default 2x) but the price range is unusually small (below 50% of average range):
High volume + small range = someone is absorbing the opposite side's orders
This often occurs at the end of trends when institutions are building positions against the prevailing direction
Absorption bars are highlighted with a distinct amethyst color and labeled "ABS" on the chart.
4. Volume Climax Detection
A volume climax occurs when extreme volume (above the configurable threshold, default 3x average) coincides with a reversal candle pattern โ specifically, a bar with a large wick-to-body ratio (wick > 2x body). This combination suggests that a massive influx of orders met strong opposition, creating a potential turning point. Climax bars are highlighted in fuchsia and labeled "CLIMAX."
5. Liquidity Exhaustion Tracking
The indicator tracks consecutive Weis Waves where volume declines from wave to wave. When two or more consecutive waves in the same direction show declining volume, it signals exhaustion โ the trend is running out of fuel. This is a classic Wyckoff concept: a trend sustained by decreasing volume is unsustainable.
6. Delta Intensity Bar Coloring
Rather than simple up/down coloring, the indicator offers gradient-based bar coloring where the intensity of the color reflects the strength of the bar's delta relative to average volume:
float deltaStr = math.min(math.abs(barDelta) / volMA, 2.0) / 2.0
// Weak delta = faint color, strong delta = vivid color
baseCol := color.from_gradient(deltaStr, 0, 1,
color.new(TESS_INFLOW, 65), color.new(TESS_INFLOW, 0))
This means a green bar with faint color had weak buying conviction, while a vivid green bar had strong buying conviction โ information not available from standard volume bars.
7. CVD Momentum Ribbon
A fast and slow EMA of the raw CVD create a momentum ribbon. When the fast CVD EMA is above the slow, delta momentum is bullish (buying pressure is accelerating). Crossovers between the two indicate shifts in delta momentum direction.
Features
Four Bar Design Modes: Solid (standard filled bars), Hollow (outline only), Intensity (transparency scales with volume relative to average), and Glass (semi-transparent with a stepline cap) โ each providing a different visual emphasis
Weis Wave Histogram: Background columns showing completed wave volumes, colored by wave direction. Up-wave volumes plot above zero, down-wave volumes below
CVD Overlay: The cumulative delta line scaled to fit the volume pane, with gradient coloring from bearish (red) to bullish (teal) based on CVD value
Session Volume Accumulation: Separate tracking of pre-market, regular, and post-market session volumes and deltas, with session background coloring
Delta Pressure Score: A 0-100 percentage measuring net buying pressure over the last 20 bars. Above 60 = buy pressure dominant, below 40 = sell pressure dominant
Wave Volume Comparison: Real-time comparison of the current wave's volume against the previous wave, classified as Expanding, Steady, or Contracting
Liquidity State Classification: Categorizes the current bar as Absorption, Climax, Exhaustion, Spike, Dry-Up, or Normal based on the composite of all detection systems
Volume Spike Detection: Identifies bars where volume exceeds 2.5x average with a background highlight
Session Delta Bias: Tracks whether the current session's cumulative delta is net accumulating or distributing
16-Row Dashboard: Displays bar delta, CVD state, volume ratio, wave direction, session volumes, last wave volume, liquidity state, delta pressure, CVD momentum, wave volume comparison, session delta bias, delta strength, active wave volume, exhaustion counts, and bar style
Input Parameters
Cumulative Delta:
CVD Smoothing: EMA period for CVD smoothing (default: 14)
Normalize CVD: Toggle z-score normalization for cross-asset comparability (default: on)
CVD Ribbon Fast/Slow: EMA periods for the momentum ribbon (default: 8/21)
Wave Volume:
Wave ATR Multiplier: Threshold for wave reversal detection (default: 1.5)
Wave ATR Length: ATR period for wave threshold (default: 14)
Signals:
Absorption Vol Threshold: Volume multiple for absorption detection (default: 2.0)
Climax Vol Threshold: Volume multiple for climax detection (default: 3.0)
Toggles for wave divergence, absorption, climax, and exhaustion signals
Visuals:
Bar Style: Solid, Hollow, Intensity, or Glass (default: Intensity)
Toggles for delta intensity coloring, wave histogram, CVD overlay, CVD ribbon, session background, and dashboard
How to Use This Indicator
Step 1: Read the Liquidity State
Check the dashboard's Liquidity State. "Absorption" at support suggests institutions are buying. "Climax" after an extended move suggests a potential turning point. "Exhaustion" means the trend is losing volume fuel. "Normal" means standard conditions apply.
Step 2: Monitor CVD Direction
Rising CVD confirms uptrends; falling CVD confirms downtrends. CVD diverging from price is a warning sign. If price is making new highs but CVD is flat or declining, the rally may lack genuine buying support.
Step 3: Compare Wave Volumes
In a healthy uptrend, up-wave volumes should be larger than down-wave volumes. If down-wave volumes start exceeding up-wave volumes while price is still rising, distribution may be occurring. The Wave Volume Comparison metric in the dashboard tracks this automatically.
Step 4: Use Delta Pressure for Bias
The Delta Pressure score (0-100) provides a quick read on who controls the last 20 bars. Above 60 = buyers dominate. Below 40 = sellers dominate. Between 40-60 = balanced/contested.
Step 5: Watch for Signal Clusters
The most significant moments occur when multiple signals cluster: an absorption bar followed by a wave divergence during an exhaustion phase, for example, creates a high-conviction reversal setup. Single signals in isolation are less reliable.
Indicator Limitations
The CVD approximation (close > open = buying, close < open = selling) is a simplification. True order flow data requires Level 2/DOM data not available in Pine Script. This approximation works reasonably well on liquid instruments but is inherently imprecise
Volume data quality varies significantly across instruments and data providers. Forex "volume" is typically tick count, not actual traded volume. Crypto volume may include wash trading. The indicator's effectiveness depends on the quality of the underlying volume data
Weis Wave reversal detection depends on the ATR threshold parameter. Too small a threshold produces too many waves (noise); too large produces too few (missing genuine reversals). The optimal setting varies by instrument and timeframe
Absorption and climax detection use fixed ratio thresholds. What constitutes "extreme" volume varies across instruments and market conditions. The thresholds may need adjustment
Session volume tracking uses TradingView's built-in session detection, which may not align perfectly with all exchanges or instruments
The indicator operates in a separate pane and cannot overlay directly on price. Cross-referencing signals with price action requires visual comparison between panes
Originality Statement
This indicator is original in its comprehensive fusion of multiple volume analysis methodologies into a unified intelligence pane. While individual components (CVD, Weis Wave, volume absorption) exist separately, this indicator is justified because:
The integration of CVD, Weis Wave clustering, absorption detection, climax detection, and exhaustion tracking into a single system provides layered volume intelligence not available in any single existing indicator
The delta intensity bar coloring system uses gradient transparency based on delta strength, providing conviction information within the volume bars themselves
The liquidity state classification system synthesizes all detection subsystems into a single categorical assessment of current market conditions
Session-partitioned delta tracking reveals whether accumulation or distribution is occurring within specific market sessions
The CVD momentum ribbon provides a trend-following overlay on the delta data, identifying shifts in buying/selling momentum
Four distinct bar design modes (Solid, Hollow, Intensity, Glass) offer visual flexibility for different analysis preferences
Wave volume comparison with expanding/contracting classification automates Wyckoff-style wave analysis
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss. Volume analysis provides context about market participation but does not predict future price direction. Absorption, climax, and exhaustion signals are probabilistic patterns that can and do fail. CVD approximations are not equivalent to true order flow data. Always use proper risk management and conduct your own analysis. The author is not responsible for any losses incurred from using this indicator.
-Made with passion by officialjackofalltrades
Indicatore

RSI Divergence ProRSI Divergence Pro
Forget the classic RSI bouncing between 0 and 100 where you're left squinting at charts trying to spot divergences yourself.
RSI centers everything on zero โ positive means bullish, negative means bearish, done. No mental math wondering if 45 is "almost oversold." Overbought/oversold zones adapt dynamically to the market instead of sitting frozen at 30/70.
Three divergence types detected automatically: Regular (trend reversal), Hidden (trend continuation), and โ this is what nobody else has โ Momentum Divergences: price is still climbing, but RSI is quietly losing steam. The warning signal before the classic divergence even becomes visible.
Armed State is the real killer feature: the indicator detects when a divergence is building but hasn't fired yet โ green/red dots show you in real time "heads up, something's brewing." You see the trade before it exists.
Everything controlled by a single strength filter: one slider, zero clutter. High = fewer signals that hit. Low = see everything. Your call.
Arrows on chart, lines in the oscillator, info table, alerts โ all built in, all toggleable. Indicatore

AG Pro Structure Labels [AGPro Series]AG Pro HH HL LH LL Structure Labels
Overview / What it does
AG Pro HH HL LH LL Structure Labels is a clean market-structure reader built to simplify price action without turning the chart into a wall of signals. Its core purpose is straightforward: identify confirmed swing highs and swing lows, classify them as HH, HL, LH, or LL, and connect those points in a visually readable structure path so traders can understand the current sequence of price development at a glance.
Many market structure tools try to do too much at once. They mix structure, signals, zones, pattern scoring, and trade suggestions into a single publication, which can make the chart heavier and the analytical purpose less clear. This script takes the opposite route. It focuses on one job only: making confirmed swing structure easier to read, follow, and interpret in real time as the chart evolves.
That design choice is what gives this script its value. Instead of asking the user to interpret disconnected highs and lows manually, the script builds a visible structure chain from confirmed pivots and labels each important step. The result is a chart that remains visually disciplined while still communicating trend continuation, structural weakening, and flow transitions in a simple and repeatable format.
This script is especially useful for traders who want structure clarity before they bring in any other layer of analysis. It can be used as a standalone structure map, or as a first-pass chart-cleaning tool before applying other concepts such as support and resistance, trend continuation logic, pullback analysis, breakout validation, or discretionary execution rules.
Unique Edge
The unique edge of this script is not that it attempts to predict where price will go next. Its strength is that it organizes confirmed structure in a way that is visually clean, logically consistent, and immediately usable on live charts.
Unlike many AG Pro scripts that are built around event detection, confluence scoring, price-zone visualization, setup quality filtering, or breakout logic, this publication is intentionally narrower and more focused. It is not a BOS/CHoCH event detector. It is not a liquidity-sweep model. It is not an order-block or fair-value-gap engine. It is not a breakout-quality, retest-quality, or pattern-quality scorer. It is also not a fixed reference-level tool such as a prior-day or prior-week high/low mapper. This script is a structure readability tool first and foremost.
That distinction matters.
Previous AG Pro releases often revolve around a specific trading event: a sweep, a break, a retest, a zone reaction, a continuation pattern, or a multi-factor confluence state. This script does not begin from an event. It begins from the swing chain itself. It asks a simpler question: what is the current sequence of confirmed highs and lows, and what does that sequence imply about market flow right now?
Because of that, the script fills a different role in the broader AG Pro library. It is closer to a structural map than a setup engine. It helps answer whether the chart is still printing constructive highs and lows, whether the sequence has started to weaken, or whether the structure is now leaning in the opposite direction. That makes it useful both on its own and as a foundation layer beneath other tools.
Another important differentiator is presentation discipline. The structure path provides continuity between pivots, while the label set communicates classification without unnecessary chart clutter. The compact floating HUD reinforces the current flow state without dominating screen space. Together, these choices make the script visually premium while keeping the chart readable.
Methodology
The script uses a confirmed pivot framework. Swing highs and swing lows are identified using left and right lookback parameters selected by the user. Because pivots require confirmation, labels appear only after the structure point is confirmed by the specified number of bars. This helps reduce noise and keeps the structure map grounded in confirmed rather than speculative swing points.
Once a new pivot high is confirmed, it is compared with the prior confirmed pivot high. If it exceeds the previous confirmed high, it is classified as HH. If it does not, it is classified as LH. The same logic applies on the low side: if a confirmed pivot low is above or equal to the previous confirmed pivot low, it is classified as HL; if it is lower, it is classified as LL.
The script also includes an ATR-based structure filter. This filter is designed to suppress micro-swings that are too small relative to current volatility, which helps maintain visual cleanliness on choppier charts. Instead of drawing every minor fluctuation, the script attempts to keep attention on swings that are more structurally meaningful for the selected sensitivity.
A structure path, shown as a clean zigzag line, connects the confirmed pivots that pass the filter. This gives the user an immediate visual map of the sequence rather than a collection of isolated labels. In practice, this is one of the most useful parts of the script because it turns the marketโs swing progression into a readable path.
The floating HUD summarizes the current market-flow bias in a minimalist format. It is not intended to act as a trade signal. Its job is to provide a quick structural read so the user can see whether the recent chain is leaning bullish, bearish, or transitional according to the internal swing logic.
Signals & Alerts
This script is not designed as a one-click entry engine. Its alerts are structural, not predictive.
The publication includes alerts for newly confirmed HH, HL, LH, and LL prints, which can help users monitor structure development without staring at the chart continuously. It also includes alerts for structure-flow transitions when the internal trend state turns bullish or bearish.
These alerts are best understood as workflow alerts. They tell the user that structure has progressed into a new confirmed condition. They do not guarantee continuation, reversal, breakout success, or trade profitability. Their purpose is to improve awareness of structural change, not to replace independent analysis.
Key Inputs
Pivot sensitivity is controlled through left and right lookback values. Higher values usually produce fewer but more mature structure points, while lower values usually produce a faster and denser structure map.
The ATR filter can be enabled to reduce insignificant swings. This can be particularly helpful on lower timeframes or during periods of uneven, noisy price movement.
Users can also control whether the structure path is drawn and can adjust the visual typography for labels and HUD elements. These inputs allow the script to stay visually flexible across different chart styles and screen densities.
How this script differs from other AG Pro scripts
This distinction is central to the publication.
Many AG Pro scripts are built to evaluate the quality of a setup. They may score breakouts, retests, continuation patterns, reversal candles, pressure conditions, or confluence states. Others are built around zones and reactions, such as supply-demand mapping, premium-discount logic, fair value gaps, order blocks, or support-resistance behavior. Others focus on structural events such as BOS/CHoCH changes, liquidity sweeps, inducement traps, or session-specific reactions.
This script does none of those things.
It does not measure the quality of a signal.
It does not score a setup.
It does not project targets.
It does not identify fixed daily or weekly reference levels.
It does not try to map every institutional concept on the chart.
It does not attempt to be an all-in-one decision engine.
Instead, it provides a cleaner foundation: confirmed HH, HL, LH, and LL sequencing with a filtered structural path and a compact market-flow summary.
That is precisely why it is different from the previous AG Pro script as well. If the previous release was anchored to fixed price levels, event detection, or context-specific reactions, this script is anchored to swing continuity. If another AG Pro script answers where price reacted, where a sweep occurred, whether a breakout was strong, or whether a setup deserves a quality score, this one answers a more basic but highly important question: what is the confirmed structure chain doing right now?
In that sense, this script is less about trading events and more about structural readability.
Limitations & Transparency
This script uses confirmed pivots, which means it is not attempting to label unconfirmed structure in advance. As a result, there is an intentional delay equal to the confirmation logic chosen by the user. That delay is not a flaw; it is part of the design tradeoff required to avoid premature structure labels.
Like any pivot-based structure tool, output will vary depending on sensitivity settings, timeframe, market volatility, and symbol behavior. A lower sensitivity may reveal more swing detail but can also make the map denser. A higher sensitivity may create a cleaner structure path but may respond more slowly to local shifts.
The ATR filter is a visual-cleanliness tool, not a universal truth engine. It can help reduce noise, but different traders may prefer different levels of structural compression depending on how aggressively or conservatively they define meaningful swings.
This script should also not be interpreted as a complete trading plan. It does not include position sizing, stop placement, target selection, execution logic, or market-specific risk rules. Users should combine it with their own framework, testing process, and judgment.
Risk Disclosure
This script is for analytical and educational use. It is not financial advice, investment advice, or a recommendation to buy or sell any instrument.
Market structure is an interpretive framework, not a guarantee of future price behavior. A bullish sequence can fail, a bearish sequence can reverse, and a clean structural print can still occur inside a broader context that changes the meaning of the move.
Always use independent judgment, apply appropriate risk management, and evaluate the script in the context of your own market, timeframe, and process.
Summary
AG Pro HH HL LH LL Structure Labels is built for traders who value structural clarity over indicator overload. Its role in the AG Pro catalog is distinct: it is not an event hunter, not a zone engine, and not a quality scorer. It is a clean structure reader designed to make confirmed swing progression easier to see, easier to follow, and easier to integrate into a disciplined chart workflow.
If your goal is to understand whether price is still producing constructive highs and lows, whether that chain is weakening, or whether the flow has shifted into a different structural condition, this script is designed for exactly that task.
Indicatore

Atlantium Gold Ultra๐ Strategy Overview: Atlantium Gold Ultra
Atlantium Gold Ultra is a quantitative trading strategy optimized for capturing mid-to-long-term market trends while maintaining a strict focus on capital preservation. The backtesting results from 2024 to early 2026 demonstrate a consistent upward equity curve with remarkable resilience during market shifts.
๐ Key Performance Metrics
Net Profit: +38.92% ($3,892.21 USD).
Profit Factor: 1.747 (Signifying a strong statistical edge).
Max Drawdown: Only 3.49% ($435.03 USD). This reflects an exceptionally conservative risk profile.
Win Rate: 44.21% (149/337 trades).
Analysis: While the win rate is below 50%, the Profit Factor of 1.747 confirms a high Risk:Reward ratio, where winning trades significantly outweigh losing ones.
๐ง Core Philosophy
The strategy is built on the principle of "cutting losses short and letting winners run." Instead of trying to predict every market micro-movement, it utilizes trend-following logic and volatility filters to ensure entries occur only during high-probability setups.
The most standout feature is the Calmar Ratio (the relationship between return and drawdown). With a return of nearly 40% against a tiny 3.49% drawdown, this strategy is ideal for traders looking for low-stress automation or those managing funded accounts.
๐ Technical Highlights
Trend Resilience: The equity curve shows an acceleration in performance throughout 2025 and 2026, indicating the strategy thrives in trending environments.
Efficient Recovery: Drawdown periods are shallow and recovery factors are high, minimizing the time the account spends in "the red."
Trade Frequency: With 337 trades over approximately two years, the sample size is statistically significant, reducing the likelihood of "curve fitting."
๐ Suggested Description for TradingView
"I am releasing Atlantium Gold Ultra as an open-source tool for the community. This strategy focuses on trend-following with a heavy emphasis on risk management. By keeping the maximum drawdown under 4%, it provides a stable growth path even during volatile periods. Optimized for , it is designed to be a robust component of a diversified trading portfolio."
Tip for your post: Since the win rate is 44%, make sure to emphasize that the strategy relies on positive expectancy rather than high accuracy. In the trading world, a low drawdown like yours (3.49%) usually gets a lot of "Boosts" and attention! Strategia

Indicatore

Indicatore

Vortex Nexus Alpha [JOAT]Vortex Nexus Alpha Strategy
Introduction
The Vortex Nexus Alpha Strategy is an advanced open-source algorithmic trading system that combines multi-dimensional signal generation, adaptive regime detection, and institutional-grade risk management into a unified execution framework. This strategy represents a complete trading system built from the ground up using proprietary mathematical models, fractal analysis, momentum tracking, and market microstructure intelligence.
Unlike simple crossover strategies or single-indicator systems, Vortex Nexus Alpha synthesizes intelligence from five independent signal layers, each containing five distinct detection mechanisms, creating a 25-factor confluence scoring system that validates every trade entry. The strategy is designed for traders who understand that consistent profitability requires multi-dimensional analysis, adaptive positioning, and systematic risk management rather than relying on any single indicator or pattern.
Why This Strategy Exists
This strategy addresses the fundamental challenge of algorithmic trading: most systems over-optimize to historical data or rely on simplistic logic that fails in real market conditions. Vortex Nexus Alpha solves this through a knowledge-based architecture that doesn't depend on indicator mashups but instead builds intelligence from first principles:
Volatility Expansion Engine: Measures market volatility through ATR percentile ranking and adapts position sizing and stop distances dynamically
Price Efficiency Calculator: Quantifies how efficiently price moves using path length analysis, filtering choppy conditions
Chaos Measurement System: Identifies market regime (directional, equilibrium, chaotic) using logarithmic range analysis
Directional Conviction Tracker: Measures trend strength through ADX and directional movement indicators
Adaptive Ribbon System: Multi-layer EMA ribbon that expands/contracts based on volatility and provides dynamic support/resistance
Volume Pressure Analysis: Estimates buying/selling pressure through candle structure and wick analysis
Gauss Smoothing Engine: 4th-order Gaussian filter that eliminates noise while preserving genuine price movements
Fractal Efficiency Measurement: Logarithmic efficiency calculation that adapts Laguerre filtering for optimal lag reduction
Laguerre Momentum Transform: Adaptive momentum oscillator that responds faster during efficient moves
Temporal Flow Dynamics: Analyzes price flow direction, magnitude, and acceleration across multiple dimensions
Pivot Structure Analysis: Detects market structure breaks and shifts using swing high/low analysis
Order Block Detection: Identifies institutional positioning zones through volume-confirmed reversal patterns
Imbalance Zone Mapping: Marks price gaps and inefficiencies that often get filled
Each component contributes unique intelligence that validates or invalidates potential trade setups. The strategy requires minimum confluence scores before entering positions, ensuring that multiple independent systems agree on directional bias.
Core Strategy Architecture
1. Volatility Expansion Engine
The strategy begins with comprehensive volatility analysis:
volatility = ta.atr(volatilityPeriod)
volatilityPercent = (volatility / close) * 100
volatilityRank = ta.percentrank(volatilityPercent, 100)
Volatility percentile ranking provides context for current volatility relative to recent history. This measurement drives multiple strategy decisions:
- Position sizing: Higher volatility = smaller positions
- Stop distance: Higher volatility = wider stops
- Signal filtering: Extreme volatility (>80 percentile) triggers defensive mode
The strategy adapts to volatility rather than using fixed parameters, ensuring it remains relevant across different market regimes.
2. Price Efficiency and Chaos Measurement
The strategy calculates price efficiency to distinguish trending from ranging markets:
priceMovement = math.abs(close - close )
pathLength = math.sum(math.abs(close - close ), efficiencyPeriod)
efficiency = pathLength > 0 ? priceMovement / pathLength : 0
High efficiency (>0.6) indicates clean, directional movement suitable for trend-following. Low efficiency (<0.4) suggests choppy conditions where the strategy reduces activity or switches to mean-reversion logic.
Chaos level is measured using logarithmic range analysis:
rangeHigh = ta.highest(high, volatilityPeriod)
rangeLow = ta.lowest(low, volatilityPeriod)
atrSum = math.sum(ta.atr(1), volatilityPeriod)
chaosLevel = 100 * math.log10(atrSum / (rangeHigh - rangeLow)) / math.log10(volatilityPeriod)
High chaos (>60) triggers defensive positioning. Low chaos (<40) enables aggressive trend-following.
3. Directional Conviction System
The strategy implements complete ADX analysis with directional indicators:
= adx(14, 14)
ADX above 25 indicates emerging directional conviction. Above 40 indicates dominant conviction. The strategy uses conviction strength to:
- Filter entries: Minimum conviction threshold prevents trading in directionless markets
- Size positions: Higher conviction = larger positions (within risk limits)
- Set targets: Strong conviction enables wider profit targets
The difference between bullForce and bearForce determines directional bias and validates signal direction.
4. Adaptive Ribbon System
The strategy calculates 8 EMA layers with adaptive spacing:
stepSize = (slowPeriod - fastPeriod) / (ribbonLayers - 1)
ribbonLevel0 = ta.ema(close, fastPeriod)
ribbonLevel7 = ta.ema(close, slowPeriod)
Ribbon analysis provides:
- Trend direction: Fast > slow = bullish, fast < slow = bearish
- Trend strength: Wider ribbon = stronger trend
- Dynamic support/resistance: Ribbon layers act as price magnets
- Compression detection: Tight ribbon = energy buildup before breakout
The strategy only takes long trades when price is above the ribbon and short trades when below, ensuring alignment with trend structure.
5. Volume Pressure Analysis
The strategy estimates buying and selling pressure using candle structure:
buyPressure = close > open ? volume * ((close - open + upperWick * 0.5) / barSpan) :
close < open ? volume * ((upperWick + bodyMass * 0.3) / barSpan) : volume * 0.5
sellPressure = volume - buyPressure
pressureDelta = buyPressure - sellPressure
Pressure analysis validates signal direction:
- Long signals require positive pressure delta
- Short signals require negative pressure delta
- Extreme pressure (>70% of volume) suggests potential exhaustion
The strategy tracks cumulative pressure to identify accumulation and distribution phases.
6. Gauss Smoothing and Fractal Efficiency
The strategy applies 4th-order Gaussian filtering to eliminate noise:
gaussClose := math.pow(alpha, 4) * close +
4 * (1.0 - alpha) * nz(gaussClose ) -
6 * math.pow(1 - alpha, 2) * nz(gaussClose ) +
4 * math.pow(1 - alpha, 3) * nz(gaussClose ) -
math.pow(1 - alpha, 4) * nz(gaussClose )
Fractal efficiency is calculated using logarithmic path measurement:
fractalRatio = totalSpan > 0 ? math.log(rangeSum / totalSpan) / math.log(fractalSpan) : 0.0
fractalEfficiency = math.max(0, math.min(1, (fractalRatio + 1) / 2))
High fractal efficiency (>0.7) validates that momentum signals are backed by clean price action.
7. Laguerre Momentum Transform
The strategy uses adaptive Laguerre filtering for momentum measurement:
gamma = 0.7 * (1 - fractalEfficiency) + 0.1 * fractalEfficiency
L0 := (1 - gamma) * gaussClose + gamma * nz(L0 )
L1 := -gamma * L0 + nz(L0 ) + gamma * nz(L1 )
L2 := -gamma * L1 + nz(L1 ) + gamma * nz(L2 )
L3 := -gamma * L2 + nz(L2 ) + gamma * nz(L3 )
cu = (L0 > L1 ? L0 - L1 : 0) + (L1 > L2 ? L1 - L2 : 0) + (L2 > L3 ? L2 - L3 : 0)
cd = (L0 < L1 ? L1 - L0 : 0) + (L1 < L2 ? L2 - L1 : 0) + (L2 < L3 ? L3 - L2 : 0)
laguerreValue = cu + cd != 0 ? 100 * (cu / (cu + cd)) : 50
fractalMomentum = (laguerreValue - 50) * (1 + fractalEfficiency)
The adaptive gamma adjustment reduces lag during efficient moves and adds smoothing during choppy conditions. Fractal momentum above 20 validates bullish signals, below -20 validates bearish signals.
8. Temporal Flow Dynamics
The strategy analyzes price flow across multiple dimensions:
priceFlow = ta.ema(close, flowPeriod) - ta.ema(close, flowPeriod * 2)
flowDir = priceFlow > 0 ? 1 : -1
flowMagnitude = math.abs(priceFlow) / volatility
flowAccel = ta.change(priceFlow, 3)
Flow analysis provides:
- Flow direction: Confirms trend direction
- Flow magnitude: Measures flow strength relative to volatility
- Flow acceleration: Identifies momentum shifts
The strategy requires flow alignment with signal direction for entry validation.
9. Market Structure Analysis
The strategy tracks pivot highs and lows to identify structure breaks:
pivotTop = ta.pivothigh(high, pivotSpan, pivotSpan)
pivotBottom = ta.pivotlow(low, pivotSpan, pivotSpan)
Structure breaks occur when:
- Bullish: Price breaks above previous pivot high
- Bearish: Price breaks below previous pivot low
Structure shifts (change of character) occur when:
- Bullish: Downtrend breaks above previous pivot high
- Bearish: Uptrend breaks below previous pivot low
The strategy gives bonus confluence points to signals that align with structure breaks or shifts.
10. Order Block and Imbalance Detection
The strategy identifies institutional positioning zones:
orderBlockBull = close < open and close > open and volume > avgVol * 1.2
orderBlockBear = close > open and close < open and volume > avgVol * 1.2
gapUp = low > high and (low - high ) > volatility * 0.3
gapDown = high < low and (low - high) > volatility * 0.3
Order blocks mark zones where institutions placed large orders. The strategy uses these as:
- Entry zones: Look for entries near order blocks in trend direction
- Stop placement: Place stops beyond order blocks for protection
- Target zones: Opposite-direction order blocks become profit targets
Imbalance zones (gaps) often get filled, providing mean-reversion opportunities.
Multi-Dimensional Signal Generation
The strategy generates signals through five independent layers, each containing five detection mechanisms:
Layer 1: Rapid Scalp Signals (5 mechanisms)
- Laguerre oversold + flow bullish + price above fast ribbon
- Pressure index positive + flow reversal bullish
- Momentum bullish + volume surge + price above mid ribbon
- Strong bullish candle + ribbon bullish + pressure positive
- Fractal momentum positive + flow acceleration positive + ribbon aligned
Layer 2: Swing Position Signals (5 mechanisms)
- Ribbon bullish + price above slow ribbon + bullish regime
- Structure break bullish + momentum bullish
- Order block bullish + flow bullish + conviction strong
- Gap up + pressure extreme + ribbon aligned
- Range breakout up + cumulative pressure positive + flow strong
Layer 3: Momentum Continuation (5 mechanisms)
- Fractal momentum extreme + ribbon bullish + conviction strong
- Laguerre oversold + flow bullish + volume surge
- Momentum extreme + fractal momentum positive + ribbon expanding
- Extreme buy pressure + flow acceleration positive + bullish regime
- Bull force > bear force + conviction strong + ribbon aligned
Layer 4: Structure Confirmation (5 mechanisms)
- Structure shift bullish + volume surge
- Order block bullish + price above last pivot low + momentum bullish
- Gap up + flow bullish + ribbon bullish
- Structure break bullish + pressure extreme positive
- Volume absorption + pressure positive + price above mid ribbon
Layer 5: Confluence Boosters (5 mechanisms)
- Ribbon tight + ribbon expanding + ribbon bullish + volume surge
- Net flow positive + temporal force positive + bullish regime
- Fractal efficiency high + Laguerre oversold + flow magnitude strong
- Strong bullish candle + price above previous high + volume extreme
- Velocity positive + flow bullish + ribbon power strong
Each layer contributes 0 or 1 to the bull strength score. The strategy requires minimum confluence (default 2) before entering long positions. This multi-layer approach ensures that signals are validated across multiple independent dimensions.
Risk Management System
The strategy implements institutional-grade risk management:
Position Sizing:
- Risk percentage per trade (default 1% of equity)
- Dynamic adjustment based on volatility percentile
- Reduced sizing during high chaos or low efficiency
Stop Loss Placement:
stopLoss = close - (volatility * slMultiplier)
- ATR-based stops that adapt to current volatility
- Multiplier (default 1.5) provides breathing room
- Stops placed beyond order blocks when possible
Take Profit Targets:
takeProfit = close + (volatility * slMultiplier * tpMultiplier)
- Risk-reward ratio (default 2.5:1)
- Adjusted based on conviction strength
- Wider targets during strong conviction, tighter during weak
Trailing Stop System:
trailStop = close - (volatility * trailOffset)
- Optional trailing stop (default enabled)
- Offset (default 1.2x ATR) balances protection and breathing room
- Activates after position moves into profit
Visual Elements
Adaptive Ribbon: Multi-layer EMA ribbon with gradient coloring showing trend direction and strength
Entry Signals: Triangle shapes sized by signal strength (large for 5+ confluence, small for 2-3 confluence)
Structure Markers: Lines and labels marking structure breaks, shifts, and order blocks
Imbalance Boxes: Boxes marking price gaps and inefficiency zones
Regime Background: Subtle background coloring showing current market regime
Flow Background: Additional background layer showing flow direction
Comprehensive Dashboard: 18-row intelligence panel showing position status, signal strength, regime, ribbon state, pressure, momentum, structure, flow, conviction, Laguerre, volume, volatility, trade statistics, and win rate
The dashboard provides complete strategy intelligence with real-time metrics and performance tracking.
Strategy Parameters
Core Settings:
Ultra-Aggressive Mode: Maximum trade frequency (default enabled)
Min Signal Strength: Minimum confluence required (1-6, default 2)
Risk %: Risk per trade as percentage of equity (0.5-5.0%, default 1.0%)
TP Multiplier: Take profit as multiple of stop distance (1.0-10.0, default 2.5)
SL Multiplier: Stop loss as multiple of ATR (0.5-5.0, default 1.5)
Trailing Stop: Enable/disable trailing stop (default enabled)
Trail Offset: Trailing stop distance as multiple of ATR (0.5-3.0, default 1.2)
Advanced Parameters:
Volatility Period: ATR calculation length (5-50, default 14)
Efficiency Period: Price efficiency calculation period (5-100, default 20)
Flow Period: Temporal flow analysis period (10-50, default 20)
Ribbon Layers: Number of EMA layers (3-15, default 8)
Fast Period: Fastest EMA period (2-20, default 5)
Slow Period: Slowest EMA period (10-100, default 34)
Visualization:
Dashboard: Toggle metrics panel (default enabled)
Entry Signals: Toggle signal shapes (default enabled)
Regime Zones: Toggle background coloring (default enabled)
Adaptive Ribbon: Toggle ribbon display (default enabled)
How to Use This Strategy
Step 1: Configure Risk Parameters
Set risk percentage appropriate for your account size. 1% is conservative, 2% is moderate, 3%+ is aggressive. Never risk more than you can afford to lose on any single trade.
Step 2: Select Minimum Signal Strength
Default 2 provides balanced trade frequency and quality. Increase to 3-4 for higher quality but fewer trades. Decrease to 1 only in ultra-aggressive mode on highly liquid instruments.
Step 3: Adjust Risk-Reward Ratio
Default 2.5:1 provides good balance. Increase to 3-5:1 for swing trading. Decrease to 1.5-2:1 for scalping. Higher ratios require higher win rates to be profitable.
Step 4: Enable/Disable Trailing Stops
Trailing stops protect profits but can exit prematurely. Enable for trend-following, disable for mean-reversion. Adjust trail offset based on instrument volatility.
Step 5: Monitor Dashboard Metrics
Watch "POSITION" status, "BULL STR" and "BEAR STR" scores, "REGIME" classification, and "WIN RATE" percentage. These provide real-time strategy health assessment.
Step 6: Backtest Thoroughly
Test on at least 100 trades across different market conditions. Verify that win rate, profit factor, and drawdown meet your requirements. Adjust parameters if needed.
Step 7: Forward Test on Demo
Run strategy on demo account for at least 1 month before live trading. Verify that live performance matches backtest expectations. Monitor slippage and execution quality.
Step 8: Start Small on Live
Begin with minimum position sizes on live account. Gradually increase as confidence builds. Never risk more than 1-2% of account on any single trade initially.
Best Practices
Use on liquid instruments with tight spreads and reliable execution
Backtest with realistic commission (0.1%) and slippage (2 ticks minimum)
Test across multiple market conditions (trending, ranging, volatile, calm)
Verify minimum 100 trades in backtest for statistical significance
Monitor win rate - should be 45-60% for 2.5:1 risk-reward ratio
Check profit factor - should be >1.5 for robust strategy
Analyze maximum drawdown - should be <20% of account
Review trade distribution - avoid over-concentration in specific periods
Monitor signal strength distribution - most trades should be 3+ confluence
Check regime alignment - strategy should perform in directional regimes
Verify that losses are controlled - no single loss should exceed 2% of account
Ensure adequate trade frequency - at least 2-3 trades per week on daily timeframe
Combine with manual oversight - review signals before execution in early stages
Use appropriate timeframe - 15m-1H for day trading, 4H-1D for swing trading
Avoid trading during major news events unless specifically tested for that
Keep detailed trade journal to identify patterns in wins and losses
Strategy Limitations
Algorithmic strategies cannot predict black swan events or unprecedented market conditions
Backtested performance does not guarantee future results
Slippage and commission in live trading may differ from backtest assumptions
The strategy requires sufficient volatility - may underperform in extremely low volatility
Signal generation depends on multiple calculations - computational lag possible on slow systems
The strategy works best on trending instruments - may struggle in perpetual ranges
Confluence scoring requires all components to be relevant - some may be less meaningful on certain instruments
The strategy cannot account for fundamental catalysts or news events
Trailing stops can exit prematurely during volatile but ultimately profitable moves
The strategy requires adequate liquidity for execution at desired prices
Parameter optimization can lead to overfitting - use walk-forward analysis
The strategy shows what signals exist, not why - market context still matters
Technical Implementation
Built with Pine Script v6 using:
Complete volatility expansion engine with ATR percentile ranking
Price efficiency calculator using path length analysis
Chaos measurement using logarithmic range calculations
Full ADX implementation with directional indicators
8-layer adaptive EMA ribbon with volatility-based spacing
Volume pressure estimation using candle structure analysis
4th-order Gaussian filter for noise elimination
Fractal efficiency measurement using logarithmic path complexity
Adaptive Laguerre transform with 4 cascading filter levels
Temporal flow analysis with direction, magnitude, and acceleration
Pivot-based market structure tracking
Order block and imbalance zone detection
25-factor confluence scoring system across 5 signal layers
Dynamic position sizing based on volatility and regime
ATR-based stop loss and take profit calculations
Optional trailing stop system with volatility adjustment
Comprehensive dashboard with 18 metrics and performance tracking
Alert system for all entry and exit signals
The code is fully open-source with extensive comments explaining each component and signal generation logic.
Originality Statement
This strategy is original and represents a complete trading system built from proprietary knowledge rather than indicator mashups. The strategy is justified because:
It synthesizes 13 independent analytical systems into a unified execution framework
The 25-factor confluence scoring across 5 signal layers provides multi-dimensional validation
Each component is built from first principles using mathematical models and market microstructure concepts
The adaptive nature of the system (volatility, efficiency, regime) ensures relevance across market conditions
Risk management is integrated at the core rather than added as an afterthought
The strategy doesn't rely on any single indicator or pattern - it builds intelligence from multiple independent sources
Fractal efficiency and Laguerre adaptation provide unique momentum measurement not found in standard systems
Temporal flow analysis adds a dimension of price dynamics beyond simple trend following
Market structure tracking provides context that pure indicator-based systems lack
The comprehensive dashboard provides complete strategy intelligence and performance tracking
The system is designed for real trading with realistic risk management, not just backtest optimization
Each component contributes unique intelligence: volatility drives adaptation, efficiency filters conditions, chaos identifies regimes, conviction measures strength, ribbon provides structure, pressure shows order flow, Gauss filtering eliminates noise, fractal efficiency validates momentum, Laguerre provides adaptive momentum, flow tracks dynamics, structure provides context, order blocks mark zones, and confluence validates signals. The strategy's value lies in combining these complementary perspectives into a cohesive, adaptive trading system with institutional-grade risk management.
Disclaimer
This strategy is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss and is not suitable for all investors.
Algorithmic trading strategies are tools for systematic execution, not guarantees of profit. Backtested performance does not guarantee future results. Past strategy performance does not predict future performance. Market conditions change, and strategies that worked historically may not work in the future.
The signals generated are mathematical calculations based on current market data, not predictions of future price movement. High confluence scores, regime alignment, and structure breaks do not guarantee profitable trades. Users must conduct their own analysis and risk assessment before making trading decisions.
Always use proper risk management, including stop losses and position sizing appropriate for your account size and risk tolerance. Never risk more than you can afford to lose. Consider consulting with a qualified financial advisor before making investment decisions.
The author is not responsible for any losses incurred from using this strategy. Users assume full responsibility for all trading decisions made using this tool. Thoroughly backtest and forward test any strategy before live trading.
-Made with passion by officialjackofalltrades Strategia

SMC EMA CROSS ZIG ZAG# Mega Trend Suite โ SMC + EMA (Lightweight Edition)
**A professional Smart Money Concepts (SMC) toolkit combined with classic EMA crossovers and VWAP.**
No Heikin Ashi, no MA Cross EMA โ just clean price action, order flow, and trend confirmation.
---
## ๐ Overview
This indicator bundles the most essential tools for **institutional-style analysis**:
- โ
**SMC Structure** (internal & swing BOS/CHoCH)
- โ
**Order Blocks** (bullish/bearish, with box or candle highlight)
- โ
**Fair Value Gaps (FVG)** with auto threshold & multiโtimeframe support
- โ
**Premium / Discount Zones** + Equilibrium line
- โ
**MultiโTimeframe High/Low levels** (Daily / Weekly / Monthly)
- โ
**ZigZag** (main & internal) with HH/HL/LH/LL labels
- โ
**VWAP** โ anchored to the session
- โ
**Two EMA sets** (9/21 & 20/50) with cross signals
- โ
**Compact Dashboard** (SMC bias & current timeframe)
- โ
**Full alert system** for all SMC events and EMA crosses
---
## ๐ง Key Features Explained
### 1. Smart Money Concepts (SMC)
| Component | What it does |
|-----------|---------------|
| **Swing Structure** | Detects Break of Structure (BOS) and Change of Character (CHoCH) on a higherโlength pivot (default 50). Shows labels โBOSโ or โCHoCHโ when price crosses a swing high/low. |
| **Internal Structure** | Same as swing, but uses a shorter length (default 10) to catch microโstructure changes. Optional confluence filter (body vs. wick). |
| **Order Blocks (OB)** | Stores the extreme bar (parsed by volatility filter) after a valid BOS/CHoCH. Displays as zone boxes or candle highlights. Mitigation detection (close / high/low). |
| **Fair Value Gaps (FVG)** | Detects 3โbar imbalances on a chosen timeframe (or current). Uses autoโthreshold based on historical bar delta. Extendable boxes. |
| **Premium / Discount Zones** | Calculates the range between the highest swing high and lowest swing low. Shades the upper 50% (premium) and lower 50% (discount) with an equilibrium line in the middle. |
| **MTF High/Low Levels** | Plots previous periodโs high/low for Daily, Weekly, Monthly. Line style (solid/dashed/dotted) and color customizable. |
| **ZigZag** | Classic pivotโbased ZigZag with HH/HL/LH/LL labels. Separate internal ZigZag available for finer swings. |
### 2. VWAP
- Standard Volume Weighted Average Price.
- Useful for intraday bias โ price above VWAP = bullish tilt.
### 3. EMA Sets
Two independent EMA pairs:
- **Set 1:** 9 & 21 (fast)
- **Set 2:** 20 & 50 (slower)
Each set plots its own lines and generates up/down triangles on crossover / crossunder. Colours, widths, and signal colours are fully adjustable.
---
## โ๏ธ Input Parameters (Grouped)
### ๐ง Master Controls
- `Enable SMC Module` โ turn all SMC features on/off.
### ๐ SMC โ General
- `Mode` โ Historical (keeps all drawings) / Present (refreshes each bar).
- `Style` โ Colored / Monochrome.
### ๐ SMC โ Structure & Order Blocks
- Internal / Swing lengths, label sizes, BOS/CHoCH filter (All / BOS only / CHoCH only).
- OB display mode (Both / Zone Box / Candle Highlight).
- OB mitigation source (Close / High/Low).
- OB filter (ATR / Cumulative Mean Range).
### ๐ SMC โ Fair Value Gaps
- Auto threshold on/off, custom timeframe, extend bars.
### ๐ SMC โ MTF High/Low Levels
- Show Daily / Weekly / Monthly โ each with independent line style & colour.
### ๐ SMC โ Premium / Discount Zones
- Toggle zones, custom colours for premium, equilibrium, discount.
### ๐ ZigZag Swing Lines
- Main ZigZag depth/deviation/backstep, colours, width, style, labels.
- Optional internal ZigZag with separate settings.
### ๐ VWAP & EMA Sets
- VWAP on/off, colour, width.
- Two EMA sets: each with fast/slow lengths, colours, line width, cross signal colours.
### ๐ Dashboard
- Position (TopโLeft/Right, BottomโLeft/Right), font size.
### ๐จ Colors
- Global bull / bear / neutral colours (used in dashboard).
---
## ๐ฅ๏ธ Dashboard
A small table shows at a glance:
- **SMC Bias** โ Bullish / Bearish / Neutral (based on swing trend).
- **Current Timeframe** โ e.g., โ60โ for 1h, โDโ for daily.
The dashboard adapts to dark/light chart background.
---
## ๐จ Alerts (30+ conditions)
All alerts are available from the TradingView alert dialog:
| Category | Alerts |
|----------|--------|
| **Internal Structure** | Bull/Bear BOS, Bull/Bear CHoCH |
| **Swing Structure** | Bull/Bear BOS, Bull/Bear CHoCH |
| **Order Blocks** | Bull/Bear Internal OB mitigated, Bull/Bear Swing OB mitigated |
| **Fair Value Gaps** | Bull FVG formed, Bear FVG formed |
| **EMA Crosses** | EMA Set 1/2 Bull Cross, Bear Cross |
---
## ๐งฉ How to Use
1. **Add the indicator** to any chart (any symbol, any timeframe).
2. **Keep default settings** for a clean SMC + EMA experience.
3. **For scalping / intraday:**
- Enable Internal Structure (length 5โ10).
- Use VWAP as bias filter.
- Watch for FVGs on 1mโ15m.
4. **For swing trading:**
- Focus on Swing Structure (length 50+).
- Use Premium/Discount zones for entries (buy in discount, sell in premium).
- Confirm with EMA Set 2 (20/50) cross.
5. **Order Blocks:**
- When price returns to a bullish OB zone, look for buying opportunities.
- When a bearish OB gets mitigated, expect continuation down.
---
## ๐ก Tips
- **Monochrome style** is perfect for grayscale / minimalistic setups.
- **Present mode** keeps drawings only on the current visible bars โ useful for lowโresource usage.
- **FVG autoโthreshold** works best on higher timeframes (1h+). For lower timeframes, you may turn it off and use manual threshold via the `barDelta` calculation (already builtโin).
- The **ZigZag** does not repaint โ it uses confirmed pivots.
---
## ๐ Credits & Version
- **Original concept:** Mega Trend Suite (SMC + HAMA + MA Cross EMA)
- **This edition:** Removed HAMA, MA Cross EMA, and Heikin Ashi Smoothed โ keeping only SMC, VWAP, and EMA sets.
- **Version:** 1.0 (Pine Script v6)
---
## โ Notes
- This indicator is **not a financial advice** โ always use proper risk management.
- Maximum drawings (labels, lines, boxes) are set to 500 each โ enough for several months of data.
- Multiโtimeframe levels (Daily/Weekly/Monthly) work correctly only if the chart has enough historical data.
---
**Happy trading!**
*Mega Trend Suite โ SMC + EMA* Indicatore

Indicatore

MA Derivatives (Normalized)This indicator measures how the rate of change of a moving average is itself changing โ velocity, acceleration, and jerk โ all normalized to a common scale so they're comparable regardless of price level.
The derivative chain
The MA is computed first (your choice of SMA, EMA, HMA, or linear regression). Then three successive differences are taken:
D1 = MA minus MA โ velocity. Is the MA rising or falling, and how fast?
D2 = D1 minus D1 โ acceleration. Is the velocity increasing or decreasing?
D3 = D2 minus D2 โ jerk. Is the acceleration itself speeding up or slowing down?
Each step is just a first difference of the prior series. Simple arithmetic, but the information content compounds โ D3 is the third difference of price, which is extremely sensitive to inflection.
Normalization
Raw derivatives are price-denominated and incomparable across instruments or time. The normalize() function solves this by finding the maximum absolute value of each derivative over the lookback window and dividing through, which maps everything to while preserving sign and centering on zero. A reading of +0.8 on D2 means acceleration is near the top of its recent range โ not that it equals 0.8 dollars or points.
What each derivative tells you in practice
D1 crossing zero is the standard MA direction flip โ trend turning up or down. Nothing novel there.
D2 is the actionable layer. Positive D2 inside a downtrend means deceleration โ the MA is still falling but losing momentum. This is the classic early warning. The histogram columns are green when D2 is positive, red when negative, which makes divergences between D1 direction and D2 direction visually immediate.
D3 is the most leading but noisiest signal. A D3 flip from negative to positive while D2 is still negative means the deceleration is itself accelerating โ the curve is bending back faster. In practice it's most useful as a confirmation layer rather than a standalone signal.
The grid
The 21 hlines from -1.0 to +1.0 in 0.1 increments give the pane a structured reading frame. The ยฑ0.5 dashed lines act as informal overbought/oversold analogs โ a D2 sustained above +0.5 means acceleration is running hot relative to recent history.
The practical read
The highest-conviction setup is when D1 is still negative (trend down) but D2 has crossed above zero and is climbing toward +0.5 or higher. That combination โ trend still bearish, acceleration turning bullish โ precedes many meaningful reversals. Add D3 confirming positive and you have all three derivatives aligned on the turn before price has confirmed it.
The HMA option as the MA base sharpens all three derivatives because HMA's reduced lag means its slope changes faster and more cleanly at inflection points than SMA or EMA would. Indicatore

Indicatore

Strategia

HTF Candle Direction Strategy V1๐น Title
HTF Candle Direction Strategy V1
๐น Short Description
Higher Timeframe (HTF) bias-based strategy with optional EMA & volume filters and controlled daily execution.
๐น Full Description
๐ Overview
HTF Candle Direction Strategy V1 is a simple yet powerful trend-following strategy that trades in the direction of a selected Higher Timeframe (HTF) candle.
The core idea is straightforward:
If the HTF candle is bullish โ look for BUY trades
If the HTF candle is bearish โ look for SELL trades
This helps traders align with the broader market trend while executing trades on lower timeframes.
โ๏ธ How It Works
The script fetches HTF Open and Close prices
Determines directional bias:
Bullish Bias โ HTF Close > HTF Open
Bearish Bias โ HTF Close < HTF Open
Trades are executed only when:
Signals are enabled
Selected direction (Buy/Sell) is enabled
Filters (if enabled) are satisfied
Only one trade per day is allowed
๐ Features
โ
Higher Timeframe Bias Trading
Trade in alignment with HTF trend
Works on any timeframe combination
โ
Lookahead Mode (Backtesting vs Real Trading)
ON โ Faster signals but repaints
OFF โ Realistic, non-repainting behavior
โ
EMA Filter (Optional)
Confirms trend using EMA
Buy only above EMA
Sell only below EMA
โ
Volume Filter (Optional)
Trades only when volume is strong
Helps avoid weak market conditions
โ
One Trade Per Day Logic
Prevents overtrading
Keeps strategy disciplined
โ
Built-in Alerts
BUY & SELL alerts included
Ready for automation
โ
Live Dashboard
Displays:
HTF Bias
Lookahead status
EMA filter status
Volume filter status
๐ Dashboard Information
The dashboard (top-right) provides real-time status:
HTF Bias โ Current market direction
Lookahead โ ON (Repainting) / OFF (Safe)
EMA Filter โ Enabled / Disabled
Volume Filter โ Enabled / Disabled
โ ๏ธ Important Notes
Lookahead ON = Repainting
Use only for backtesting or analysis
For real trading, always use:
๐ Lookahead OFF
Strategy takes only one trade per day, so performance depends on HTF accuracy
๐ฏ Best Use Cases
Intraday trading with HTF confirmation
Trend-following strategies
Index, Forex, Crypto markets
Scalping with higher timeframe bias
๐ก Recommended Settings
HTF: 4H / Daily
EMA: 50 or 200
Lookahead: OFF (for live trading)
Volume Filter: Optional
๐ Alerts
BUY Signal โ HTF Bullish + filters satisfied
SELL Signal โ HTF Bearish + filters satisfied
๐ Final Notes
This strategy is designed for simplicity, clarity, and disciplined execution.
It avoids overtrading and focuses on high-probability directional setups.
โ ๏ธ Disclaimer
This script is provided for educational and informational purposes only and should not be considered financial advice.
Trading in financial markets involves significant risk, and you may lose all or part of your capital. Past performance of this strategy does not guarantee future results.
This strategy uses higher timeframe data and optional lookahead logic. When lookahead is enabled, signals may repaint, meaning results shown on historical data may differ from real-time performance.
Users are strongly advised to:
Test the strategy on demo accounts before using real capital
Use proper risk management
Understand how the strategy works before trading
The author is not responsible for any financial losses or damages resulting from the use of this script. Strategia

Probability Live Table (Juan)The Probability Table Live is an advanced indicator for TradingView designed to display real-time probabilities of price movement for any currency pair and timeframe. This tool organizes the information into a clear and visual table, using intuitive colors to quickly interpret trend strength and the likelihood of continuation or retracement.
๐น What the chart includes:
Mode โ Indicates the current trend: UPTREND or DOWNTREND
Continuation Rate (Cont. Rate) โ Probability that the trend will continue strong (30โ95%)
Probability Retest โ Probability that the price will safely retrace to the key zone (EMA50), adjusted for momentum and distance
Valid Lows / Valid Highs โ Count of reliable recent swings (max. 100)
Breakout โ Number of confirmed recent breakouts, filtered by strength and relevance
Streak โ Streak of candles in the direction of the trend, shown as a %
BOS / CHOCH โ Signals for Break of Structure and Change of Character, with dynamic probability
๐ Dynamic colors: Green โ strong and favorable conditions Yellow โ medium conditions Red โ weak or cautionary conditions Light Blue โ recent swings and breakouts ๐ก Advantages: Live bar-by-bar predictions. Real and dynamic probabilities for quick decision-making. Compatible with any pair and timeframe. Ideal for fund traders, swing traders, and day traders. With this chart, you can see at a glance the strength of the trend, the probability of continuation or retracement, and market structure signals, all in a single, easy-to-read visual panel. Indicatore

Fractal Velocity Accelerator [JOAT]Fractal Velocity Accelerator
Introduction
The Fractal Velocity Accelerator is an advanced open-source momentum indicator that combines fractal efficiency measurement, adaptive Laguerre filtering, and Gaussian smoothing to create a multi-dimensional momentum oscillator with institutional-grade signal generation. This indicator transforms raw price data into a sophisticated momentum measurement system that reveals not just momentum direction and strength, but also velocity, acceleration, and regime characteristics.
Unlike traditional momentum indicators that simply measure rate of change, this system analyzes the efficiency of price movement through fractal mathematics, applies adaptive lag reduction through Laguerre transforms, and smooths data using 4th-order Gauss filters. The result is a momentum oscillator that responds quickly to genuine momentum shifts while filtering out noise and false signals.
Why This Indicator Exists
This indicator addresses fundamental limitations in traditional momentum analysis by introducing fractal efficiency concepts and adaptive filtering:
4th-Order Gauss Filter: Ultra-smooth OHLC data processing that eliminates noise while preserving genuine price movements
Fractal Efficiency Engine: Logarithmic path efficiency measurement that quantifies how directly price moves from point A to point B
Adaptive Laguerre Transform: Dynamic lag reduction that adjusts based on fractal efficiency, responding faster during efficient moves
Percentile-Based Bands: Self-adjusting overbought/oversold zones that adapt to each instrument's unique momentum characteristics
Velocity and Acceleration Tracking: First and second derivative calculations that identify momentum shifts before they're obvious
Momentum Regime Classification: Seven-level regime system from Extreme Bearish to Extreme Bullish with confidence measurements
Divergence Detection: Fractal-based divergence scanner that identifies price-momentum asymmetries
Each component provides unique intelligence about momentum dynamics. Gauss filtering ensures clean data, fractal efficiency measures directional clarity, Laguerre adaptation reduces lag, percentile bands provide context, velocity/acceleration track changes, regime classification guides strategy, and divergences reveal hidden shifts.
Core Components Explained
1. 4th-Order Gauss Filter System
The indicator applies a sophisticated Gaussian filter to all OHLC data:
w = (2.0 * math.pi / gaussLength)
beta = (1 - math.cos(w)) / (math.pow(1.414, 2.0 / betaDev) - 1)
alpha = (-beta + math.sqrt(beta * beta + 2 * beta))
Gc := math.pow(alpha, 4) * close +
4 * (1.0 - alpha) * nz(Gc ) -
6 * math.pow(1 - alpha, 2) * nz(Gc ) +
4 * math.pow(1 - alpha, 3) * nz(Gc ) -
math.pow(1 - alpha, 4) * nz(Gc )
This 4th-order filter provides exceptional smoothing while maintaining responsiveness. The filter uses four previous values with specific weightings that create a bell curve response, eliminating high-frequency noise while preserving genuine price movements.
The beta deviation parameter (default 2.0) controls filter aggressiveness. Higher values create more smoothing but add lag. Lower values maintain responsiveness but allow more noise. The default balances these tradeoffs optimally for most instruments.
2. Fractal Efficiency Calculation
Fractal efficiency measures how efficiently price moves by comparing net displacement to total path length:
sumRange = math.sum((math.max(Gh, nz(Gc )) - math.min(Gl, nz(Gc ))), fractalLength)
totalRange = ta.highest(Gh, fractalLength) - ta.lowest(Gl, fractalLength)
fractalGamma = if totalRange > 0
math.log(sumRange / totalRange) / math.log(fractalLength)
else
0.0
fractalEfficiency = math.max(0, math.min(1, (fractalGamma + 1) / 2))
The calculation uses logarithmic scaling to measure path complexity. When price moves in a straight line (high efficiency), the ratio approaches 1.0. When price moves erratically (low efficiency), the ratio approaches 0.0.
Fractal efficiency is normalized to 0-1 range where:
- 1.0 = Perfect efficiency (straight line movement)
- 0.7-1.0 = High efficiency (strong trending)
- 0.4-0.7 = Moderate efficiency (developing trend)
- 0.0-0.4 = Low efficiency (choppy/ranging)
This measurement is crucial because it determines how aggressively the Laguerre filter adapts.
3. Adaptive Laguerre Transform
The Laguerre filter applies adaptive lag reduction based on fractal efficiency:
gamma = laguerreGamma * (1 - fractalEfficiency) + 0.1 * fractalEfficiency
L0 := (1 - gamma) * Gc + gamma * nz(L0 )
L1 := -gamma * L0 + nz(L0 ) + gamma * nz(L1 )
L2 := -gamma * L1 + nz(L1 ) + gamma * nz(L2 )
L3 := -gamma * L2 + nz(L2 ) + gamma * nz(L3 )
cu = (L0 > L1 ? L0 - L1 : 0) + (L1 > L2 ? L1 - L2 : 0) + (L2 > L3 ? L2 - L3 : 0)
cd = (L0 < L1 ? L1 - L0 : 0) + (L1 < L2 ? L2 - L1 : 0) + (L2 < L3 ? L3 - L2 : 0)
laguerreRSI = cu + cd != 0 ? 100 * (cu / (cu + cd)) : 50
The Laguerre transform creates four cascading filters (L0-L3) that progressively smooth the data. The gamma parameter controls lag - lower gamma means less lag but more noise, higher gamma means more lag but smoother output.
The adaptive component adjusts gamma based on fractal efficiency:
- High efficiency (trending): Gamma decreases toward 0.1, reducing lag for fast response
- Low efficiency (choppy): Gamma increases toward laguerreGamma setting, adding smoothing to filter noise
The cu (count up) and cd (count down) calculations measure upward vs downward movement across the four Laguerre levels, creating an RSI-like oscillator that's far more responsive than traditional RSI.
4. Fractal Momentum Oscillator
The final momentum value combines Laguerre RSI with fractal efficiency:
rawMomentum = (laguerreRSI - 50) * (1 + fractalEfficiency)
momentumEMA = ta.ema(rawMomentum, 5)
fractalMomentum = math.max(-100, math.min(100, momentumEMA))
This calculation:
1. Centers Laguerre RSI around zero by subtracting 50
2. Amplifies the signal by (1 + fractalEfficiency), giving more weight to efficient moves
3. Smooths with 5-period EMA to reduce jitter
4. Bounds the result to -100 to +100 range
The efficiency amplification is key - during high-efficiency trending moves, momentum readings become more extreme, providing clear signals. During low-efficiency choppy moves, momentum readings stay muted, preventing false signals.
5. Velocity and Acceleration Tracking
The indicator calculates first and second derivatives of momentum:
momentumVelocity = ta.change(fractalMomentum, 1)
momentumAcceleration = ta.change(momentumVelocity, 1)
velocityEMA = ta.ema(momentumVelocity, 3)
Velocity (first derivative) shows the rate of momentum change. Positive velocity means momentum is increasing, negative velocity means momentum is decreasing.
Acceleration (second derivative) shows the rate of velocity change. Positive acceleration means velocity is increasing (momentum gaining speed). Negative acceleration means velocity is decreasing (momentum losing speed).
These metrics provide early warning of momentum shifts:
- Positive momentum + positive velocity + positive acceleration = Strong bullish momentum building
- Positive momentum + positive velocity + negative acceleration = Bullish momentum slowing (potential top)
- Positive momentum + negative velocity = Bullish momentum fading (reversal warning)
6. Momentum Regime Classification
The indicator classifies momentum into seven regimes:
Extreme Bullish: Momentum > threshold (default 60), very strong upward pressure
Strong Bullish: Momentum 40-60, solid upward pressure
Weak Bullish: Momentum 20-40, mild upward pressure
Neutral: Momentum -20 to +20, balanced conditions
Weak Bearish: Momentum -40 to -20, mild downward pressure
Strong Bearish: Momentum -60 to -40, solid downward pressure
Extreme Bearish: Momentum < -threshold, very strong downward pressure
Each regime includes confidence measurement equal to the absolute momentum value. Higher confidence indicates stronger regime conviction.
7. Adaptive Band System
The indicator uses percentile-based bands that adapt to each instrument:
momentumPercentile = ta.percentrank(fractalMomentum, bandLength)
dynamicOB = ta.percentile_linear_interpolation(fractalMomentum, bandLength, obLevel)
dynamicOS = ta.percentile_linear_interpolation(fractalMomentum, bandLength, 100 - obLevel)
These bands automatically adjust to the instrument's typical momentum range. An instrument that frequently reaches ยฑ80 will have wider bands than one that typically stays within ยฑ40. This prevents false overbought/oversold signals on volatile instruments and ensures sensitivity on stable instruments.
8. Fractal Divergence Detection
The indicator detects divergences using fractal pivot analysis:
momentumHigh = ta.pivothigh(fractalMomentum, divLookback, divLookback)
momentumLow = ta.pivotlow(fractalMomentum, divLookback, divLookback)
bullishDiv := lastPrice < prevPrice and lastMomentum > prevMomentum and lastMomentum < 0
bearishDiv := lastPrice > prevPrice and lastMomentum < prevMomentum and lastMomentum > 0
Regular divergences signal potential reversals:
- Bullish: Price makes lower low, momentum makes higher low (selling pressure weakening)
- Bearish: Price makes higher high, momentum makes lower high (buying pressure weakening)
Hidden divergences signal trend continuation:
- Hidden Bullish: Price makes higher low, momentum makes lower low (trend resumption after pullback)
- Hidden Bearish: Price makes lower high, momentum makes higher high (downtrend resumption after bounce)
Visual Elements
Multi-Layer Momentum Line: Three overlaid plots (white underlay, gradient middle, solid core) creating depth and visibility
Velocity Histogram: Histogram showing momentum velocity scaled 10x for visibility
Adaptive Bands: Dynamic overbought/oversold lines that adjust to instrument characteristics
Zone Fills: Gradient fills between bands and zero line showing bullish/bearish zones
Reference Lines: Horizontal lines at extreme (ยฑ60), strong (ยฑ40), and weak (ยฑ20) levels
Regime Background: Subtle background coloring showing current momentum regime
Divergence Labels: Text labels marking regular and hidden divergences
Reversal Signals: Labels marking extreme momentum reversals
Velocity Signals: Small labels marking velocity acceleration/deceleration
Comprehensive Dashboard: 14-row intelligence panel showing momentum value, regime, velocity, acceleration, efficiency, Laguerre RSI, trend strength, consistency, adaptive bands, and divergence status
The dashboard provides complete momentum intelligence with color-coded metrics and status indicators.
Input Parameters
Signal Architecture:
Extreme Momentum Reversals: Toggle high-confidence exhaustion signals (default enabled)
Fractal Divergence Detection: Toggle price-momentum asymmetry detection (default enabled)
Velocity Acceleration Alerts: Toggle momentum acceleration warnings (default enabled)
Extreme Momentum Threshold: Score required for extreme classification (40-90, default 60)
Gauss Filter:
Gauss Filter Length: Smoothing period (5-100, default 20)
Beta Deviation: Filter aggressiveness (0.5-5.0, default 2.0)
Fractal Engine:
Fractal Efficiency Length: Efficiency calculation period (10-200, default 50)
Laguerre Transform:
Laguerre Gamma: Base lag parameter (0.1-0.99, default 0.7)
Adaptive Bands:
Band Percentile Length: Percentile calculation period (20-500, default 100)
Overbought Level: Upper band percentile (50-95, default 75)
Oversold Level: Lower band percentile (5-50, default 25)
Divergence:
Enable Divergence Scanner: Toggle divergence detection (default enabled)
Divergence Lookback: Pivot detection period (3-20, default 5)
Visualization:
Momentum Intelligence Panel: Toggle dashboard (default enabled)
Momentum Regime Zones: Toggle background coloring (default enabled)
Velocity Histogram: Toggle velocity display (default enabled)
Dashboard Scale: Small/Normal/Large sizing (default Normal)
Colors:
All colors fully customizable including bullish momentum (neon cyan), bearish momentum (neon pink), extreme bullish (neon green), extreme bearish (neon red), neutral (gold), and divergence (neon purple).
How to Use This Indicator
Step 1: Assess Momentum Value and Direction
Check dashboard "MOMENTUM" value and direction. Positive values indicate bullish momentum, negative indicate bearish. Values above 60 or below -60 suggest extreme conditions that may precede reversals or strong continuations.
Step 2: Identify Current Regime
Review "REGIME" classification and confidence percentage. Extreme regimes with high confidence (>80%) indicate strong momentum that typically continues. Weak regimes suggest transitional conditions.
Step 3: Monitor Velocity and Acceleration
Check "VELOCITY" and "ACCEL" metrics. Positive velocity with positive acceleration suggests momentum is building. Negative acceleration while momentum is still positive warns of potential momentum exhaustion.
Step 4: Evaluate Fractal Efficiency
Review "EFFICIENCY" percentage. High efficiency (>70%) confirms that momentum is backed by clean, directional price movement. Low efficiency (<40%) suggests choppy conditions where momentum signals may be less reliable.
Step 5: Check Adaptive Bands
Monitor "OB LEVEL" and "OS LEVEL" showing dynamic overbought/oversold thresholds. When momentum exceeds these levels, watch for reversal signals or continuation acceleration.
Step 6: Watch for Divergences
Check "DIVERGENCE" status and look for divergence labels. Regular divergences at extreme momentum levels often precede significant reversals. Hidden divergences in established trends suggest continuation after pullbacks.
Step 7: Identify Extreme Reversals
Watch for "EXTREME REVERSAL" labels when momentum crosses from extreme territory. These high-confidence signals often mark major turning points or trend acceleration phases.
Step 8: Track Velocity Acceleration
Monitor velocity acceleration labels. "VELOCITY ACCEL" signals indicate momentum is gaining speed, often marking optimal entry timing in early trend phases.
Best Practices
Extreme momentum reversals (>60 or <-60) are most reliable when confirmed by velocity deceleration
High fractal efficiency (>70%) validates momentum signals as backed by clean price action
Divergences at extreme momentum levels offer highest-probability reversal setups
Velocity acceleration signals work best in early trend phases, less reliable in mature trends
Adaptive bands automatically adjust to instrument volatility - respect them as dynamic thresholds
Momentum regime transitions provide clear strategy adjustment points
Combine momentum analysis with price action for optimal entry timing
Laguerre RSI above 70 or below 30 confirms extreme momentum readings
Trend strength above 60 indicates strong momentum persistence
Trend consistency above 70 confirms momentum is directionally stable
Hidden divergences in strong trends (momentum >40 or <-40) suggest continuation opportunities
Neutral regime (-20 to +20) suggests range-bound conditions unsuitable for momentum strategies
Indicator Limitations
Momentum indicators are lagging by nature - they confirm trends rather than predict them
Extreme momentum can persist longer than expected during strong trends
Fractal efficiency requires sufficient price history - may be unreliable on newly listed instruments
Gauss filter adds smoothing which inherently introduces some lag
Adaptive bands require adequate history for percentile calculations
Divergences can persist for extended periods before price responds
The indicator works best on liquid instruments with consistent price action
Very low timeframes may produce excessive noise despite filtering
Velocity and acceleration are sensitive to sudden price spikes
Regime classification is probabilistic, not deterministic
The indicator shows momentum dynamics but cannot predict duration
Technical Implementation
Built with Pine Script v6 using:
4th-order Gaussian filter with customizable beta deviation
Logarithmic fractal efficiency calculation using path complexity measurement
Adaptive Laguerre transform with four cascading filter levels
Fractal momentum oscillator combining Laguerre RSI with efficiency amplification
First and second derivative calculations for velocity and acceleration
Seven-level momentum regime classification with confidence measurement
Percentile-based adaptive bands using linear interpolation
Fractal pivot-based divergence detection system
Multi-layer gradient visualization with depth effects
Comprehensive dashboard with 14 metrics and color-coded indicators
Alert system for reversals, divergences, and velocity signals
The code is fully open-source with extensive comments explaining fractal mathematics and adaptive filtering concepts.
Originality Statement
This indicator is original in its integration of fractal efficiency with adaptive momentum measurement. While individual components exist, this indicator is justified because:
It combines 4th-order Gauss filtering with fractal efficiency and Laguerre transforms in a unified system
The adaptive Laguerre gamma adjustment based on fractal efficiency is a novel approach to lag reduction
Fractal momentum amplification using efficiency multiplier creates regime-aware momentum measurement
Velocity and acceleration tracking provides multi-dimensional momentum analysis
Seven-level regime classification with confidence measurement guides strategy selection
Percentile-based adaptive bands automatically adjust to each instrument's characteristics
Fractal pivot-based divergence detection identifies asymmetries with statistical precision
The comprehensive dashboard synthesizes 14 distinct metrics into unified momentum intelligence
Multi-layer visualization with gradient effects provides exceptional clarity
Integration of efficiency, velocity, acceleration, and regime creates layered confirmation
Each component contributes unique intelligence: Gauss filtering ensures clean data, fractal efficiency measures directional quality, Laguerre adaptation reduces lag, momentum oscillator quantifies strength, velocity tracks changes, acceleration identifies inflections, regime classification guides strategy, bands provide context, and divergences reveal hidden shifts. The indicator's value lies in combining these complementary perspectives into a cohesive, adaptive momentum system.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss and is not suitable for all investors.
Momentum analysis is a tool for understanding price dynamics, not a crystal ball for predicting future movement. Extreme momentum readings do not guarantee reversals. Divergences do not guarantee price response. Past momentum patterns do not guarantee future patterns. Market conditions change, and strategies that worked historically may not work in the future.
The metrics displayed are mathematical calculations based on current market data, not predictions of future price movement. Momentum readings, divergences, and regime classifications do not guarantee profitable trades. Users must conduct their own analysis and risk assessment before making trading decisions.
Always use proper risk management, including stop losses and position sizing appropriate for your account size and risk tolerance. Never risk more than you can afford to lose. Consider consulting with a qualified financial advisor before making investment decisions.
The author is not responsible for any losses incurred from using this indicator. Users assume full responsibility for all trading decisions made using this tool.
-Made with passion by officialjackofalltrades Indicatore

Chaos Regime Detection Engine [JOAT]Chaos Regime Detection Engine
Introduction
The Chaos Regime Detection Engine is an advanced open-source market microstructure indicator that classifies market conditions into distinct regimes using multi-dimensional volatility analysis, directional conviction measurement, and institutional flow detection. This indicator transforms raw market data into actionable regime intelligence, helping traders identify when markets are trending, ranging, chaotic, or experiencing volatility shocks.
Unlike single-dimension volatility indicators that only measure price movement magnitude, this engine analyzes market structure through four independent scoring systems that combine into a unified regime classification framework. The indicator is designed for traders who understand that different market regimes require different trading approaches and that regime identification is the foundation of adaptive strategy selection.
Why This Indicator Exists
This indicator addresses a fundamental challenge in trading: markets constantly shift between different behavioral regimes, and strategies that work in one regime often fail in another. The core innovation lies in synthesizing multiple market microstructure measurements into a probabilistic regime classification system:
Directional Flow Regime: Markets exhibiting high price efficiency, low choppiness, and strong ADX conviction - ideal for trend-following strategies
Equilibrium Regime: Markets showing balanced conditions with moderate volatility and weak directional bias - suitable for mean-reversion approaches
Chaotic Turbulence Regime: Markets displaying high choppiness, low efficiency, and conflicting signals - best avoided or traded with tight stops
Volatility Shock Regime: Markets experiencing extreme volatility expansion with high volume - requires defensive positioning or volatility strategies
Each regime classification is derived from normalized scores across multiple dimensions, ensuring that regime identification remains robust across different instruments, timeframes, and market conditions. The system provides not just regime labels but confidence levels and intensity measurements that quantify regime strength.
Core Components Explained
1. ATR and Volatility Percentile Analysis
The indicator calculates Average True Range (ATR) over a customizable period (default 14) and expresses it as a percentage of current price. This normalization allows cross-instrument comparison and removes price-level bias.
ATR percentile ranking over 100 bars provides context for current volatility relative to recent history. High percentile rankings (>70) indicate elevated volatility, while low rankings (<30) suggest compressed volatility. This percentile approach is superior to raw ATR because it adapts to each instrument's unique volatility characteristics.
The volatility percentile feeds into multiple regime scores, particularly the Volatility Shock score, which combines ATR percentile with standard deviation percentile and volume surge detection to identify extreme volatility events.
2. Kaufman Efficiency Ratio
The Efficiency Ratio measures how efficiently price moves from point A to point B by comparing net price change to total path length:
Efficiency = Net Price Change / Sum of Absolute Bar-to-Bar Changes
Values near 1.0 indicate highly efficient, directional movement (trending). Values near 0.0 indicate inefficient, choppy movement (ranging). The indicator uses a customizable lookback period (default 20) to calculate efficiency.
High efficiency feeds into the Directional Flow score, while low efficiency contributes to both Equilibrium and Chaotic Turbulence scores. This dual contribution ensures that the regime classification captures the full spectrum of market behavior.
3. Choppiness Index
The Choppiness Index quantifies market choppiness using logarithmic calculations:
Choppiness = 100 * log10(Sum of ATR / (Highest High - Lowest Low)) / log10(Length)
Values above 61.8 indicate choppy, range-bound markets. Values below 38.2 indicate trending markets. The indicator uses a customizable period (default 14) for this calculation.
The Choppiness Index is inverted when contributing to the Directional Flow score (100 - Choppiness) because low choppiness indicates high directional clarity. High choppiness directly contributes to the Chaotic Turbulence score, identifying markets where price action lacks clear direction.
4. ADX Directional Conviction System
The indicator implements a complete ADX (Average Directional Index) calculation including +DI and -DI components:
+DI measures upward directional movement strength
-DI measures downward directional movement strength
ADX measures the strength of directional movement regardless of direction
ADX values above the trend threshold (default 25) indicate emerging directional conviction. Values above the strong threshold (default 40) indicate dominant directional conviction. The indicator uses customizable lengths for both DI calculation (default 14) and ADX smoothing (default 14).
ADX contributes bonus points to the Directional Flow score when above threshold and to the Equilibrium score when below threshold. The difference between +DI and -DI provides directional bias (long vs short) and conviction strength measurements.
5. Standard Deviation and RVI Analysis
Standard deviation of close prices over 20 bars provides an alternative volatility measurement that captures price dispersion rather than range. The indicator calculates standard deviation as a percentage of price and ranks it using percentile analysis.
The Relative Volatility Index (RVI) applies standard deviation concepts to directional movement:
RVI = 100 * StdDev(Up Moves) / (StdDev(Up Moves) + StdDev(Down Moves))
RVI values above 50 indicate upward volatility dominance, below 50 indicates downward volatility dominance. This provides directional context to volatility measurements that raw standard deviation lacks.
Both metrics contribute to the Volatility Shock score, helping identify when markets are experiencing not just high volatility but directionally biased volatility expansion.
6. Volume Delta Integration
The indicator estimates buying and selling pressure using volume and candle structure:
Buy Volume = Volume when close > open
Sell Volume = Volume when close < open
Volume surge detection compares current volume to 20-period average using a customizable threshold (default 1.5x). Volume surges add bonus points to the Volatility Shock score, confirming that volatility expansion is accompanied by genuine institutional participation rather than thin-market noise.
This volume integration ensures that regime classifications reflect actual market activity rather than just price movement patterns.
7. Regime Scoring and Classification Engine
The indicator calculates four independent regime scores (0-100 scale):
Directional Score = (Efficiency * 100 + (100 - Choppiness) + ADX Bonus) / 2.2
Equilibrium Score = (100 - ATR Percentile + (100 - Efficiency * 100) + ADX Penalty) / 2.2
Turbulence Score = (Choppiness + (100 - Efficiency * 100)) / 2
Shock Score = (ATR Percentile + StdDev Percentile + Volume Surge Bonus) / 2.3
These scores are then normalized to sum to 100%, creating a probability distribution across the four regimes. The dominant regime is determined by the highest normalized score, with confidence level equal to that score's magnitude.
Regime intensity is classified as Nascent (score 35-45), Established (score 45-60), or Dominant (score >60), providing additional context about regime strength and stability.
8. Fractal Divergence Detection
The indicator implements fractal-based divergence detection using a composite volatility index that combines:
30% ATR Percentile
20% Efficiency Ratio
20% Inverted Choppiness
15% StdDev Percentile
15% RVI
This composite index is smoothed with a 5-period EMA and analyzed for fractal tops and bottoms using a 5-bar pattern recognition system. Divergences are detected when price makes new highs/lows but the composite volatility index fails to confirm, suggesting hidden institutional positioning or liquidity asymmetries.
Regular divergences signal potential reversals, while hidden divergences suggest trend continuation after pullbacks. The indicator plots these divergences with color-coded markers and draws connecting lines for visual clarity.
Visual Elements
Composite Volatility Line: Main plot showing the smoothed composite volatility index with dynamic gradient coloring based on regime confidence
Regime Intensity Histogram: Histogram showing regime-specific intensity with transparency based on confidence level
Microstructure Indicators: Subtle circle plots showing ATR percentile, efficiency ratio, and directional clarity for detailed analysis
Conviction Overlay: Stepline plot showing ADX with gradient coloring based on conviction strength
Fractal Divergence Markers: Circle plots at fractal tops/bottoms with color-coded divergence identification
Regime Threshold Lines: Horizontal lines at key regime transition levels (50, 60, 40, 75, 25)
Probability Zone Fill: Subtle background fill showing current regime probability field
Signal Shapes: Triangle shapes on price chart for high-confidence regime transitions and divergences
Comprehensive Dashboard: 12-row intelligence panel showing regime state, certainty, bias, probability scores, conviction, confluence, and all key metrics
The dashboard provides at-a-glance regime assessment with color-coded values, status indicators, and confidence measurements for all regime dimensions simultaneously.
Input Parameters
Signal Architecture:
Regime Shift Signals: Toggle chaos-to-order transition detection (default enabled)
Regime Persistence Signals: Toggle regime stability confirmations (default enabled)
Fractal Divergence Detection: Toggle hidden liquidity flow asymmetries (default enabled)
Minimum Confluence Threshold: Multi-factor validation requirement (1-5, default 3)
Volatility Microstructure:
Volatility Expansion Period: ATR calculation length (5-50, default 14)
Volatility Percentile Window: Percentile ranking lookback (20-500, default 100)
Price Efficiency Horizon: Efficiency ratio calculation period (5-100, default 20)
Chaos Measurement Period: Choppiness index length (5-50, default 14)
Directional Conviction:
Conviction Measurement Length: DI calculation period (5-50, default 14)
Conviction Smoothing Factor: ADX smoothing length (1-50, default 14)
Conviction Emergence Level: ADX trend threshold (15-40, default 25)
Conviction Dominance Level: ADX strong threshold (30-60, default 40)
Institutional Flow:
Enable Flow Asymmetry Detection: Toggle volume delta analysis (default enabled)
Flow Surge Multiplier: Volume threshold for surge detection (1.0-5.0, default 1.5)
Regime Parameters:
Directional Regime Threshold: Score required for directional classification (50-90, default 60)
Chaotic Regime Threshold: Score required for chaos classification (10-50, default 40)
Volatility Shock Threshold: Score required for shock classification (25-50, default 35)
Visualization:
Regime Intelligence Panel: Toggle dashboard display (default enabled)
Microstructure Indicators: Toggle detailed metric plots (default enabled)
Regime Probability Zones: Toggle background probability field (default enabled)
Intelligence Panel Scale: Small/Normal/Large dashboard sizing (default Normal)
Colors:
All colors are fully customizable including directional expansion (neon cyan), volatility shock (neon pink), equilibrium state (gold), and chaotic turbulence (sunset orange).
How to Use This Indicator
Step 1: Identify Current Regime
Check the dashboard "STATE" field to see current regime classification. Note the intensity level (Nascent/Established/Dominant) and certainty percentage. Dominant regimes with high certainty (>80%) are most reliable for strategy selection.
Step 2: Assess Regime Certainty
Monitor the "CERTAINTY" metric. High certainty (>60%) indicates clear regime conditions where strategies aligned with that regime should perform well. Low certainty (<40%) suggests transitional conditions where defensive positioning is appropriate.
Step 3: Check Directional Bias
Review the "BIAS" field showing Long Flow, Short Flow, or Neutral. This indicates whether directional conviction favors long or short positioning within the current regime. The numerical value shows conviction strength.
Step 4: Analyze Regime Probability Scores
Examine the four regime probability scores (Directional, Equilibrium, Turbulence, Shock). These show the relative likelihood of each regime. When one score dominates (>60%), regime classification is clear. When scores are balanced, market is transitional.
Step 5: Monitor Conviction Metrics
Check "CONVICTION" showing ADX value and status (Dominant/Emerging/Absent). Dominant conviction (>40) confirms that directional regimes have strong follow-through potential. Absent conviction (<25) suggests equilibrium or chaotic conditions.
Step 6: Evaluate Confluence Matrix
Review the "CONFLUENCE" score (0-5) showing how many confirmation factors align. Maximum confluence (5/5) indicates all factors agree, providing highest-confidence regime classification. Low confluence (1-2/5) suggests conflicting signals requiring caution.
Step 7: Watch for Regime Transitions
Regime transition signals (triangles on price chart) mark shifts between regimes. These are critical moments for strategy adjustment. Transitions from Chaos to Directional often mark the start of new trends. Transitions to Shock regimes warn of elevated risk.
Step 8: Use Divergence Signals
Fractal divergence markers (labeled "DIV") identify price-volatility asymmetries that often precede regime changes. Bullish divergences in Equilibrium regimes may signal upcoming Directional regimes. Bearish divergences in Directional regimes may warn of regime exhaustion.
Best Practices
Use Directional Flow regimes for trend-following strategies with trailing stops
Use Equilibrium regimes for mean-reversion strategies with defined profit targets
Avoid new positions during Chaotic Turbulence regimes or use very tight stops
Reduce position size or hedge during Volatility Shock regimes
Regime transitions with high confluence (4-5/5) offer highest-probability strategy shift opportunities
Dominant intensity regimes (>60% certainty) are most reliable for strategy execution
Nascent intensity regimes (<45% certainty) require defensive positioning until regime establishes
Monitor conviction metrics - Directional regimes without conviction (ADX <25) often fail
Fractal divergences are most reliable when they occur at regime extremes
Use the probability scores to anticipate regime transitions before they're officially classified
Equilibrium regimes with rising Directional scores suggest impending breakouts
Directional regimes with rising Turbulence scores warn of trend exhaustion
Indicator Limitations
Regime classification is probabilistic, not deterministic - no regime guarantees specific outcomes
The indicator identifies current regime but cannot predict regime duration
Regime transitions can be whipsaw-prone during genuinely transitional market conditions
Volume-based components require accurate volume data - some instruments have unreliable volume
The indicator works best on liquid instruments with consistent trading patterns
Newly listed instruments may lack sufficient history for reliable percentile calculations
Extreme market events (flash crashes, circuit breakers) can temporarily distort regime classification
The indicator shows what regime exists, not why - fundamental catalysts can override regime signals
Confluence scoring requires all factors to be relevant - some factors may be less meaningful on certain instruments
Fractal divergence detection requires clear fractal formation - choppy markets may produce false divergences
Regime intensity classifications are relative to recent history, not absolute across all market conditions
Technical Implementation
Built with Pine Script v6 using:
Complete ADX calculation with +DI/-DI components and customizable smoothing
Kaufman Efficiency Ratio using net change vs path length methodology
Choppiness Index with logarithmic normalization
Multi-component composite volatility index with weighted factor contributions
Percentile ranking calculations for ATR, standard deviation, and composite volatility
Fractal pattern recognition using 5-bar pivot detection
Divergence detection comparing price fractals to volatility fractals
Four-dimensional regime scoring system with normalization to probability distribution
Confluence factor calculation combining conviction, flow, clarity, certainty, and efficiency
Dynamic color gradients based on regime confidence and intensity
Comprehensive dashboard with 12 metrics and color-coded status indicators
Alert system for regime transitions, divergences, and conviction surges
The code is fully open-source with extensive comments explaining each calculation and regime classification logic.
Originality Statement
This indicator is original in its multi-dimensional regime classification approach. While individual components (ATR, Efficiency Ratio, Choppiness, ADX) are established concepts, this indicator is justified because:
It synthesizes four independent regime scoring systems into a unified probabilistic classification framework
The composite volatility index combines five distinct measurements with optimized weighting
Regime intensity classification (Nascent/Established/Dominant) provides confidence context beyond simple regime labels
Confluence scoring validates regime classification through multi-factor confirmation
Fractal divergence detection identifies hidden institutional positioning through volatility-price asymmetries
The normalization of regime scores to probability distribution ensures consistent interpretation across instruments
Integration of volume surge detection confirms that regime classifications reflect genuine market activity
The dashboard synthesizes 12 distinct metrics into a unified regime intelligence panel
Regime transition signals with confluence filtering provide high-confidence strategy adjustment points
The system adapts to each instrument's unique characteristics through percentile-based calculations
Each component contributes unique intelligence: ATR measures volatility magnitude, Efficiency measures directional clarity, Choppiness measures range-bound behavior, ADX measures conviction, volume confirms participation, and divergences reveal hidden positioning. The indicator's value lies in combining these complementary perspectives into a cohesive regime classification system that guides strategy selection.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss and is not suitable for all investors.
Regime classification is probabilistic analysis that identifies current market conditions but does not predict future regime duration or transitions. Regime signals do not guarantee profitable trades. Past regime patterns do not guarantee future regime patterns. Market conditions change, and strategies that worked in historical regimes may not work in future regimes.
The metrics displayed are mathematical calculations based on current market data, not predictions of future price movement. Regime transitions, divergences, and confluence scores do not guarantee profitable trades. Users must conduct their own analysis and risk assessment before making trading decisions.
Always use proper risk management, including stop losses and position sizing appropriate for your account size and risk tolerance. Never risk more than you can afford to lose. Consider consulting with a qualified financial advisor before making investment decisions.
The author is not responsible for any losses incurred from using this indicator. Users assume full responsibility for all trading decisions made using this tool.
-Made with passion by officialjackofalltrades Indicatore

ABCD Harmonic Projection [WillyAlgoTrader]๐ ABCD Harmonic Projection is an overlay indicator that automatically detects ABCD harmonic patterns from ZigZag pivots, validates them against Fibonacci ratio constraints (BC/AB retracement + CD/AB extension), scores each pattern with a 4-factor quality engine (0โ100), projects the D-point completion zone, and draws Target and Stop zones with Fibonacci extension and retracement levels โ with full TP/SL outcome tracking and separate bull/bear win rate statistics.
The ABCD pattern is one of the foundational harmonic structures: four alternating swing points (AโBโCโD) where the BC leg retraces a Fibonacci portion of the AB leg, and the CD leg extends from C toward a projected D-point that is a Fibonacci ratio of the AB leg. When price reaches the D-point, the pattern completes โ and a reversal or continuation move is expected. This indicator automates the entire detection-to-target workflow: find the swings, measure the ratios, validate the geometry, project the target, and track the outcome.
๐งฉ WHY THESE COMPONENTS WORK TOGETHER
Manually identifying ABCD patterns requires eyeballing four pivot points, measuring two Fibonacci ratios, estimating the D-point projection, and drawing the target zone โ across multiple instruments and timeframes. Most traders miss patterns or miscalculate ratios.
This indicator chains each step into an automated pipeline:
ZigZag pivot detection โ 4-point ABCD extraction โ BC/AB ratio validation โ CD/AB extension calculation โ D-point projection โ 4-factor quality scoring โ Target Zone + Stop Zone placement โ Fibonacci extension/retracement overlay โ TP/SL outcome tracking โ Win rate statistics
The ZigZag engine ensures only confirmed alternating swings are used (no noise pivots). The ratio validation filters patterns to only those within Fibonacci-valid ranges. The quality scoring ranks patterns by how close they are to ideal geometry. The D-point projection gives a specific price target โ not a vague area. And the Target/Stop zones provide precise trade management levels anchored to the pattern's own geometry.
๐ WHAT MAKES IT ORIGINAL
1๏ธโฃ ZigZag pivot engine with direction management.
The indicator uses a directional ZigZag that enforces strict alternation: after a swing high, only a swing low is accepted (and vice versa). If price makes a higher high during an existing up-leg, the previous swing high is updated in place (not duplicated). This prevents the common problem of multiple consecutive highs being treated as separate pivots.
Pivots are detected using ta.pivothigh/ta.pivotlow with configurable lookback (default 8 bars). The ZigZag stores prices, bar indices, and directions in parallel arrays โ providing the last 200 pivots for pattern scanning.
2๏ธโฃ Fibonacci-validated ABCD pattern detection.
When a new pivot is confirmed and at least 4 pivots exist, the indicator extracts the most recent A, B, C points and validates:
โ BC/AB retracement ratio : must be between minBcAbRatio (default 0.382) and maxBcAbRatio (default 0.886). Classic ABCD ratios are 0.382, 0.500, 0.618, 0.786, and 0.886. Patterns outside this range are rejected.
โ ATR minimum swing filter : the AB leg must be at least 1ร ATR in size โ filtering out noise patterns during low-volatility bars.
โ Minimum leg depth : AB must span at least 3 bars โ ensuring the pattern has temporal structure, not just a single spike.
Pattern direction: if B > A โ bullish ABCD (D projected above C). If B < A โ bearish ABCD (D projected below C).
The D-point is projected from C using the average of the configurable CD/AB ratio range: projectedD = C + direction ร |AB| ร avgCdAbRatio.
3๏ธโฃ 4-factor pattern quality scoring (0โ100).
Each detected pattern receives a quality score from four dimensions:
โ ๐ Fibonacci precision (45 pts) : how close BC/AB is to the nearest standard Fibonacci level (0.382, 0.500, 0.618, 0.786, 0.886, 1.000, 1.272, 1.618). Exact Fib ratio = full points. 0.05 away = partial. 0.18+ away = zero. This is the most heavily weighted factor because Fibonacci alignment is the core of harmonic pattern validity.
โ โฑ๏ธ Time symmetry (25 pts) : the ratio of estimated CD bars to AB bars. Perfect symmetry (CD bars = AB bars) = 25 points. Asymmetric patterns (one leg much longer) score lower.
โ โ๏ธ Price symmetry (20 pts) : BC retracement depth relative to 0.618 โ deeper retests (closer to 0.618) score higher. Very shallow pullbacks (e.g., 0.236) receive fewer points.
โ ๐ Leg maturity (10 pts) : AB leg length in bars โ patterns with 8+ bars get full points, 5+ get 7, 3+ get 3. Single-bar spikes score zero.
Patterns below the Min Pattern Score threshold (default 40) are not displayed.
4๏ธโฃ Fibonacci extension levels projected from C.
Four AB extension levels are drawn from point C in the direction of the pattern:
โ 0.786 ร |AB| โ shallow completion
โ 1.000 ร |AB| โ classic equal-leg ABCD
โ 1.272 ร |AB| โ extended completion
โ 1.618 ร |AB| โ maximum extension
The 1.0 level is drawn thicker (2px, less transparency) as it represents the ideal equal-leg completion. Each level includes a price label. Additionally, the measured BC/AB retracement ratio is displayed at the midpoint of the BC leg for reference.
5๏ธโฃ Fibonacci retracement levels within CโD (partial TP targets).
For active patterns, three retracement levels are drawn between C and the projected D:
โ 0.382 of CD range โ first partial profit target
โ 0.500 of CD range โ mid-target
โ 0.618 of CD range โ aggressive partial take
These provide natural exit levels before the full D-point is reached โ useful for scaling out of positions progressively.
6๏ธโฃ Target Zone + Stop Zone with geometric sizing.
On each pattern:
โ TARGET ZONE : a band around the projected D-point, sized at 10% of the CD range. For bullish patterns: the zone sits just below D. For bearish: just above D. This is where the pattern completion trade expects to reach profit.
โ STOP ZONE : a band around point C, also sized at 10% of CD range. For bullish patterns: below C. For bearish: above C. If price returns past C, the pattern structure is broken.
Both zones extend rightward until price touches the target zone (tracked by touch bar), or the pattern resolves (TP/SL hit). Zones use distinct colors: green for target, red for stop.
7๏ธโฃ TP/SL outcome tracking with separate bull/bear statistics.
Each active pattern monitors:
โ TP hit : price reaches the projected D-point (high โฅ D for bull, low โค D for bear)
โ SL hit : price returns past C against the pattern direction (low โค C for bull, high โฅ C for bear)
โ Simultaneous TP+SL on the same bar โ resolved as loss (conservative)
On TP hit: R:R is calculated as |entry to TP| / |entry to SL| and accumulated. The dashboard shows separate bull and bear win rates with average R:R on wins.
8๏ธโฃ Active-only display mode.
When "Show Active Only" is enabled (default), completed patterns (TP or SL already hit) are hidden โ only the current live pattern remains on the chart. When disabled, up to maxPatterns historical patterns are shown for context. This prevents chart clutter while maintaining full statistical tracking.
9๏ธโฃ One-active-pattern constraint.
The indicator only allows one active pattern at a time. When an active pattern exists (status = 0), no new patterns are detected. This prevents overlapping projections and conflicting zones. A new pattern can only be detected after the current one resolves (TP or SL).
โ๏ธ HOW IT WORKS โ CALCULATION FLOW
Step 1 โ ZigZag: Directional pivot detection with alternation enforcement. Higher highs update existing swing (no duplicate). Lower lows same. Pivots stored in parallel arrays.
Step 2 โ Pattern extraction: On each new confirmed pivot: extract A (3rd-to-last), B (2nd-to-last), C (latest). Compute AB length, BC length, BC/AB ratio.
Step 3 โ Validation: BC/AB within Fibonacci range? AB โฅ ATR? AB โฅ 3 bars? No active pattern already?
Step 4 โ Scoring: 4 factors: Fibonacci precision (45), time symmetry (25), price symmetry (20), leg maturity (10). Score โฅ minScore โ pattern accepted.
Step 5 โ Projection: D = C + direction ร |AB| ร avgCdAbRatio. Bars capped at maxBarsProjection.
Step 6 โ Drawing: On barstate.islast: delete-and-redraw all visible patterns. AB and BC legs as solid lines. CD projection as dotted. A/B/C/D labels. Score label. Target/Stop zones as boxes. Fib extension and retracement levels as dashed lines with price labels.
Step 7 โ Evaluation: Each bar: check all active patterns for TP/SL hits. Update status, accumulate win/loss stats, record R:R.
๐ HOW TO USE
๐ฏ Quick start:
1. Add the indicator โ ABCD patterns appear automatically as colored leg lines with A/B/C/D labels
2. Yellow dotted line from C = projected path to D
3. Green "TARGET ZONE" box = where price should reach (take profit)
4. Red "STOP ZONE" box = where the pattern is invalidated (stop loss)
5. Blue dashed lines = Fibonacci extension levels (0.786, 1.0, 1.272, 1.618)
6. Blue dotted lines = partial TP targets (0.382, 0.5, 0.618 of CD)
7. "Long"/"Short" label = confirmed entry signal
๐๏ธ Reading the chart:
โ ๐ข Green legs + labels = bullish ABCD (D above C, expecting up-move)
โ ๐ด Red legs + labels = bearish ABCD (D below C, expecting down-move)
โ ๐ก Dotted projection line = expected path C โ D
โ ๐ข "TARGET ZONE" box = profit target area around projected D
โ ๐ด "STOP ZONE" box = invalidation area around C
โ ๐ต Dashed lines = Fib extension levels from C (0.786/1.0/1.272/1.618 of AB)
โ ๐ต Dotted lines = CD retracement levels (partial TPs: 0.382/0.5/0.618)
โ Score label (e.g., "72%") = pattern quality
๐ Dashboard fields:
โ Patterns: active / total count
โ Last Signal: direction + status (Active/TP โ/SL โ) + score
โ Bull W/L: wins/losses and win rate for bullish patterns
โ Bear W/L: wins/losses and win rate for bearish patterns
โ Avg R:R: average reward-to-risk on winning bull/bear trades
โ ATR: current value for reference
โ Timeframe, version
๐ง Tuning guide:
โ Too many patterns: increase ZigZag Length (12โ21), increase Min Score (60+), enable ATR filter
โ Too few patterns: decrease ZigZag Length (5โ8), decrease Min Score (30), widen BC/AB ratio range
โ Patterns too small: increase ATR filter or ZigZag Length
โ Want only perfect geometry: narrow BC/AB to 0.500โ0.786, set CD/AB to 0.9โ1.1, Min Score 70+
โ Extended patterns: set Max CD/AB to 1.618 or higher
โ๏ธ KEY SETTINGS REFERENCE
โ๏ธ Main:
โ ZigZag Length (default 8): pivot detection lookback
โ Pivot Sources : configurable high/low sources
๐ Pattern:
โ Min/Max BC/AB Ratio (default 0.382/0.886): Fibonacci retracement range
โ Min/Max CD/AB Ratio (default 0.786/1.618): extension range for D projection
โ Min Pattern Score (default 40): quality threshold
โ ATR Filter (default On): minimum swing size
โ Max Patterns (default 3): display limit
โ Active Only (default On): hide completed patterns
๐จ Visual:
โ Buy/Sell signals, D projection, Fib levels, TP/SL zones, A/B/C/D labels, score (all toggleable)
โ Auto / Dark / Light theme
๐ง Advanced:
โ Max Bars for D Projection (default 200): limits distant projections
๐ Alerts
โ ๐ข LONG ABCD / ๐ด SHORT ABCD โ entry, TP, SL, score, pattern type
All support plain text and JSON webhook format. Bar-close confirmed.
โ ๏ธ IMPORTANT NOTES
โ ๐ซ No repainting. All signals require barstate.isconfirmed and newPivot (confirmed ZigZag pivot). Patterns are detected after the pivot bar closes. Drawings are rendered on barstate.islast using delete-and-redraw โ previous bar's pattern state is final.
โ ๐ The ZigZag enforces strict alternation : high โ low โ high โ low. If price makes a higher high during an existing up-swing, the previous high is updated in place โ no duplicate pivots are created. This is essential for correct A/B/C/D extraction.
โ โ๏ธ Only one active pattern is allowed at a time. New patterns are blocked until the current one resolves (TP or SL). This prevents conflicting signals and overlapping zones.
โ ๐ The quality score is heavily weighted toward Fibonacci precision (45 out of 100 points). A pattern with BC/AB exactly at 0.618 scores much higher than one at 0.450. This reflects the harmonic principle that Fibonacci alignment is the primary measure of pattern validity.
โ ๐ Simultaneous TP+SL on the same bar is resolved as a loss (conservative) . This prevents ambiguous outcomes from inflating win rates.
โ ๐ The D-point projection uses the average of the min/max CD/AB ratio range โ not the exact 1.0 (equal legs). With default settings (0.786โ1.618), the projected D is at 1.202ร AB from C โ between classic and extended. Adjust the CD/AB range to target specific completion types.
โ ๐ ๏ธ This is a harmonic pattern detection and projection tool , not an automated trading bot. It identifies ABCD geometry, projects D-point targets, and provides structured trade zones โ trade decisions remain yours.
โ ๐ Works on all markets and timeframes. Indicatore

Indicatore

Indicatore
