GARCH Volumetric Cloud [MarkitTick]💡 The GARCH Volumetric Cloud is a highly advanced, institutional-grade trend-following and volatility-tracking indicator designed to filter market noise and pinpoint high-probability trend reversals. By synergizing a dynamic volatility engine inspired by conditional heteroskedasticity models with the smoothing properties of synthetic Heikin-Ashi price action, this tool offers traders a multi-dimensional perspective on market dynamics. It goes beyond simple price crossovers by mathematically confirming that a structural shift in trend is supported by an underlying surge in market volatility. This dual-verification approach significantly reduces the likelihood of entering false breakouts or getting trapped in ranging, low-momentum environments.
✨ Originality and Utility
Standard technical indicators often rely on a single dimension of market data, such as moving averages for trend or the Average True Range for volatility. This script breaks the mold by calculating a real-time variance proxy based on squared logarithmic returns, effectively bridging the gap between academic quantitative finance and retail charting. The originality lies in its "Volatility Gatekeeper" mechanism. The system only validates trend signals when the market is experiencing a mathematically significant expansion in variance, preventing the underlying Heikin-Ashi cloud from signaling entries during dormant or strictly mean-reverting phases.
Furthermore, the script calculates synthetic Heikin-Ashi values internally without relying on secondary chart inputs or delayed security calls. This ensures seamless integration, zero lookahead bias, and absolute synchronization with the current timeframe. It combines this with a fully integrated JSON webhook alert system, making it an all-in-one solution for both manual discretionary traders and automated systematic execution.
🔬 Methodology and Concepts
The core methodology is divided into two distinct processing engines that operate in parallel and converge to generate actionable signals.
● Volatility Engine
The system first determines the period-over-period return, giving the user the option to utilize logarithmic returns for superior statistical normalization.
These returns are squared to calculate raw variance.
To model volatility clustering (the tendency for volatile periods to cluster together), the script applies an Exponentially Weighted Moving Average (EWMA) to the squared returns.
This EWMA acts as a dynamic variance proxy, prioritizing recent market shocks while retaining a memory of historical data, governed by the Lambda decay factor.
The square root of this variance proxy is taken to return the value to a standard volatility scale.
A localized volatility threshold is established by calculating a Simple Moving Average and Standard Deviation of this volatility proxy. A "High Volatility" state is triggered when the current volatility exceeds the moving average plus a user-defined multiple of the standard deviation.
● Trend Cloud Engine
The script derives mathematical Heikin-Ashi price points (Open, High, Low, Close) independently of the user's primary chart type.
Four distinct Exponential Moving Averages (EMAs) are applied sequentially to the synthetic Heikin-Ashi Close price.
The structural trend state is determined by the relationship between the Fast EMA and the Slow EMA.
When the Fast EMA crosses above the Slow EMA, the internal state shifts to Bullish. When it crosses below, the state shifts to Bearish.
🎨 Visual Guide
The visual interface of the indicator is designed to provide immediate situational awareness through color-coded elements and structural bands.
● Synthetic Heikin-Ashi Candles
The indicator plots custom candles directly on the chart, overriding the standard visual noise.
Bullish Theme: Colored in vivid Cyan (#00E5FF) when the underlying cloud structure is in an upward trend.
Bearish Theme: Colored in distinct Pink/Red (#FF3D71) when the underlying cloud structure shifts downward.
The bodies, borders, and wicks are synchronized to these specific themes to maintain a clean visual hierarchy.
● The Moving Average Cloud
Cloud L1 (Fast): Plotted as a solid line with 40 percent opacity.
Cloud L4 (Slow): Plotted as the foundational boundary line, also at 40 percent opacity.
Cloud Spine: A thicker, central moving average derived from the midpoint of the inner EMAs, drawn at 20 percent opacity to serve as a micro-support/resistance level within the broader cloud structure.
Gradient Fills: The space between the four EMA lines is filled with cascading color opacities (50 percent, 65 percent, and 78 percent), creating a three-dimensional visual depth that expands during strong trends and pinches during consolidation.
📖 How to Use
Applying this indicator requires an understanding of its dual-verification logic. It is not designed to trade every crossover, but rather to isolate structural shifts.
● Identifying Opportunities
A valid Long signal occurs when the Fast EMA crosses above the Slow EMA, but only if the previous candle was mathematically classified as being in a "High Volatility" state by the GARCH engine.
A valid Short signal occurs when the Fast EMA crosses below the Slow EMA under the exact same high-volatility prerequisite.
Visually, traders should look for a color shift in the cloud and candles, accompanied by a sharp widening of the cloud structure.
● Automation and Execution
The script calculates a dynamic Stop Loss based on the lowest low of the last 5 bars for long positions, and the highest high of the last 5 bars for short positions.
The Take Profit is mechanically projected using a strict 1:1.5 risk-to-reward ratio based on the calculated Stop Loss distance.
These parameters are packaged into a JSON payload and fired via webhook at the exact moment the signal bar closes and confirms, ensuring zero repainting and immediate execution for connected bots.
⚙️ Inputs and Settings
The indicator provides deep customization options, allowing traders to tune the engines to specific assets and timeframes.
● GARCH Volume Engine
Use EWMA: Toggles between the exponentially weighted variance model and a simple moving average of variance.
Log Returns: Enables logarithmic return calculations for more accurate financial time-series modeling.
Variance Length: Defines the lookback period for the initial variance baseline.
Threshold Lookback: Sets the window for the standard deviation bands applied to the final volatility proxy.
EWMA Lambda: The decay factor for the weighted average. A standard setting of 0.94 mirrors classic RiskMetrics methodology.
High Volatility Band: The standard deviation multiplier required to trigger a "High Volatility" validation state.
● Cloud & Trend Engine
Cloud Fast Length: The lookback for the primary reactive EMA.
Cloud Mid-Fast Length: The first internal structural EMA.
Cloud Mid-Slow Length: The second internal structural EMA.
Cloud Slow Length: The foundational EMA that determines the overall baseline trend.
● Webhook Actions (Automation)
Action Long: The string identifier sent in the JSON payload when a bullish setup is confirmed.
Action Short: The string identifier sent in the JSON payload when a bearish setup is confirmed.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
The architectural foundation of this script is deeply rooted in quantitative financial theory, specifically drawing from time-series econometrics and signal processing. The volatility engine is a deterministic approximation of the Generalized Autoregressive Conditional Heteroskedasticity (GARCH) model. In standard financial mathematics, asset returns do not exhibit constant variance; instead, they experience periods of clustered turbulence and clustered calm.
By calculating the squared log returns, the script isolates the magnitude of price movement independently of directional drift. The application of an Exponentially Weighted Moving Average (EWMA) to these squared returns serves as the conditional variance estimator. The Lambda parameter acts as the memory decay coefficient. By setting this coefficient high (e.g., 0.94), the model ensures that the volatility proxy reacts aggressively to sudden market shocks (such as a macroeconomic data release or institutional block order) while slowly decaying back to the mean, perfectly mirroring the theoretical decay of implied volatility in options pricing.
Parallel to the econometric variance modeling, the script employs a cascaded digital filter design via the Heikin-Ashi EMA cloud. The Heikin-Ashi transformation modifies the standard Open-High-Low-Close data points to incorporate previous period averages, inherently introducing an autoregressive smoothing effect that diminishes high-frequency market noise. By passing this pre-smoothed data through a series of four Exponential Moving Averages, the system applies a multi-pole low-pass filter. The dispersion between the Fast EMA and Slow EMA represents the momentum vector of the trend. The final gating logic, which demands that a structural moving average crossover must be contemporaneous with a statistically significant deviation in the EWMA variance proxy, is a sophisticated method of reducing Type I errors (false positives) in algorithmic trend-following systems.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. I expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. インジケーター

Trend Tracker Trade Planner [Nick789]Trend Tracker Trade Planner
Overview
The Trend Tracker Trade Planner is a complete trend-following and trade-planning tool designed to deliver clear trend flips, automatic TP/SL mapping, multi-timeframe confirmation, and live performance tracking in one clean workflow.
It is built for traders who want more than just a trend line. The script not only identifies directional changes, but also helps structure each trade with entry, stop loss, take-profit targets, higher-timeframe context, and ongoing setup statistics.
Whether you prefer fast reaction entries or smoother trend continuation, the tracker can adapt to both styles through its dual operating modes.
Core Engine: Adaptive Trend Tracker
At the center of the script is a custom EMA + ATR-based Trend Tracker that follows price from below in bullish conditions and from above in bearish conditions.
The tracker uses ATR-based upper and lower bands to determine when direction shifts, then maintains a dynamic tracker line that updates with price behavior. This creates a clean trend bias while filtering more noise than a simple moving-average crossover.
Two Operating Modes
Scalp Mode
Scalp Mode is designed for faster reaction.
It uses quicker EMA behavior to respond more aggressively to short-term price movement, making it more suitable for lower timeframes and active intraday trading.
Trend Mode
Trend Mode is designed for smoother tracking.
It blends slower EMA values to reduce market noise and stay aligned with broader directional movement.
This gives the script flexibility across different trading conditions, from fast execution charts to cleaner swing-style trend following.
MTF Confluence Filter
The script includes an optional Multi-Timeframe Confluence Filter.
When enabled, LONG and SHORT flip signals will only appear if the trend on the selected higher timeframe agrees with the flip direction on the current chart. This helps reduce counter-trend entries and improves top-down alignment.
Filter timeframe options:
1 minute
5 minute
15 minute
1 hour
4 hour
Daily
This makes it easier to focus only on signals that are working with broader market direction.
Automated Trade Planner
When a valid bull or bear flip appears, the indicator automatically builds a live setup box for the latest signal.
Each setup includes:
Entry level at the close of the flip candle
Stop loss level
Three take-profit targets
Reward and risk zones
Dynamic target and stop labels
Optional TP/SL hit markers
This turns each new trend flip into an immediate on-chart trade plan without needing manual calculation.
Flexible Risk Management
The setup planner supports multiple stop-loss styles.
1. Fixed ATR Stop
Use a standard ATR-based stop with a custom ATR multiplier.
2. Tracker-Based Stop
Use the Trend Tracker itself as the risk base, so stop distance is anchored to the tracker line rather than a fixed ATR amount.
3. Optional Trailing Stop with Tracker Line
The script also supports trailing the stop loss with the Tracker Line.
When enabled, the SL level in the setup box will actively follow the tracker as it moves in your favor. This gives the setup a more dynamic structure-based management style.
Three Take-Profit Targets
The indicator automatically calculates three custom take-profit levels from the setup’s initial risk.
Default values are:
TP1 = 0.5R
TP2 = 1.0R
TP3 = 1.5R
These can be customized in settings to match different execution styles.
As price reaches each level, the script updates the labels and can print on-chart hit markers such as TP1✓, TP2✓, TP3✓, and SLX.
Clean Trend Visuals
A key visual feature of this version is the split bull/bear tracker display.
Instead of using a single line that visually bridges through flip points, the script draws the bullish and bearish tracker states separately. This helps avoid the unwanted connected look on lower timeframes and keeps the flip diamonds visually independent from the tracker line.
Visual Features
The script includes several optional chart elements so you can keep the layout minimal or more data-rich.
Included visual tools:
Trend Tracker Line
Trend Star (✪) on the latest bar
Flip Diamonds
Optional LONG / SHORT labels
Optional Basis line
Optional ATR bands
Optional bar coloring
Optional background trend tint
Optional TP/SL hit labels
These controls let you shape the chart around your own workflow while keeping the core logic intact.
Intelligence Dashboards
MTF Trend Table
The built-in MTF Trend Table displays the current Bull/Bear tracker state across 6 fixed timeframes:
1m
5m
15m
1H
4H
D
This allows you to check higher-timeframe alignment quickly without changing charts.
Performance Stats Table
The script also includes an internal stats dashboard that tracks how setups perform directly on the chart.
It displays:
Total number of setups
TP1 hit rate
TP2 hit rate
TP3 hit rate
SL hit rate
This gives a quick performance snapshot of how the current configuration is behaving.
Stats Calculation Modes
The stats engine supports two calculation styles.
Cumulative Mode
Tracks all qualifying setups over the full loaded chart history.
Last X Bars Mode
Restricts stats to a recent lookback window so you can evaluate how the script has been performing under more current market conditions.
This is useful when older market data may no longer reflect present volatility or trend behavior.
Alerts
The script includes a full suite of built-in alerts for both signal events and trade-management events.
Available alerts:
Bull Trend Flip
Bear Trend Flip
TP1 Hit
TP2 Hit
TP3 Hit
SL Hit
Bull Trend Active
Bear Trend Active
This makes the tool suitable for both visual chart reading and alert-based workflows.
How to Use
1. Check higher-timeframe context
Start by reading the MTF Trend Table and identify whether the current chart is aligned with the broader trend.
2. Enable the MTF filter if desired
Turn on the MTF Confluence Filter if you want LONG and SHORT signals to appear only when higher-timeframe direction agrees.
3. Wait for a trend flip
A new flip marks the beginning of a fresh setup.
When a signal appears, the script automatically draws the latest trade-planning box.
4. Use the setup box
Monitor the trade visually with:
entry
stop loss
TP1
TP2
TP3
5. Choose the stop style
Use either:
fixed ATR stop
tracker-based stop
trailing tracker stop
6. Review current performance
Use the stats dashboard in either Cumulative or Last X Bars mode to evaluate how the current settings are performing.
Best Use Case
This script is best suited for traders who want:
a clean trend-following framework
automatic trade planning on trend flips
optional higher-timeframe filtering
dynamic TP/SL visualization
on-chart performance feedback
cleaner tracker visuals on lower timeframes
flexible stop management with optional trailing behavior
It can be used for scalping, intraday chart work, or broader directional tracking depending on the selected settings.
Disclaimer
This indicator is provided for educational and informational purposes only and does not constitute financial advice, investment advice, trading advice, or a recommendation to buy or sell any instrument.
Trading and investing involve risk, and past performance does not guarantee future results. No indicator can predict market direction with certainty. Users are responsible for their own decisions, risk management, and trade execution.
The built-in statistics and on-chart setup planning tools are intended as visual aids only and should not be treated as a guarantee of profitability or as a substitute for proper testing, personal judgment, and independent analysis.
Always test on historical data and in a simulated environment before using any script in live market conditions. インジケーター

インジケーター

Haar Wavelet RSI [Jamallo]Author's Note
This is the oscillator companion to the Haar Wavelet Range Filter. Both indicators share the same MODWT Haar wavelet foundation, creating a synergistic effect when used together — trend and momentum derived from the same mathematical decomposition of price.
Introduction
The Haar Wavelet RSI is a momentum oscillator that replaces the standard price-difference input of a traditional RSI with wavelet detail coefficients derived from a Maximal Overlap Discrete Wavelet Transform (MODWT) with a Haar basis. Instead of measuring bar-to-bar price change, it measures momentum at a specific frequency scale — filtering out the noise above and below that scale before the RSI calculation even begins.
How It Works
MODWT Haar Wavelet Decomposition
The script decomposes hl2 through up to 5 wavelet levels using a shift-invariant Haar transform. At each level, the detail coefficients capture the local price delta at that specific scale — Level 1 is 2-bar momentum, Level 3 is 8-bar momentum, Level 5 is 32-bar momentum. These detail coefficients become the input to the RSI in place of raw price change, meaning the oscillator is measuring directional energy at a single isolated frequency rather than the full noisy price series.
Wavelet RSI Calculation
The selected detail coefficient is split into its upward and downward components, smoothed with Wilder's RMA, and fed into the standard RSI formula. The math is identical to a conventional RSI — the only difference is what it is measuring. Because the detail coefficients are already frequency-isolated, the resulting RSI is inherently cleaner than applying RSI to raw price.
Adaptive Deadband Step-Hold
The wavelet RSI output is then passed through an adaptive deadband filter. The threshold is self-derived from the RSI's own recent volatility — a short rolling average of absolute RSI changes — scaled by the deadband multiplier. The RSI only updates when it departs from its held value by more than this threshold. Below the threshold it holds flat. This eliminates the continuous micro-oscillation that makes standard RSI difficult to read on noisy bars, producing a stepped line that moves with conviction or not at all.
Closing
This is not a standard RSI with cosmetic changes. The wavelet decomposition fundamentally changes what the oscillator is measuring — momentum at a defined frequency scale rather than raw bar-to-bar noise. The decomposition level is the most important setting: lower levels suit faster timeframes and shorter momentum cycles, higher levels filter more aggressively and are better suited to swing-level momentum reads. インジケーター

インジケーター

インジケーター

Iteratively Reweighted Least Squares (IRLS) [Jamallo]Author's Note: This script is published as a unique mathematical contribution to TradingView's open-source public library. It is intended to introduce a novel application of a robust statistical method for the community and developers to study, adapt, and build upon, rather than to serve as a standalone, out-of-the-box trading strategy.
Introduction
Almost all moving averages and smoothing filters in technical analysis treat historical price data equally or apply a fixed mathematical decay (like an EMA). The problem? A massive, anomalous wick or a sudden volatility spike will inevitably drag the average away from the true underlying market consensus.
Enter Iteratively Reweighted Least Squares (IRLS) .
IRLS is a robust statistical method that calculates a "consensus" price by actively identifying and down-weighting outliers. Instead of letting a large wick distort the line, the algorithm assigns less weight to prices that deviate furthest from the current estimate. The result is a filter that cuts through noise, ignores price-distant spikes, and naturally locks onto the dominant, high-density price levels.
How It Works
The indicator uses the Hardy weight function to determine how heavily each historical candle influences the current estimate. On every bar, the algorithm checks the distance of each sample from the current consensus and iteratively refines the line until it converges on a robust mean. Epsilon — the outlier rejection scale — is derived dynamically from the average High–Low range, keeping the filter dimensionless and consistent across all instruments and timeframes.
Parameters
Window Size (N) : The rolling lookback window of historical samples the kernel considers. Larger values produce a smoother, slower-responding line.
Sparsity (s/N) : The core behavioral control. Dictates the fraction of the window allowed to "vote" on the estimate.
Low Sparsity (e.g., 0.1) : Only the 10% of samples closest to the current estimate participate. Produces a snappy, selective line that locks tightly onto the most dominant price cluster.
High Sparsity (e.g., 1.0) : All samples participate, resulting in a smoother, more conventional robust mean.
Gamma (ε scale) : Controls the strength of outlier rejection. Lower values enforce harsh, median-like rejection. Higher values soften the rejection toward a standard weighted mean.
Iterations : The number of reweighting convergence passes per bar. 2–3 is sufficient for practical convergence.
Potential Applications
The Hardy IRLS filter provides a unique lens into market structure by shifting the focus from simple time-averaged prices to spatial price consensus. Because it rejects price-distant wicks and noise spikes by design, it can serve as a foundation for:
Custom trailing stops
Dynamic support and resistance trackers
Baseline trend or regime filters
Feel free to inspect the open-source code, experiment with extreme sparsity and gamma settings, and integrate the IRLS core into your own quantitative projects.
References
Li Shuang, "Sparse Representation of Hardy Function by Iteratively Reweighted Least Squares," 2020 International Symposium on Computer Engineering and Intelligent Communications (ISCEIC), IEEE, 2020. DOI: 10.1109/ISCEIC51027.2020.00020
インジケーター

BTC MTF Engulfing Flip + Pyramid Strategy (1H, 2X)BTC Flip Bot V2 — MTF Engulfing + SL-Flip + Pyramiding (BTCUSDT 1H)
Author: Jagadeesh Manne
Version: V2 (April 2026)
A multi-timeframe trend-following strategy with SL-flip extension and pyramiding for BTC perpetual futures. V2 adds scaling into winners at +3R — same entries, same filters, but amplifies fat-tail trades.
⚠️ IMPORTANT: This strategy is tested and validated ONLY on BTCUSDT perpetual futures | 1H timeframe | 2× leverage. Do not apply to other pairs, timeframes, or leverage settings without independent testing.
⚠️ TradingView's chart timeframe affects how this strategy calculates. A red banner appears if the chart is not set to 1H — set the top-left TF to "1h" explicitly for results to match the published backtest.
⚠️ TradingView free/basic accounts cache only a limited number of bars (5K–20K). The TV backtest you see will cover only the most recent window of the full 6.5-year test. See the "Full backtest" section below for the authoritative Python numbers.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
HOW IT WORKS
Three timeframes must align simultaneously on a single 1H bar before a trade is taken:
🔹 DAILY — Trend Regime
Close > 50-period EMA for longs (below for shorts). Macro trend safety gate — rejects ~50% of all signals that would trade against the dominant trend.
🔹 4H — Momentum Confirmation
RSI(14) > 50 for longs (below for shorts). Medium-term momentum alignment.
🔹 1H — Entry Trigger (all 5 must be true on the same bar)
• RSI(14) > 45 for longs / < 55 for shorts
• MACD(12,26,9) line above/below signal line
• Bullish or Bearish engulfing candle (body > prior body) — the core trigger
• ATR(14) above 50-period average (volatility expanding)
• Volume above 1.5× 20-period SMA (participation spike)
Only ~1% of all engulfing candles pass all 7 filters across a 5-year period. This extreme selectivity is the edge.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
STOP LOSS & PARTIAL TP
Main SL: Pattern-based (min of entry bar low + prior bar low, with 0.1% buffer). Capped at 2.5% from entry. Whichever is tighter wins.
Partial TP (tuned April 2026):
• At +6R favorable move, 15% of position closes
• After partial TP, SL moves to entry + 0.1% (break-even + fee buffer)
• Remaining 85% continues running with BE stop — captures fat-tail winners while protecting locked-in profit
Why 15%@6R (not 30%@5R)? Grid-search on 5yr data showed this variant lifts CAGR +11 percentage points vs the previous 30%@5R partial, because a small partial lets the runner portion capture the full fat-tail move when a trend plays out.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SL-FLIP EXTENSION
When main SL hits, the strategy queues an opposite-direction flip trade:
• Waits 1 hour after SL hit (lets whipsaw settle)
• Opens opposite direction with TIGHT 1.5% SL (vs main 2.5%)
• SL placed at swing high/low from last 10 bars OR 1.5% cap from broken SL — whichever is tighter
• No flip-on-flip cascade (prevents revenge trading)
• 24-hour time-stop on flip positions
• Flips respect DD halt + generic post-exit cooldown
Flip trades add a meaningful contribution over the non-flip baseline while keeping max drawdown unchanged.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PYRAMIDING (V2 — scale into winners)
When a trade reaches +3R favorable, the strategy adds 50% more position size to ride the trend harder:
• Trigger: price moves +3R in your favor (confirmed trend)
• Add: 50% of original notional (total position becomes 150% of original)
• On pyramid: original SL moves to break-even (protects base capital)
• Max 1 add per trade (no stacking)
• No pyramiding on flip trades (only on main entries)
• Effective leverage: 2× normal → ~2.7× during pyramided trades
Why pyramiding works here:
This is a fat-tail system — ~5 trades per year run to +10R or higher. Pyramiding at +3R confirms the move is real before adding capital. The extra 50% rides the remaining +7R to +20R of the winner. Losers never get pyramided (they stop out before +3R).
Impact (5yr backtest):
Without pyramid (V1): $5K → $182K (+105% CAGR, PF 4.63)
With pyramid (V2): $5K → $420K (+143% CAGR, PF 5.54)
→ +37pp CAGR, PF improves, DD barely changes (-20% vs -20%).
Note: Requires exchange leverage ceiling of 4× (set once). The bot uses 2× normally and only scales to ~2.7× during the pyramid window of winning trades.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EXIT RULES
• Stop Loss hit → close (triggers flip if not already a flip)
• Partial TP at +6R → close 15%, SL moves to BE+0.1%, rest runs
• Opposite direction signal → close only (no flip-open on signals, only on SL)
• Flip time-stop at 24h → close
• Drawdown circuit breaker: -25% from peak halts all trading for 7 days
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
RISK MANAGEMENT
• 2× leverage (tested at this level only)
• Position sizing: notional = equity × leverage (deploys full leverage on each trade)
• 24h same-direction cooldown after SL hit
• 2h generic post-exit cooldown (any direction)
• -25% drawdown halt pauses trading for 7 days
• Flip trades use tighter SL (1.5%) + 24h time-stop
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
FULL BACKTEST (Python, Binance futures historical data)
Period: September 2019 — April 2026 (~6.5 years)
Starting capital: $5,000
Leverage: 2×
Results (V2: 15%@6R partial + BE+0.1% + SL-flip + Pyramiding at +3R):
Start → Final: $5,000 → $420,395 (+8,308%)
CAGR: +142.8%
Max DD: -20.3%
Profit Factor: 5.54
Win Rate: 34.2% (25W / 48L)
Total Trades: 73 (~15/yr) — 38 Long, 35 Short, 9 flips
DD halts triggered: 0
V1 (without pyramiding) for comparison:
Start → Final: $5,000 → $181,943 (+3,539%)
CAGR: +105.3% | Max DD: -19.7% | PF: 4.63 | WR: 41.9% | 74 trades
Tuning history (each change validated on 5yr data):
• V5 baseline (no flip): +89% CAGR, PF 4.24, 43 trades
• V6 + SL-flip: +97% CAGR, PF 4.20, 79 trades
• V6 + BE-move after partial TP: PF 4.20 → 4.29
• V6 + 15%@6R partial: CAGR 97% → 105%, PF 4.29 → 4.63
• V7 + Pyramiding at +3R: CAGR 105% → 143%, PF 4.63 → 5.54 (current)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WHY TRADINGVIEW RESULTS DIFFER FROM PUBLISHED NUMBERS
Two reasons:
1. Bar history limit — TradingView loads a finite number of bars for strategy calculation. Free and basic plans only cover ~6–14 months of 1H data. The chart date header shows the full visible range, but the strategy only computes on the loaded bars. Premium plans load more history but usually still less than 6.5 years.
2. Indicator warmup — the Daily EMA50 filter needs ~50 daily bars (~2 months) of warmup data before producing stable values. Python skips the first 100 bars explicitly; Pine Script does not.
For production-accurate numbers, use the Python backtest values above. For a feel of the strategy's pattern, the TV preview is fine as an indication.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WHAT TO EXPECT
This is NOT a high-frequency strategy:
• ~15 trades per year including flip trades
• Median wait between main signals: 7–10 days
• Longest historical quiet gap: ~2 months
• ~55% of trades stopped out (by design — fat-tail capture)
• Average winner >> average loser (each win is ~5–8× an average loss)
• Requires patience — extended quiet periods are normal, not a malfunction
• Fat tails matter: a few mega-winners (10%+ single trades) drive most of the CAGR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SETTINGS (all configurable with tooltips)
Risk Management:
• Leverage: 2× (tested only at this level)
• Risk per trade: 1% (used for dashboard display)
• DD halt: -25% for 168 hours (7 days)
Stop Loss:
• SL max: 2.5% cap
• SL buffer: 0.1%
Partial Take Profit:
• TP trigger: 6R (sweep-verified peak)
• TP close: 15% of position
• SL-to-BE buffer after partial: 0.1% (kills runner-giveback)
Entry Filters:
• RSI long/short zones: 45 / 55
• Engulf body multiplier: 1.0× (any-size engulfing)
• ATR MA length: 50
• Volume SMA length: 20
• Volume spike ratio: 1.5×
Cooldowns:
• Same-dir SL cooldown: 24h
• Generic post-exit cooldown: 2h
SL-Flip:
• Enabled by default
• Flip wait: 1h
• Flip SL cap: 1.5%
• Swing lookback: 10 bars
• Flip time-stop: 24h
Pyramiding (V2):
• Enabled by default
• Pyramid trigger: +3R favorable
• Pyramid size: 50% of original position
• Max 1 add per trade
• Requires 4× exchange leverage ceiling (bot uses 2× normally)
Visuals:
• Clean view toggle (default ON — hides dashboard for publishing)
• Daily EMA50 line toggle
• Timeframe advisory banner (red warning if chart TF ≠ 1H)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
DISCLAIMER
• Past performance does not guarantee future results. Backtests can overfit, especially after extensive parameter tuning.
• Live performance will differ from backtest due to real slippage, partial fills, exchange latency, and market regime shifts.
• TradingView free/basic accounts show a limited window; the authoritative full backtest is Python + Binance archives.
• This strategy is designed for experienced traders who understand leverage, futures trading, stop losses, drawdown risk, and position sizing.
• Small sample size (74 trades over 6.5 years) means regime changes could meaningfully degrade performance. A flat 3–6 month period is not a strategy failure.
• The strategy depends on fat-tail winners. Missing one or two large trends can halve expected CAGR.
• 2× leverage amplifies both gains AND drawdowns. Use capital you can afford to lose entirely.
• Not financial advice — use at your own risk.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CHANGELOG
V2 (April 2026):
• Pyramiding: add 50% position at +3R favorable (amplifies fat-tail winners)
• Move original SL to BE when pyramid fires (protects base capital)
• Max 1 pyramid add per trade, no pyramiding on flips
• Requires pyramiding=1 in strategy settings + 4× exchange leverage ceiling
• CAGR +105% → +143%, PF 4.63 → 5.54, DD barely changed
V1 (April 2026 — first public release):
• Multi-timeframe entry: Daily EMA50 + 4H RSI + 1H (RSI + MACD + Engulfing + ATR + Volume)
• Pattern-based SL with 2.5% cap
• Partial TP: 15% at +6R (small partial for maximum fat-tail capture)
• SL-to-BE move after partial TP (kills runner-giveback)
• SL-flip extension: opposite-direction entry after SL hit with tight 1.5% SL
• 24h same-direction cooldown + 2h generic cooldown
• -25% DD halt for 7 days
• Clean-view toggle for minimal chart display
• Timeframe-mismatch advisory banner
ストラテジー

Smart Trend [Zofesu]Smart Trend is an ATR-based trend following indicator extended with two original filtering layers not present in standard Supertrend implementations: a Hull Moving Average macro trend filter and a Volume Percentile Rank confirmation system.
The ATR trailing stop concept is well established in technical analysis. The original additions in this script are the dual-filter architecture and how the three layers interact to produce signals only when all conditions align.
─────────────────────────────────────
01 — What is Smart Trend?
─────────────────────────────────────
Smart Trend plots a dynamic trend line based on ATR volatility. The line trails price and flips direction when price breaks through it with volume confirmation. Two additional filters gate the signals — ensuring entries align with both macro trend direction and institutional volume participation.
The result is fewer but higher-quality signals compared to a standard ATR trailing stop.
─────────────────────────────────────
02 — Three-Layer Architecture
─────────────────────────────────────
Layer 1 — ATR Trend Engine (Core)
The trend line is calculated using ATR × multiplier applied to high/low. It trails in the direction of the trend and flips only when price closes on the opposite side with confirmation.
Upper band = high - (ATR × multiplier) — support in uptrend
Lower band = low + (ATR × multiplier) — resistance in downtrend
The trend line locks at the highest support or lowest resistance seen during the trend — it only moves in the direction of the trend, never against it.
Layer 2 — HMA Macro Filter (Original)
A Hull Moving Average with a long smoothing period (default 500) acts as a macro trend filter. When enabled, signals are only shown when the ATR trend direction agrees with the HMA macro direction. Conflicting signals (ATR bullish but price below HMA) are shown in gray — indicating low-confidence state.
This filter is the key difference from a standard Supertrend. It eliminates counter-trend entries in strongly trending markets.
Layer 3 — Volume Percentile Rank (Original)
A trend flip requires not just a price break but also a volume confirmation. Volume is ranked as a percentile over 500 bars. A flip only occurs if current volume rank exceeds the configured threshold (default 40th percentile).
This prevents trend flips on low-volume, potentially false breakouts.
─────────────────────────────────────
03 — Settings
─────────────────────────────────────
ATR Period — default 25
Lookback for ATR calculation. Higher = smoother trend line, less reactive.
Volatility Multiplier — default 3.2
Controls band width. Higher = fewer flips, stays in trend longer. Lower = more reactive, more signals.
Enable Main Trend Filter — default on
When on, signals require HMA macro trend agreement. When off, raw ATR signals only.
Main Trend Smoothness (HMA) — default 500
HMA length for macro trend. Higher = slower macro trend, fewer conflicting signals filtered out.
Show Background Bias Tint — default on
Green background = macro trend bullish. Red = macro trend bearish. Gray = conflicting state.
Require Volume Confirmation — default on
When on, trend flips require volume rank above threshold.
Volume Percentile Rank — default 40
Minimum volume percentile required for a trend flip. 40 = volume must be in top 60% of last 500 bars.
─────────────────────────────────────
04 — Signal Colors
─────────────────────────────────────
🟢 Teal line — ATR trend bullish, confirmed by HMA filter
🔴 Red line — ATR trend bearish, confirmed by HMA filter
⚫ Gray line — ATR trend direction conflicts with HMA macro trend — low confidence, avoid trading
BUY label — trend flipped bullish with all filters aligned
SELL label — trend flipped bearish with all filters aligned
─────────────────────────────────────
05 — How To Use
─────────────────────────────────────
Step 1 — Check background color
Green tint = macro trend bullish, look for longs only.
Red tint = macro trend bearish, look for shorts only.
Step 2 — Wait for trend line flip
BUY label = trend flipped to bullish with volume confirmation.
SELL label = trend flipped to bearish with volume confirmation.
Step 3 — Check line color
Teal or Red = high confidence signal (all filters aligned).
Gray = skip — ATR and HMA disagree.
Step 4 — Alerts
Two alert conditions are pre-configured:
Smart Trend: BUY Signal
Smart Trend: SELL Signal
─────────────────────────────────────
06 — Best Timeframes
─────────────────────────────────────
H1, H4 and D1 produce the most reliable signals with default settings.
On lower timeframes consider reducing the ATR Period to 14 and Volume Percentile to 30.
On higher timeframes (W1) consider increasing the ATR Period to 34+.
Works on all asset classes: Indices, Forex, Gold, Oil, Crypto. インジケーター

Dynamic FibTrend Signals [MarkitTick]💡 This indicator represents an advanced multi-layered analytical framework designed to synchronize trend identification with structural market geometry. By integrating adaptive trend-following logic with automated price action mapping, the tool serves as a comprehensive dashboard for traders seeking to identify high-probability entry zones. It solves the common problem of "indicator clutter" by condensing volatility-adjusted trend direction, swing structure recognition, and Fibonacci retracement depth into a single, cohesive visual interface that provides real-time trade execution levels based on current market volatility.
● ✨ Originality and Utility
The primary utility of this script lies in its ability to bridge the gap between momentum-based trend following and static price levels. While many scripts focus on a single aspect of technical analysis, this indicator utilizes a synergistic approach:
It combines the volatility-sensitive nature of SuperTrend with the objective structural points of Pivot Highs and Lows.
It automates the projection of Fibonacci retracement levels based on a dynamic lookback period, ensuring that support and defense zones are always relevant to recent price action.
Unlike standard tools that leave the user to determine their own risk, this system automatically calculates a suggested entry, stop loss, and multiple target levels using Average True Range (ATR) to adjust for current market volatility.
● 🔬 Methodology and Concepts
The core engine operates on a tripartite logic system:
Trend Quantification: The system employs an Average True Range (ATR) calculation multiplied by a specific factor to create a dynamic band around the price. This determines the prevailing bias (Bullish or Bearish) and filters out market noise.
Structural Mapping: Through a pivot-point algorithm, the script identifies "Swing" levels. These are points where the market has shown significant rejection, helping to define the current trading range.
Risk Geometry: Upon a trend shift (signal), the script calculates trade levels. The Entry is based on the previous bar's close, while the Stop Loss and Profit Targets are mathematically derived from the ATR. This ensures that the risk-to-reward ratio remains consistent regardless of whether the market is in a high or low-volatility state.
● 🎨 Visual Guide
The chart interface is designed for high legibility, using distinct color coding and shapes to signify different market states:
SuperTrend Line: A continuous line that turns Green during bullish momentum and Red during bearish momentum. The area between this line and the price is filled with a subtle transparency to highlight the "trend cloud."
Signal Arrows: Bright green "BUY" arrows appear below the bars for bullish transitions, and red "SELL" arrows appear above the bars for bearish transitions.
Swing Markers: Small orange downward triangles mark Swing Highs, while blue upward triangles mark Swing Lows. These are accompanied by dashed horizontal lines projecting the price level forward.
Fibonacci Grid: A series of purple dotted horizontal lines representing key retracement levels (0%, 23.6%, 38.2%, 50%, 61.8%, 78.6%, 100%). These levels provide context for potential pullbacks within the main trend.
Trade Execution Box: When a signal is generated, a yellow entry box appears along with three distinct lines:
Yellow Line: The specific Entry price.
Green Dashed Line: The Target (Take Profit) level.
Red Dashed Line: The Stop Loss level.
Info Table: A professional-grade data table in the top-right corner summarizes the current trend status, the most recent swing levels, and the active trade coordinates for quick reference.
● 📖 How to Use
Trend Identification: Observe the color of the SuperTrend line. If the line is green and the price is above it, focus on long opportunities. If red, focus on shorts.
Confirmation: Look for signals where the SuperTrend flip aligns with a bounce off a Fibonacci level (specifically the 50% or 61.8% "Golden Pocket").
Execution: When a "BUY" or "SELL" arrow appears, refer to the yellow entry zone. The script projects these levels 40 bars into the future to allow for trade planning.
Exit Strategy: Use the target line for profit-taking and the red stop-loss line for capital protection. The 2:1 risk-to-reward ratio is the default, but this can be adjusted in the settings.
● ⚙️ Inputs and Settings
⚡ SuperTrend: Adjust the ATR Length and Factor. A higher factor makes the trend slower and more resilient to whipsaws, while a lower factor makes it more sensitive.
🔄 Swing High / Low: Define the lookback period for pivot detection. Increasing this value will only identify major market turns.
📐 Fibonacci Retracement: Change the lookback bars for the Fibonacci grid. This determines the "height" of the range being measured.
🎯 Trade Levels: Set your desired Risk-to-Reward ratio (default is 2.0). You can also toggle the visibility of the entry, target, and stop lines.
● 🔍 Deconstruction of the Underlying Scientific and Academic Framework
The indicator is built upon the "Volatility Clustering" theory, which suggests that market volatility is not constant but occurs in bursts. By using ATR-based thresholds, the indicator applies a statistical filter that expands and contracts based on realized variance. The swing detection logic utilizes a "Windowed Extrema" approach, which is a fundamental concept in time-series analysis for identifying local maxima and minima within a defined temporal window. Furthermore, the integration of Fibonacci ratios (specifically the 0.618 Golden Mean) incorporates elements of fractal geometry and Elliott Wave theory, positing that market corrections often move in proportions derived from the Fibonacci sequence. The final trade execution component utilizes a fixed-fractional risk management model, ensuring that trade parameters are mathematically optimized for the current market environment rather than being based on arbitrary price distances.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. I expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. インジケーター

MTF Confluence Gauge [JOAT]MTF Confluence Gauge
Introduction
One of the most persistent challenges in technical analysis is the problem of timeframe conflict. A setup that looks perfectly constructed on a 15-minute chart can be swimming against a powerful current on the 4-hour chart, while simultaneously aligned with the daily trend. Traders who operate on a single timeframe are making decisions without full awareness of the forces acting on the instrument across the full spectrum of market participants — from short-term speculators to institutional position traders whose horizons span weeks or months.
The MTF Confluence Gauge addresses this challenge by simultaneously reading the HEMA (Hull-EMA Hybrid) trend state of up to 5 configurable assets across 5 configurable timeframes — producing 25 individual trend readings. Each reading is a directional vote: +1 for bullish HEMA alignment, -1 for bearish alignment, 0 for neutral. These 25 votes are summed into a raw score ranging from -25 to +25, normalized to a -100 to +100 scale, and further refined by local market modifiers including a delta proxy, volume RSI, volatility squeeze state, and local HEMA trend. The result is a composite gauge that represents the aggregate directional consensus across assets and timeframes simultaneously.
This multi-asset capability makes the indicator unique even among multi-timeframe tools. Most MTF indicators read a single instrument across multiple timeframes. The MCG reads multiple instruments across multiple timeframes — enabling users to understand whether a bullish signal on their primary instrument is supported by correlated assets (e.g., sector ETFs, index futures, correlated crypto pairs) or is an isolated move that runs counter to the broader market ecosystem. A long signal supported by bullish readings across correlated assets and multiple timeframes is fundamentally different in quality from one that is isolated to a single timeframe of a single instrument.
Core Concepts
1. HEMA Trend Function for MTF Reads
The HEMA trend function is the foundational building block of every cell in the 5×5 matrix. For each asset-timeframe combination, request.security() retrieves the HEMA values on that timeframe, and the relative alignment of the fast, slow, and macro HEMA layers determines the trend vote. The lookahead parameter is explicitly set to barmerge.lookahead_off to ensure no future data contamination — the trend reading reflects only information that was available at the close of the most recent completed bar of the target timeframe.
f_hema(src, len) =>
ta.ema(2 * ta.ema(src, len / 2) - ta.ema(src, len), math.round(math.sqrt(len)))
f_mtfTrend(sym, tf) =>
h1 = request.security(sym, tf, f_hema(close, hFast), lookahead=barmerge.lookahead_off)
h2 = request.security(sym, tf, f_hema(close, hSlow), lookahead=barmerge.lookahead_off)
h3 = request.security(sym, tf, f_hema(close, hMacro), lookahead=barmerge.lookahead_off)
h1 > h2 and h2 > h3 ? 1 : h1 < h2 and h2 < h3 ? -1 : 0
This function is called 25 times — once per cell in the matrix. The result for each call is stored in a 5×5 array of integers and subsequently used for both the raw score calculation and the table cell coloring.
2. Raw Score and Normalization
The 25 individual trend votes are summed to produce a raw score. This sum is then smoothed with a 3-bar EMA to reduce single-bar noise. Normalization to the range is achieved by dividing the smoothed raw score by 25 (the maximum possible absolute value) and multiplying by 100.
rawScore = 0
for r = 0 to 4
for c = 0 to 4
rawScore += trendMatrix.get(r * 5 + c)
smoothedRaw = ta.ema(rawScore, 3)
normalizedScore = smoothedRaw / 25 * 100
The normalized score forms the base for the histogram and is displayed in the dashboard as the "MTF Bias" value. By normalizing against the theoretical maximum, the scale is consistent regardless of how many assets are configured as neutral (0 votes) — the maximum expressible bull consensus is always +100 and the maximum bear consensus is always -100.
3. Local Score Modifiers
The raw MTF score represents the multi-asset, multi-timeframe consensus, but it does not account for the specific conditions of the primary chart instrument at the current moment. Four local modifier calculations adjust the score based on immediate market context. The local HEMA trend applies a ±10 point bonus. The delta proxy (bar-range-based buying/selling pressure) applies a ±5 point bonus. Volume RSI above threshold applies a ±5 point bonus in the direction of the local trend. The volatility squeeze state applies a ±5 bonus when the market is not squeezing (i.e., volatility is freely expressing direction). All individual bonuses are summed and the combined total is clamped to the range.
localBonus = localTrend * 10
deltaBonus = deltaPos ? 5 : -5
volBonus = highVol ? (localTrend > 0 ? 5 : -5) : 0
sqzBonus = squeezing ? 0 : localTrend * 5
totalScore = math.max(-100, math.min(100, normalizedScore + localBonus + deltaBonus + volBonus + sqzBonus))
displayScore = ta.ema(totalScore, 5)
The final display score is a 5-bar EMA of the adjusted total, providing visual smoothness in the histogram while retaining the responsiveness of the underlying calculations. Local modifiers mean the gauge can show strong bull bias from MTF readings while still being dampened by bearish local conditions — a useful warning mechanism.
4. The 5×5 Color-Coded Table
The visual centerpiece of this indicator is the 5×5 table rendered in the oscillator pane. Each of the 25 cells represents one asset-timeframe combination. Bullish cells are filled with teal and display an upward arrow (▲). Bearish cells are filled with red and display a downward arrow (▼). Neutral cells are filled with violet and display a dash (—). Row 6 of the table shows the column-sum score for each timeframe column, giving an immediate vertical read of how strongly any given timeframe is leaning across all configured assets. This allows traders to identify whether bias is uniform across timeframes or concentrated in specific horizons.
5. Histogram, Squeeze Background, and Reference Lines
The composite score is rendered as a histogram with gradient fill — teal shades above zero transitioning toward deep teal at maximum bull readings, red shades below zero deepening toward maximum bear. Reference lines at ±25 define the "bias threshold" — readings beyond this level indicate a meaningful multi-timeframe lean. Reference lines at ±60 define the "strong conviction threshold" — readings here suggest near-uniform agreement across the majority of configured cells. When the local volatility squeeze is active (detected via ATR compression), the oscillator pane background tints violet, visually indicating that the current score may be elevated or depressed relative to its normal expression due to compressed price action.
Features
25-Cell MTF Matrix: 5 configurable assets × 5 configurable timeframes, each independently returning a HEMA trend vote.
lookahead_off Security Calls: All request.security() calls use barmerge.lookahead_off to prevent future bar data contamination.
Smoothed Normalization: Raw score EMA-smoothed then normalized to for consistent cross-session comparability.
Four Local Modifiers: Local HEMA trend, delta proxy, volume RSI, and squeeze state each contribute bonus points to produce a context-aware composite score.
5×5 Color-Coded Table: Teal/red/violet cells with directional arrows and column score totals for immediate visual matrix reading.
Gradient Histogram: color.from_gradient fill above and below zero with reference lines at ±25 (bias) and ±60 (strong conviction).
Squeeze Background Tint: Violet overlay on oscillator pane background when local volatility compression is detected.
Nine-Row Dashboard: MTF bias label (six levels from STRONG BULL to STRONG BEAR), composite score, raw MTF score, squeeze state, Pearson R, delta bias, volume RSI, and local trend.
Six Alert Conditions: Cross above +25, cross below -25, cross above +60, cross below -60, cross above 0, cross below 0.
Input Parameters
Asset Configuration:
Asset 1-5 Symbols: Ticker symbols for each of the five configurable assets (defaults: current symbol, SPY, QQQ, GLD, TLT or equivalents)
Timeframe Configuration:
TF1-TF5: Five timeframe strings for the matrix columns (defaults: "15", "60", "240", "D", "W")
HEMA Settings:
Fast Length: HEMA fast period for all MTF reads (default: 20)
Slow Length: HEMA slow period for all MTF reads (default: 50)
Macro Length: HEMA macro period for all MTF reads (default: 100)
Local Modifier Settings:
Delta Window: Smoothing period for delta proxy calculation (default: 10)
Volume RSI Threshold: Level above which volume is considered high (default: 65)
ATR Squeeze Length: Period for local volatility compression detection (default: 20)
Display Settings:
Show Table: Toggle the 5×5 trend matrix table (default: true)
Show Histogram: Toggle the composite score histogram (default: true)
Show Dashboard: Toggle the nine-row information table (default: true)
Show Squeeze Background: Toggle the violet compression tint (default: true)
How to Use This Indicator
Step 1: Configure Assets for Your Trading Context
The indicator's value scales directly with the relevance of the configured assets to your primary instrument. For equity traders, configuring sector ETFs correlated with the primary stock (e.g., XLK for technology stocks, XLF for financials) alongside index instruments (SPY, QQQ, DIA) creates a meaningful consensus gauge. For crypto traders, configuring BTC, ETH, and leading altcoins provides an ecosystem-wide directional read. For forex traders, related currency pairs and safe-haven instruments (gold, bonds) capture macro correlation. Spend time selecting assets whose price behavior is structurally linked to your primary trading instrument.
Step 2: Use the Table for Timeframe Structure Analysis
Before looking at the composite score, read the table column by column. If the shorter timeframe columns (15m, 1H) are predominantly teal (bullish) but the longer timeframe columns (Daily, Weekly) are predominantly red (bearish), the market is in short-term counter-trend bounce territory — a higher-risk environment for long trades. Conversely, when both short and long timeframe columns are aligned in the same direction, the consensus is clean and structural. The column score row at the bottom of the table quantifies this alignment numerically.
Step 3: Interpret the Composite Score Levels
The ±25 threshold is the first meaningful level. A score above +25 indicates that more than half of the 25 cells are bullish (adjusted for local modifiers), suggesting a genuine bias rather than random noise. Between +25 and +60, the market has a directional lean but lacks uniform agreement. Above +60, the consensus is strong — the majority of assets across the majority of timeframes are in bullish alignment. The inverse applies below -25 and -60. Cross-zero signals (score moving from negative to positive) indicate a shift in aggregate consensus, which is often a leading indicator of trend changes on the primary instrument.
Step 4: Monitor Local Modifier Impact
The dashboard displays both the raw MTF score and the composite adjusted score. The difference between these two values reflects the cumulative impact of local modifiers. A large positive difference means local conditions (delta, volume, squeeze, HEMA) are amplifying the MTF signal. A large negative difference means local conditions are dampening it — the MTF matrix shows bulls, but the primary instrument itself is not confirming. In these cases, patience is warranted before entering.
Indicator Limitations
The indicator makes 25 request.security() calls plus additional local calculations. On crowded chart setups with many other indicators, this computational load may affect chart loading time. TradingView enforces limits on request.security() calls per script; users should be aware of this limit if adding other indicators with security calls.
All 25 MTF trend readings update on the chart's native timeframe bars. Readings from higher timeframes update only when a new bar completes on that timeframe — the HEMA reading for a weekly timeframe, for instance, updates only at the weekly close. Between weekly closes, the weekly cell reading remains at the prior week's value.
HEMA calculations at very short periods on very high timeframes (e.g., period 20 on a Monthly timeframe) may have insufficient bars to produce statistically stable readings. Users should ensure the target instrument has sufficient history on all configured timeframes.
Asset correlation is dynamic — assets that are correlated in one market regime may decouple in another. A gauge configured for normal market correlation may produce misleading readings during crisis events when traditional correlations break down.
The local modifier adjustments (±10, ±5, ±5, ±5) are fixed contribution weights. They do not adapt to changing market conditions and may disproportionately influence the composite score during specific regimes.
The composite score is a simplified linear aggregation of heterogeneous signals. It treats a weekly HEMA reading as equivalent to a 15-minute HEMA reading in terms of contribution weight, which may not reflect the practical importance of longer timeframe trends.
Originality Statement
The MTF Confluence Gauge is an original multi-dimensional trend aggregation tool that differs meaningfully from existing multi-timeframe indicators.
The 5×5 asset-timeframe matrix — simultaneously reading five user-configurable assets (not just one instrument across five timeframes) across five user-configurable timeframes — is an original architectural choice that enables cross-asset consensus analysis not available in standard MTF indicators.
The HEMA-based trend vote function (requiring all three HEMA layers to be in sequence for a definitive +1 or -1 vote, otherwise returning 0) is a more stringent trend classification than simple moving average crossovers typically used in MTF dashboards.
The four-component local modifier system — HEMA bonus, delta proxy bonus, volume RSI bonus, and squeeze state bonus — applied as additive adjustments to the normalized MTF score before display is an original composite scoring architecture.
The six-level bias label system in the dashboard (STRONG BULL, BULL, SLIGHT BULL, SLIGHT BEAR, BEAR, STRONG BEAR) derived from the composite score threshold ranges provides a human-readable categorical summary not commonly implemented in MTF oscillators.
The visual integration of the 5×5 table within the oscillator pane (rather than as a separate overlay) alongside the gradient histogram, squeeze background tint, and reference lines at ±25 and ±60 represents a unified pane design not seen in comparable indicators.
Disclaimer
The MTF Confluence Gauge is provided for educational and informational purposes only. It is a technical analysis tool and does not constitute financial advice. Multi-timeframe and multi-asset confluence does not guarantee trade success. Correlation between assets changes over time and cannot be relied upon to remain stable. All trading involves risk of loss. Users are solely responsible for their own trading decisions. Please consider your individual risk tolerance and consult a licensed financial professional before engaging in any trading activity.
-Made with passion by officialjackofalltrades
インジケーター

Fibonacci Volatility Cloud [JOAT]Fibonacci Volatility Cloud
Introduction
The relationship between price, trend, and volatility is the core equation of technical analysis — and most indicators address only one or two of its variables at a time. Moving averages define trend but ignore volatility structure. Bollinger Bands embed volatility but use static multipliers with no harmonic rationale. The Fibonacci Volatility Cloud addresses all three simultaneously: it defines trend direction through a triple-smoothed adaptive basis, measures volatility through a user-selectable ATR or standard deviation engine, and projects dynamic support and resistance zones using Fibonacci ratios (0.618, 1.0, 1.618, and 2.618) as the band multipliers.
The choice of Fibonacci ratios is not cosmetic. These values appear persistently in the mathematical structure of natural systems and have demonstrated consistent relevance as price reaction zones in financial markets across asset classes. By anchoring the band distances to these ratios rather than arbitrary integers, the cloud levels carry harmonic weight. A touch at the 1.618 extension is not the same as a touch at the 1.5 extension — the former sits at a recognized inflection ratio, and the indicator is designed to treat it as such.
Beyond the band framework, the indicator features a direction-conditional cloud: during bull trends, the lower (support) bands are filled; during bear trends, the upper (resistance) bands are filled. This directional fill logic means the shaded area of the chart always represents the most relevant zone given the current structural bias. An additional triple-smoothed signal line provides momentum context, and a seven-row dashboard tracks all key states simultaneously. Entry signals for both breakout and bounce conditions are included, along with configurable take-profit targets mapped to specific Fibonacci levels.
Core Concepts
1. Triple-Smoothed Basis
The foundation of every calculation in this indicator is a triple-layered EMA applied to the HLC3 midpoint. Applying a single EMA to price introduces lag proportional to the period length. Applying a second EMA to the result further smooths transient noise while preserving directional information. The third application produces a basis line that is highly resistant to single-candle spikes and short-duration noise patterns while remaining responsive to genuine trend development.
basis = ta.ema(ta.ema(ta.ema(hlc3, len), len), len)
Because the triple smoothing applies the same period three times, the effective lag is higher than a single EMA of the same length — but this is intentional. The basis is not meant to hug price; it is meant to define the structural center of gravity around which volatility bands expand. Users should select the period (default: 20) based on the timeframe and the degree of noise filtering desired.
2. Volatility Measurement Engine
Volatility in this indicator is not fixed. Users choose between ATR (Average True Range) and Standard Deviation as the volatility measure. ATR captures range-based volatility and responds to gap behavior and intraday extremes, making it better suited for instruments with frequent gaps or aggressive wick behavior. Standard Deviation measures the statistical dispersion of the price source around its mean, which is more appropriate for instruments with smooth, continuous price action.
vol = volType == "ATR" ? ta.atr(volLen) : ta.stdev(hlc3, volLen)
The selected volatility value is then multiplied by each Fibonacci ratio to establish the four band distances. This means the bands breathe dynamically with the market — contracting during low-volatility consolidation and expanding during high-volatility trending phases.
3. Fibonacci Band Construction
The four bands are constructed by adding and subtracting the Fibonacci-weighted volatility from the basis. Each ratio carries a distinct behavioral expectation. The 0.618 band is the nearest zone — frequently tested during shallow pullbacks. The 1.0 band (equal to raw volatility) is a neutral midpoint. The 1.618 band represents the primary extension zone and is most frequently associated with momentum reversals. The 2.618 band represents extreme extension, typically only reached during impulsive, high-velocity moves.
f1 = 0.618
f2 = 1.0
f3 = 1.618
f4 = 2.618
upperFib1 = basis + vol * f1
upperFib2 = basis + vol * f2
upperFib3 = basis + vol * f3
upperFib4 = basis + vol * f4
lowerFib1 = basis - vol * f1
lowerFib2 = basis - vol * f2
lowerFib3 = basis - vol * f3
lowerFib4 = basis - vol * f4
The gradient fill between the 0.618 and 2.618 bands is rendered using color.from_gradient, creating a visual intensity gradient where proximity to the extreme band is immediately apparent.
4. Non-Repainting Trend State Machine
Trend direction is determined from the basis line's own slope — not from any external indicator or price crossover. If the current basis is above the previous bar's basis, the trend state is 1 (up). If below, the state is -1 (down). If equal (rare on continuous data), the state persists from the prior bar. Crucially, the state variable is declared with `var` and updates only when a directional change is confirmed — making it a true state machine with no look-ahead dependency.
var int trend = 0
trend := basis > basis ? 1 : basis < basis ? -1 : trend
This approach prevents the trend direction from changing retroactively on historical bars when future data is loaded, which is the core cause of repainting in many similar indicators.
5. Direction-Conditional Cloud Fill
During a bull trend, the cloud fills the lower Fibonacci bands (below basis), shading the support zone where price is expected to find demand. During a bear trend, the upper bands (above basis) are filled, shading the resistance zone where selling pressure is expected. This conditional rendering ensures that the visually dominant cloud region always represents the high-probability reaction zone given the current bias.
cloudFillLow1 = trend == 1 ? lowerFib1 : na
cloudFillLow4 = trend == 1 ? lowerFib4 : na
cloudFillHigh1 = trend == -1 ? upperFib1 : na
cloudFillHigh4 = trend == -1 ? upperFib4 : na
6. Proximity Bar Coloring and Signal Line
Bar colors are driven by the normalized distance from the basis to the 2.618 band. As price approaches the outer Fibonacci boundary, bar colors become more saturated — providing an immediate visual cue of extension. Near the basis, bars fade toward transparency. The signal line is a triple-smoothed version of the basis itself at a configurable signal period, with a gradient fill rendered between basis and signal using color.from_gradient to encode momentum direction.
normDist = math.abs(close - basis) / (vol * f4)
barAlpha = math.min(math.round(normDist * 65), 65)
sig = ta.ema(ta.ema(basis, sigLen), sigLen)
7. Entry Signals and Take-Profit Modes
Two entry signal types are provided per direction. Breakout entries fire when the basis crosses above (long) or below (short) the prior bar's basis value — a trend initiation signal based on the basis itself turning directional. Bounce entries fire when price wicks below the basis during a bull trend but closes back above it — a mean-reversion entry at the structural center. Take-profit aggressiveness maps to Fibonacci levels: Low targets the 2.618 band (letting winners run far), Medium targets the 1.0 band, and High targets the 0.618 band (quick, conservative profit-taking).
longEntry = ta.crossover(basis, basis )
longBounce = trend == 1 and low < basis and close > basis
shortEntry = ta.crossunder(basis, basis )
shortBounce = trend == -1 and high > basis and close < basis
Features
Triple-Smoothed Basis: Three sequential EMA applications to HLC3 produce a low-noise structural centerline that resists single-candle spikes.
Switchable Volatility: ATR or Standard Deviation mode allows the volatility engine to be matched to the instrument's price behavior characteristics.
Four Fibonacci Bands: Harmonic multipliers (0.618, 1.0, 1.618, 2.618) produce band distances grounded in natural ratio mathematics.
Non-Repainting State Machine: Trend direction stored in a var variable updates only on slope changes, ensuring historical plots never shift retroactively.
Direction-Conditional Cloud: Lower bands filled in bull trend, upper bands filled in bear trend — the relevant zone is always the visible one.
Gradient Fill: color.from_gradient between 0.618 and 2.618 bands provides depth perception of extension without cluttering the chart.
Proximity Bar Coloring: Distance to outer Fibonacci band drives bar color alpha, making extreme extensions visually prominent.
Triple-Smoothed Signal Line: EMA applied twice to the basis at a separate signal period creates a momentum crossover reference.
Four Signal Types: Long entry, long bounce, short entry, short bounce — covering both trend continuation and mean-reversion approaches.
Configurable TP Tiers: Three aggressiveness modes map take-profit targets to specific Fibonacci bands.
Seven-Row Dashboard: Real-time display of trend, basis value, distance from basis, current Fibonacci zone, volatility type, TP mode, and signal status.
Input Parameters
Basis Settings:
Basis Length: Period for the triple EMA smoothing (default: 20)
Volatility Type: ATR or StDev (default: ATR)
Volatility Length: Period for volatility calculation (default: 20)
Signal Settings:
Signal Length: Period for the signal line double-EMA (default: 9)
TP Aggressiveness: Low (2.618 target), Medium (1.0 target), High (0.618 target) (default: Medium)
Display Settings:
Show Cloud Fill: Toggle the directional Fibonacci band fill (default: true)
Show Signal Line: Toggle the triple-smoothed signal line (default: true)
Show Entry Signals: Toggle entry and bounce signal markers (default: true)
Show Bar Colors: Toggle proximity-based bar coloring (default: true)
Show Dashboard: Toggle the seven-row information table (default: true)
How to Use This Indicator
Step 1: Identify Trend State from the Cloud
The first check is always the cloud. When the lower Fibonacci bands are shaded (bull trend), the market is expected to support price from below. When the upper bands are shaded (bear trend), the market is expected to cap price from above. This orientation tells you which type of trade to look for: in bull trend, prioritize longs on basis or lower band touches; in bear trend, prioritize shorts on upper band touches or basis resistance.
Step 2: Enter on Breakout or Bounce
Two entry strategies are available and can be used independently or in combination. Breakout entries (basis crossover/crossunder) are momentum-based — they capture the early stage of a new directional basis move. Bounce entries are mean-reversion based — they exploit temporary dislocations where price dips below basis in a bull trend and recovers. The bounce condition (low below basis, close above basis) ensures the recovery is already occurring at signal time, not merely predicted.
Step 3: Manage Exits with Fibonacci Targets
Once entered, the Fibonacci band levels serve as structured exit targets. In Low aggressiveness mode, the target is the 2.618 band — appropriate for trending markets where the volatility expansion phase is expected to carry price far. In High aggressiveness mode, the 0.618 band is the target — suitable for choppy or ranging conditions where overextension is quickly reversed. The chosen TP level is shown in the dashboard.
Step 4: Monitor Dashboard for Contextual Data
The seven-row dashboard provides quantitative context that is not immediately visible from the chart alone. The "% from basis" row shows how extended price is as a percentage of the basis value. The "Fib Zone" row identifies which band pair price is currently between (e.g., between 1.0 and 1.618). This allows precise assessment of where price sits within the volatility structure without manually measuring band distances.
Indicator Limitations
The triple-smoothed basis introduces significant lag relative to the raw price. On short timeframes or fast-moving instruments, the basis will react to trend changes later than a single EMA of equivalent period. This is by design — users seeking faster response should reduce the basis length, accepting more noise in return.
Fibonacci ratios are not guarantees of price reaction. While these levels carry historical significance, markets do not mechanically respect any fixed level. The bands define zones of elevated probability, not certainties.
ATR volatility mode can be distorted by gap events (overnight gaps, earnings). In instruments prone to large gaps, the ATR will temporarily inflate, expanding all bands significantly for the ATR lookback period.
The trend state machine can remain in a prior trend state for extended periods when the basis is flat. During prolonged sideways markets, the cloud fill will reflect the last directional bias rather than the current neutral condition.
Bounce signals require price to wick below (for longs) or above (for shorts) the basis within a single bar. On higher timeframes where candles cover extended periods, this condition can mask the timing of the actual intrabar touch.
The signal line is derived entirely from the basis and shares the same lag characteristics. It should not be treated as an independent data source.
Originality Statement
The Fibonacci Volatility Cloud is an original integration of techniques that individually exist in various forms but have not been assembled in this specific combination or with these specific design choices.
The triple-smoothed EMA basis (EMA of EMA of EMA of HLC3) is a deliberate architectural choice that differs from standard Bollinger Band centerlines (single SMA), Keltner Channel basis (single EMA), and Donchian midpoints. The three-layer approach creates a distinctly different noise-filtering characteristic.
Using Fibonacci ratios (0.618, 1.0, 1.618, 2.618) as band multipliers rather than standard integer multiples (1, 2, 3) is an original application that connects the volatility channel framework to harmonic ratio analysis.
The direction-conditional cloud fill — where the visible fill switches between support bands and resistance bands based on current trend state — is an original visual design not found in standard volatility channel implementations.
The combination of ATR/StDev switchable volatility, triple-smoothed basis, Fibonacci multipliers, directional cloud, triple-smoothed signal line, proximity bar coloring, and a configurable TP tier system in a single cohesive indicator is not replicated by any publicly available TradingView indicator.
The bounce signal definition (low penetrates basis, close recovers above basis within same bar, during confirmed bull trend) is a precise, self-confirming condition that reduces false signals without requiring additional confirmation from a second indicator.
Disclaimer
The Fibonacci Volatility Cloud is provided for educational and informational purposes only. It is a technical analysis tool and does not constitute financial advice. No indicator can predict future market behavior with certainty. Past signal performance does not guarantee future results. All trading involves risk of loss. Users are solely responsible for their own trading decisions. Please consider your individual risk tolerance and consult a licensed financial professional before engaging in any trading activity.
-Made with passion by officialjackofalltrades
インジケーター

Structural Momentum Gauge [JOAT]Structural Momentum Gauge
Introduction
Structural Momentum Gauge is an open-source overlay indicator that fuses an adaptive Kalman filter with a Supertrend ratchet trail and a WMA-based volatility envelope to produce three clearly defined regime states: Bull Trend, Bear Trend, and Range-Bound. Rather than relying on a fixed moving average, the Kalman filter continuously self-calibrates its noise estimate each bar, delivering a smoothed price proxy that adapts to changing market conditions without introducing unnecessary lag. The Supertrend ratchet applied directly to the Kalman value — rather than to a raw price midpoint — generates directional bias changes that are markedly more stable than those produced by conventional price-based systems.
The core problem this indicator addresses is that most trend-following tools either repaint (flipping signals on the same bar as price reverses) or commit to a direction far too slowly. The Kalman filter's gain calculation absorbs noise on low-momentum bars while remaining sensitive during genuine impulses. Layering an envelope breach condition on top means both the Kalman direction and price location relative to the volatility band must agree before a trend regime is confirmed — a dual-gate that substantially reduces false readings on choppy, sideways charts.
Core Concepts
1. Adaptive Kalman Filter
The Kalman filter maintains two persistent state variables: the current estimate (k_est) and the error variance (k_err). Each bar the Kalman gain is computed as k_err / (k_err + noise), where noise equals kAlpha * kPeriod. The gain controls how much the estimate shifts toward the current close. After updating the estimate, the error variance is revised: (1 - gain) * k_err + kBeta / kPeriod. This means a large prediction error pushes the variance higher, increasing the gain on the next bar and making the filter more responsive. When price action settles, the gain contracts and the filter smooths out. The result is a price proxy that is neither the fixed-lag of a simple moving average nor the noise sensitivity of a raw close.
2. Supertrend Ratchet on Kalman
ATR-scaled upper and lower bands are applied around the Kalman value rather than the raw hl2. The ratchet rule then applies: the upper band can only move down (or reset when the Kalman value crosses above it), and the lower band can only move up (or reset when the Kalman value crosses below it). Direction flips when the Kalman value closes through the active band. Applying the ratchet to a pre-filtered price removes the micro-fluctuations that cause excessive direction changes when using hl2 directly.
3. WMA Volatility Envelope
A WMA of the high-low range, multiplied by the deviation parameter, defines half the envelope width. The envelope upper and lower levels are placed symmetrically around the Kalman value. An extended outer cloud — 1.35x the inner envelope — is plotted for spatial context. A price close above the upper envelope sets the range state to 1; a close below the lower sets it to -1. Regime confirmation requires both the Kalman Supertrend direction and the envelope range state to agree in sign:
4. Regime Classification
combined = kBias * rState, where kBias is +1 when the Kalman Supertrend is bullish and rState is +1 when close is above the upper envelope. combined == 1 with kBias == 1 is a confirmed bull trend. combined == 1 with kBias == -1 is a confirmed bear trend. All other states are range or opposing. A rolling 50-bar history computes what percentage of recent bars were in a trending state, producing a Trend Strength percentage.
5. K-Velocity
The rate of change of the Kalman value over three bars, normalized by the current ATR, yields a K-Velocity score from 0 to 1. Velocity dots appear on the Kalman line when the score exceeds 0.5, with their transparency inversely proportional to the velocity — faster moves produce more saturated dots. This creates a visual intensity signal on the trail itself, communicating acceleration and deceleration without a separate panel.
Features
Adaptive Kalman Filter: Self-calibrating price proxy with alpha and beta gain controls — responds faster during impulses, smooths more during consolidation
Supertrend Ratchet on Kalman: Direction-persistent trail applied to the Kalman value, eliminating noise-driven flips on raw price crossovers
Outer Envelope Cloud: Wide ATR envelope filled directionally, providing spatial context at a glance
Inner Envelope Fill: Standard WMA envelope bands with conditional fills that activate in range regime
Triple-Layer Kalman Glow: Three stacked plots at widths 9, 5, and 2 with decreasing transparency create a neon glow shadow effect on the Kalman line
Gradient Core Fills: 6-argument fill() between Kalman and candle mid-body, transparent at the Kalman line and saturated at the body — colored by confirmed regime
K-Velocity Dots: Pulsing circles on the trail during high-velocity trend bars, intensity scales with normalized velocity score
Regime Transition Circles: Circle marker fires at every confirmed regime change — immediate visual alert to state transitions
Bull/Bear Trend Start Arrows: Triangle up/down plotshape fires at the exact bar where both Kalman direction and envelope breach first agree
Trend End Marker: X marker fires when the trending regime ends, helping traders tighten stops or close positions
Kalman Flip Labels: K▲ / K▼ labels placed below/above the Supertrend level when the Kalman bias flips direction
Envelope Squeeze Marker: Golden diamond when envelope width drops below 80% of its recent SMA — flags compression before potential breakout
Gradient Bar Coloring: Bars saturate based on distance from Kalman within envelope range, fading to neutral in range-bound conditions
10-Row Dashboard: Regime state, K-Trend direction, Kalman price, upper/lower band levels, trend bar count, T-Strength %, K-Velocity %, volatility state
Input Parameters
Kalman Filter:
Alpha (Smoothing): Controls base noise level — lower values produce a smoother, higher-lag filter (default 0.01)
Beta (Adapt Rate): Controls how quickly error variance recovers after a large miss — higher values make the filter adapt faster (default 0.10)
Period: Normalises the gain magnitude — acts as a scaling factor on both noise and beta (default 77)
Supertrend:
ST Factor: ATR multiplier for the ratchet bands around the Kalman value (default 0.7)
ST ATR Length: ATR lookback for the Supertrend band calculation (default 7)
Volatility Envelope:
Envelope WMA Length: Lookback for the WMA of high-low range (default 200)
Envelope Deviation: Multiplier on the WMA to set envelope half-width (default 1.2)
Visuals:
Toggles for Supertrend line, envelope bands, gradient fills, Kalman glow, envelope cloud, and dashboard
Bull Color (default cyan #22d3ee), Bear Color (default rose #f43f5e), Range Color (default slate #94a3b8)
How to Use This Indicator
Primary Setup — Trend Confirmation Entry:
Wait for a trend start arrow (triangle up or down) to fire. This marks the bar where the Kalman Supertrend direction and the envelope breach state first agree. Enter in the arrow direction. Trail your stop below the Kalman line for longs or above it for shorts. Exit on a Trend End X marker or when the K▲/K▼ flip label fires against your position.
Using K-Velocity for Sizing:
When velocity dots are dense and bright, momentum is expanding — the trending move is accelerating. When dots thin out or disappear, momentum is fading even if the regime has not changed yet. Reduce size on fade or tighten stops before the trend end marker appears.
Squeeze Setup:
When the golden diamond squeeze marker fires, the envelope is compressing. Wait for price to break the envelope band in either direction. If a trend start arrow follows within the next few bars, this is a high-probability breakout entry aligned with both volatility expansion and regime confirmation.
Reading the Dashboard:
T-Strength above 60% indicates a mature, sustained trend. Values below 30% indicate the regime state is new or unstable — the trend is young and position sizing should reflect that uncertainty.
Indicator Limitations
The Kalman filter's gain is bounded by the alpha and beta parameters. Very low alpha values may make the filter too sluggish to capture short, sharp reversal moves before the ratchet trail catches them
The envelope breach condition for regime confirmation means the indicator will not register a trend until price has already moved far enough from the Kalman center to exit the band — entries will not be at the very start of a move
On instruments with consistently narrow true range (low-liquidity futures, off-hours sessions), the WMA envelope may be so tight that price is rarely inside the band, causing permanent range state classification
The Kalman filter uses close-to-close data and has no concept of intrabar price action; on daily charts, a spike high that closes near the open may produce a different Kalman trajectory than on a lower timeframe
Trend Strength is a rolling 50-bar measure. On very fast timeframes, 50 bars may represent only minutes, making the percentage less meaningful as a maturity gauge
Originality Statement
This indicator is original in its application of a Kalman filter as the supertrend base, the dual-gate regime confirmation system, and the K-velocity visual intensity layer. The publication is justified because:
Applying the Supertrend ratchet to a Kalman-filtered price rather than raw hl2 produces direction changes that are measurably more stable — the Kalman pre-filters noise that would otherwise cause excessive band crossings
The dual-gate regime system (Kalman direction AND envelope breach must agree) produces a stricter trending classification than any single-condition approach, reducing false trend readings in sideways conditions
The K-velocity normalization layer embeds a momentum acceleration measure directly into the trail visualization without requiring a separate panel, communicating both direction and rate-of-change simultaneously
The envelope squeeze detection integrated with trend start arrows identifies the specific condition where compressed volatility resolves into a confirmed regime shift — a novel combination for a Kalman-based system
The Trend Strength rolling percentage provides a trend maturity measure that distinguishes freshly flipped regimes from mature, sustained trends, enabling differentiated position sizing without a separate indicator
Disclaimer
This indicator is provided for educational and informational purposes only and does not constitute financial advice or a recommendation to buy or sell any financial instrument. Past performance of any pattern or signal does not guarantee future results. All trading involves substantial risk. Always use proper risk management and conduct your own independent analysis.
— Made with passion by officialjackofalltrades
インジケーター

Liquidity Architecture Scanner [JOAT]Liquidity Architecture Scanner
Introduction
Liquidity Architecture Scanner is an open-source overlay indicator that maps equal high and equal low liquidity pools — price levels where two consecutive highs or lows are within an adaptive tolerance of each other — into persistent box-based zones with session-colored borders, RSI-strength opacity, intrazone volume POC lines computed from lower-timeframe data, retest tracking with progressive border brightening, and volume-filtered sweep labels. The system continuously monitors active zones for retests and sweeps, maintains live sweep counts on the dashboard, and applies a gradient barcolor that deepens when price is inside or approaching a zone.
The core problem this indicator addresses is that equal highs and equal lows represent clusters of resting limit orders placed by traders defending the same price twice — the institutional order flow concept of liquidity pools. When price sweeps through these levels, it typically triggers those orders and may reverse sharply. Standard equal-level detection tools use a fixed pip tolerance, which breaks down across instruments and timeframes. The LAS uses an EMA-normalized adaptive tolerance derived from recent bar-to-bar variance, making the detection self-calibrating. Layering a RSI filter ensures the equal high is detected above a bull momentum threshold and the equal low is detected below a bear threshold — filtering out levels formed in the wrong momentum context.
Core Concepts
1. Adaptive Tolerance
The tolerance level that determines whether two consecutive highs (or lows) are "equal" is computed from the EMA of average bar-to-bar absolute variance: barVar = avg(|high - high |, |low - low |), smoothed over the configurable EMA length. This variance-normalized tolerance automatically tightens in low-volatility environments and widens in high-volatility ones, ensuring equal-level detection remains meaningful across instruments, timeframes, and market regimes without manual parameter adjustment.
2. RSI Momentum Filter
An equal high only registers if the RSI is above the bull threshold (default 55) at detection time. An equal low only registers if the RSI is below the bear threshold (default 45). This dual-gate ensures that EQH zones are detected during upside momentum — when resting sell orders above the market are the relevant liquidity pool — and EQL zones are detected during downside momentum. Equal highs formed with a weak RSI below 55 represent a different structural context and are excluded.
3. Lower-Timeframe Volume POC
The indicator requests intrabar close and volume data from a lower timeframe via request.security_lower_tf(). For each zone's price range, the algorithm distributes intrabar volume into bins across the zone's height and identifies the bin with the highest cumulative volume — the Point of Control (POC). A dotted line is drawn at the POC price inside each zone box. This provides a volume-based reference level within the zone: the price at which the most trading activity occurred inside the equal-level band. Traders can use the POC as a more precise entry or target reference than the zone midpoint.
4. Session-Colored Borders and RSI Opacity
Each zone's birth session is stored and used to color its border: London zones receive a blue border (#60a5fa), NY zones a pink border (#f472b6), Asia zones a green border (#34d399), and off-hours zones a lighter gray. The zone fill opacity is derived from the RSI distance from the relevant threshold at the time of detection: the farther RSI is from the threshold, the more opaque the fill, communicating higher-conviction detections with stronger visual presence.
5. Retest Tracking and Sweep Logic
Each bar, the indicator checks whether price has entered a zone it was previously outside of. On first retest entry, the border width and brightness increase. On subsequent retests, the border continues brightening and a "RETEST n" label fires at the zone edge. When price closes fully through a zone — above the top for EQH, below the bottom for EQL — the zone is marked as swept, the sweep counter increments, and optionally a "SWEPT" label appears (subject to a volume filter that requires volume > SMA(20) * 1.3 for label display).
Features
Adaptive EMA-Normalized Tolerance: Equal-level detection threshold adjusts automatically to recent bar-to-bar variance, remaining calibrated across all instruments and timeframes
RSI Momentum Gate: EQH only detected when RSI is above bull threshold; EQL only detected when RSI is below bear threshold — filters out levels formed in wrong momentum context
Lower-TF Volume POC: Intrabar volume profiling using request.security_lower_tf() identifies the highest-volume price bin inside each zone
Box-Based Zone Rendering: Solid box fills with configurable session-colored borders and RSI-strength opacity
Session-Colored Borders: London blue / NY pink / Asia green — session context encoded directly in the zone visual
RSI-Strength Opacity: Fill transparency inversely proportional to RSI distance from threshold — stronger momentum detections are more visually prominent
Zone Midpoint Reference Line: Dotted midpoint line inside each zone for quick visual reference of the level center
Retest Tracking: Progressive border brightening and border width increase with each confirmed retest entry; RETEST n label fires on each new entry
Volume-Filtered Sweep Labels: SWEPT labels appear when price closes through a zone, optionally filtered to only show when volume exceeds 1.3x the SMA(20)
Formation Signals: Small EQH/EQL labels fire at the bar of each confirmed zone detection
Proximity Approach Markers: Diamond markers when price first enters within ATR * proximity buffer of a zone edge
Gradient Bar Coloring: Bars deepen in zone color when inside a zone, lighter when approaching, trend-tinted otherwise
Zone Expiry: Zones older than the configurable max age are automatically removed
10-Row Dashboard: Liquidity trend direction, active EQH/EQL counts, sweep counts per side, in-zone state, session, RSI, adaptive tolerance level
6 Alertconditions: Zone formation, zone entry, and liquidity trend flip alerts for both EQH and EQL
Input Parameters
Equal Levels:
EQ Tolerance Multiplier: Scales the adaptive tolerance — higher values allow wider "equal" windows (default 0.05)
Tolerance EMA Length: Smoothing period for the variance normalization EMA (default 500)
RSI Length: RSI lookback for the momentum filter (default 14)
RSI Bull Threshold: Minimum RSI for EQH detection (default 55)
RSI Bear Threshold: Maximum RSI for EQL detection (default 45)
Zone Max Age (bars): Zones older than this are deleted (default 300)
Proximity Buffer (ATR): Approach detection buffer as ATR multiple (default 0.5)
Volume Profile:
Lower TF (Volume): Intrabar timeframe for volume profiling — must be below the chart timeframe (default 3)
POC Bin Count: Number of price bins in the volume profile (default 7)
Visuals:
Toggles for POC line, zone midline, labels, formation signals, sweep labels, sweep volume filter, and dashboard
EQH Color (default violet #a78bfa), EQL Color (default teal #34d399)
How to Use This Indicator
Primary Setup — Liquidity Sweep Entry:
When price sweeps through a zone and a SWEPT label fires, watch for a reversal candle on a lower timeframe. The sweep has collected the resting orders; the price may reverse sharply. Enter on the first opposing candle after the sweep close with a stop beyond the swept level.
Retest Entry:
When price returns to a zone from the opposite direction after having moved away, watch for the RETEST label. Zones that have survived multiple retests (bright borders, high retest count) with no sweep are demonstrating price respect. Enter at the zone edge on the retest candle, stop beyond the far edge.
POC as Precision Reference:
The POC line marks where the most intrabar volume concentrated inside the zone. If price is approaching from below an EQL zone, the POC is a more precise target than the zone top. If price is inside the zone and stalling at the POC, this may be the key inflection level.
Liquidity Trend:
The dashboard Liq Trend shows BULLISH after an EQH sweep (sell-side liquidity was taken, likely pushing price up) and BEARISH after an EQL sweep (buy-side liquidity taken). Using this as a directional bias filter on lower-timeframe setups adds context from the liquidity architecture.
Indicator Limitations
Equal level detection requires consecutive bars with nearly identical highs or lows. In fast, impulsive markets where equal highs/lows rarely form, zone detection frequency will be low regardless of tolerance setting
Lower-timeframe volume profiling adds security calls per bar. On very high-frequency timeframes or instruments with large lower-TF arrays, this may slow indicator rendering
The RSI filter will prevent zone detection in any momentum condition that does not meet the threshold, which means zones formed during neutral RSI readings (45-55) are not mapped — these may still represent meaningful liquidity
Sweep detection requires a confirmed close through the zone boundary. Intrabar wicks that sweep through a level but close back inside will not register as a sweep, despite triggering orders in live trading
Zone expiry by age removes all zones older than the max age parameter regardless of whether they remain structurally significant — very long-lived confluence levels may be deleted in trend-persistent market conditions
Originality Statement
This indicator is original in its adaptive EMA-normalized tolerance, RSI-gated liquidity detection, lower-timeframe volume POC integration, and progressive retest border feedback system. The publication is justified because:
EMA-normalized adaptive tolerance makes equal-level detection self-calibrating across instruments and timeframes without manual adjustment — a significant improvement over fixed-pip tolerance approaches
RSI-gated zone detection filters equal levels by momentum context, ensuring only liquidity pools formed in the correct directional bias are mapped — a filtering mechanism not present in standard equal-level tools
Lower-timeframe volume POC computation inside each zone adds a volume-based precision reference that identifies the intrazone price with the highest transaction concentration — combining liquidity structure with volume analysis in a single overlay
Progressive border brightening as a retest counter provides an ever-updating interaction history on the zone visual itself, eliminating the need for a separate touch-count display
The sweep counter and liquidity trend directional state provide a market microstructure bias indicator derived purely from liquidity pool dynamics, without using any traditional trend filter
Disclaimer
This indicator is provided for educational and informational purposes only and does not constitute financial advice or a recommendation to buy or sell any financial instrument. Past performance of any pattern or signal does not guarantee future results. All trading involves substantial risk. Always use proper risk management and conduct your own independent analysis.
— Made with passion by officialjackofalltrades
インジケーター

Trend Sniper v2.5 - Haar Wavelet Edition [Jamallo]Author's Note:
The previous Trend Sniper v2.5 was built around a 2-Pole Butterworth Super Smoother with Parkinson historical volatility driving the trailing stops. This edition replaces that entire core with a Maximal Overlap Discrete Wavelet Transform (MODWT) using Haar basis functions and a Vervoort ATR trailing stop . Where the Butterworth produced smooth, continuous curves, the Haar wavelet produces structural steps — only updating when true market movement exceeds the calculated noise energy floor. Same Trend Sniper framework, completely different engine under the hood.
Intro
Trend Sniper v2.5 - Haar Wavelet Edition the Maximal Overlap Discrete Wavelet Transform (MODWT) using Haar basis functions. The result is a structural, step-based signal line that ignores minor price fluctuations entirely and only updates when true market movement exceeds a dynamically calculated noise threshold. Combined with a Vervoort ATR trailing stop, dual SuperTrend envelopes, and KAMA midpoint, this indicator provides a complete trend-following framework built on signal processing principles rather than traditional moving average logic.
Breakdown
Haar Wavelet Signal Line (MODWT + Adaptive Deadband)
The core of this indicator is a 5-level cascaded MODWT Haar wavelet decomposition applied to smoothed Heikin-Ashi price. At each level, price is split into a smooth coefficient (trend) and a detail coefficient (noise). The user selects a decomposition level (1–5), controlling the structural scale — from 2-bar micro-structure up to 32-bar macro-structure.
An adaptive deadband then wraps the smooth coefficient: the average absolute detail energy is measured over a lookback window and scaled by a multiplier. The signal line only steps to a new value when the smooth coefficient moves beyond this noise-energy threshold. This creates the characteristic "staircase" behavior — flat holds during noise, clean steps on real moves. The signal line colors by its own step direction: bull when it steps up, bear when it steps down.
Vervoort ATR Trailing Stop
A Sylvain Vervoort-style trailing stop is anchored directly to the Haar wavelet signal line rather than raw price. The stop distance is calculated as ATR × multiplier. In an uptrend, the stop ratchets upward and never retreats; in a downtrend, it ratchets downward. The stop flips when price closes through it. Because it's anchored to the structural wavelet line instead of noisy price, it produces cleaner, more decisive flip points.
The trailing stop uses independent CMO (Chande Momentum Oscillator) + deadband hysteresis for its coloring — it only changes color when confirmed momentum cleanly breaches the CMO threshold, preventing color flicker during consolidation.
Dual SuperTrend Envelopes
Two SuperTrend calculations using smoothed Heikin-Ashi ATR create the outer structure:
Slow SuperTrend (default mult 9.0) — the wide envelope defining macro trend boundaries
Fast SuperTrend (default mult 6.0) — combined with the signal line to create the Fast Trigger dots
The Fast Trigger is the midpoint of the fast SuperTrend and the Haar signal, plotted as orange circles for quick visual reference of momentum alignment.
KAMA Midpoint & 4-State Fill
A Kaufman Adaptive Moving Average smooths the midpoint between the slow SuperTrend and the Haar signal. The fill between the KAMA midpoint and the signal line uses four distinct color states based on whether price is above/below the slow SuperTrend and whether the signal is above/below the fast trigger — providing an immediate visual read on trend alignment and momentum phase.
End
The wavelet decomposition reveals the true step-by-step nature of price movement by mathematically separating signal from noise — use it alongside your own risk management and confluence analysis. Trade the structure, not the noise. インジケーター

Realtime Non-Repainting EntriesName:
Realtime Non-Repainting Entries
Short title:
RT NP Entries
Summary
Realtime Non-Repainting Entries is a focused entry-only market-structure tool built around a causal transform path and reversal-confirmation logic. It is designed to mark live entry opportunities and preserve confirmed historical entry markers without turning into a full trade-management engine. Its main purpose is to provide a cleaner, more structured entry framework than raw price alone while remaining simpler and more universal than a full operational system.
This script is intentionally narrower than a full transform engine. It does not include exits, split trade management, replay reconstruction, forecast candles, or the broader integrated state logic used in a larger operational engine. Instead, it concentrates on one problem only: producing realtime entry markers from a causal transform path while keeping closed-bar historical signals stable.
How it works
The script first builds a causal transform line from raw price using ATR-scaled adaptive movement. That transform is not meant to be a full hindsight best-fit reconstruction. It is a live-updating, causal path that tries to reduce some raw-price noise while staying responsive enough to expose directional shifts.
From there, the script tracks transform swing state. When transform direction changes, it arms a reversal candidate from the prior swing extreme. That candidate is then evaluated by a small set of confirmation rules, including:
minimum transform movement away from the pivot in ATR terms
optional close-beyond-pivot-close confirmation
optional transform-direction agreement
optional raw-trend agreement
and a cooldown to reduce immediate repeat signals
When those conditions are satisfied on a closed bar, the script prints a confirmed historical entry marker. While the current bar is still forming, it can also show a live candidate marker, which may update until the bar closes. That means the script is causal and historically non-repainting on closed bars, while still being allowed to update on the current live bar.
Important behavior note
This script is best understood as:
historically stable on closed bars
live-updating on the current bar
So “non-repainting” here means confirmed historical entry markers do not rewrite after bar close. It does not mean the current unfinished bar cannot update before confirmation.
Features
causal transform path
realtime regime/state coloring
armed reversal candidates
confirmed historical long and short entries
optional live candidate markers
minimum move-away filter
optional close-beyond-pivot-close filter
optional transform agreement filter
optional raw-trend agreement filter
cooldown filter
long and short alertconditions
compact status table
Strengths
cleaner entry framing than raw-price-only flips
easy to understand and visually inspect
useful as a standalone entry tool
historically stable confirmed markers on closed bars
live candidate visibility before confirmation
simpler and more universal than a full integrated engine
does not require trade-management complexity to be useful
Weaknesses
does not solve the false-pivot problem universally
entry quality will still vary by market and timeframe
no exits, no profit handling, no loss handling
no replay-based trade-state reconstruction
no full forecast/probability layer
some filters may still remove both good and bad signals
current-bar live candidates can update before bar close
Who it’s for
This script is best suited for:
traders who want a cleaner entry-only tool
users looking for realtime directional shift markers
traders who want historically stable confirmed entry markers
users who want a simpler transform-based script
users interested in market-structure style entries without a full operational engine
Who it’s not for
This script is not best suited for:
users wanting full trade management
users expecting exits and complete automation
users expecting universal high-accuracy winner/loser separation
users wanting a full replay/stat engine
users wanting a complete forecast system
users looking for a guaranteed low-false-signal solution
Known limitations
This script is better at:
structuring entries
cleaning up directional state
and showing stable historical entry markers
than it is at:
reliably separating all future winners from losers before entry
It should be viewed as an entry-focused structure tool, not as a complete predictive engine or full trade-management system.
Final note
Realtime Non-Repainting Entries is a focused, entry-only script built around realtime causal entry structure and historically stable confirmed entry markers. It is designed to be useful and clear without turning into a full operational engine. Its value is in structuring entries more cleanly than raw price alone, not in solving the entire trading problem. インジケーター

Meridian Scaffold [JOAT]Meridian Scaffold
Introduction
Meridian Scaffold is an advanced open-source volatility band structure that builds adaptive price envelopes around a Jurik Moving Average (JMA) baseline with integrated range-lock dampening. Unlike standard Bollinger Bands or Keltner Channels that use fixed statistical measures, this indicator constructs its bands using ATR-Fibonacci expansion levels with auto-calibrating width, overlays a ZEMA trend bias system, and includes a full volatility regime classification engine with hysteresis state transitions. The result is a band structure that adapts its behavior to the current market phase — compressing tightly during consolidation, expanding proportionally during trends, and providing clearly defined reaction levels at Fibonacci-derived distances from the adaptive baseline.
This indicator addresses a core problem with conventional band indicators: they treat all market conditions the same. A Bollinger Band expands and contracts based on standard deviation alone, with no awareness of whether the market is trending, compressing, or in a whipsaw phase. Meridian Scaffold solves this by fusing a volatility regime classifier (compression, normal, expansion) with adaptive band construction, so the bands behave differently depending on the detected market phase. During compression, the baseline locks to a simple average to prevent false signals. During expansion, the bands widen using Fibonacci ratios to project realistic target levels.
Core Concepts
1. JMA Adaptive Baseline with Range-Lock Dampening
The centerline of the band structure is a Jurik Moving Average — an adaptive filter that tracks price closely during fast moves and smooths aggressively during noise. The JMA implementation includes a full volatility tracking system that measures the relative volatility of the input signal:
// Relative volatility determines JMA responsiveness
float rv = math.min(math.max(avgVolty > 0 ? volty / avgVolty : 1.0, 1.0), maxPow)
float adaptiveAlpha = math.pow(beta, math.pow(rv, pow1))
When relative volatility drops below a configurable threshold (the "range lock" condition), the indicator switches from the JMA to a simple moving average. This prevents the baseline from oscillating during low-volatility chop, producing a flat, stable reference line that clearly communicates "no trend present." When volatility returns, the JMA resumes tracking.
2. ATR-Fibonacci Expansion Levels
Rather than using standard deviation (which assumes normal distribution) or fixed ATR multiples, the bands are constructed at Fibonacci-derived distances from the baseline. The ATR is first smoothed using a ZEMA technique (double-EMA extrapolation) to remove noise from the volatility measure itself:
float atrZ1 = ta.ema(atrRaw, 21)
float atrZ2 = ta.ema(atrZ1, 21)
float atrSmooth = atrZ1 + (atrZ1 - atrZ2)
This ZEMA-smoothed ATR is then multiplied by configurable inner and outer factors to create the band levels. The default inner band at 1.5x ATR captures normal price oscillation; the outer band at 2.8x ATR marks extended moves. Additional Fibonacci extension levels at 1.618x and 2.618x ATR provide projection targets for breakout moves.
3. Volatility Regime Classification
The indicator classifies the current volatility environment into three states using a hysteresis state machine:
Compression: ATR is significantly below its long-term average (ratio < 0.6). Bands contract, baseline locks. This phase often precedes breakouts
Normal: ATR is near its average. Standard band behavior applies
Expansion: ATR is significantly above its long-term average (ratio > 1.5). Bands widen, momentum signals are prioritized
The hysteresis mechanism prevents rapid switching between states. Entry into expansion requires a ratio above 1.5, but exit only occurs when the ratio drops below 1.2. This creates stable regime classifications that don't flicker on every bar.
4. ZEMA Trend Bias
A Zero-Lag EMA calculated on the baseline provides directional bias. When the baseline is above its ZEMA, the bias is bullish; below, bearish. The spread between the baseline and ZEMA quantifies the strength of the directional conviction. This bias colors the baseline and bands to provide immediate visual feedback on trend direction.
5. Band Squeeze Detection
The indicator monitors bandwidth (the percentage distance between outer bands relative to the baseline) against its own rolling average and standard deviation. When bandwidth drops below the average minus half a standard deviation, a squeeze condition is flagged. Squeezes represent compressed volatility that statistically tends to resolve with an expansion move.
Features
Slope-Aware Baseline Glow: The baseline renders with a multi-layer glow effect whose intensity scales with the normalized slope. Steeper trends produce more vivid glow; flat periods produce subtle, muted rendering
Regime-Adaptive Band Coloring: Band colors shift automatically based on the volatility regime — compression phases use iris/purple tones, expansion phases use ember/warm tones, and normal phases use neutral slate
Kaufman Efficiency Scoring: The Kaufman Efficiency Ratio (net price movement divided by total path length) is calculated and displayed, providing a 0-1 measure of how efficiently price is moving. Values above 0.4 indicate strong directional movement; below 0.2 indicates chop
Mean Reversion Signals: When price touches or exceeds the outer band and then re-enters the inner band, the indicator generates a mean-reversion signal. These are most reliable during normal and compression regimes
Breakout Signals: When price closes beyond the outer band during an expansion regime with volume confirmation, a breakout signal is generated. These indicate potential trend continuation
Trend Strength Composite: A composite score combining slope strength, Kaufman efficiency, R-squared linearity, and regime alignment provides a single 0-100 measure of overall trend quality
16-Row Dashboard: Displays baseline value, regime state, trend bias, bandwidth, squeeze status, Kaufman ER, slope strength, R-squared, trend composite score, band levels, regime duration, and position relative to bands
Input Parameters
Baseline:
JMA Period: Adaptive baseline smoothing length (default: 21)
JMA Phase: Lead/lag adjustment (default: 0)
JMA Power: Responsiveness curve (default: 0.45)
Range Lock Threshold: Relative volatility below which the baseline locks flat (default: 0.55)
Bands:
ATR Length: Period for ATR calculation (default: 14)
Inner Band Multiplier: ATR multiple for inner band (default: 1.5)
Outer Band Multiplier: ATR multiple for outer band (default: 2.8)
Regime:
Regime Lookback: Period for volatility regime classification (default: 50)
Visuals:
Toggles for bands, Fibonacci extensions, glow effects, squeeze markers, regime background, bar coloring, and dashboard
Zone opacity control for band fill transparency
How to Use This Indicator
Step 1: Identify the Volatility Regime
Check the dashboard or observe the band coloring. Compression (purple/iris bands) means prepare for a breakout — avoid trend-following entries. Expansion (warm/ember bands) means trend-following setups are favored. Normal (slate bands) means standard analysis applies.
Step 2: Read the Baseline Bias
The baseline color and ZEMA relationship tell you the directional bias. Only look for long setups when the baseline is above ZEMA (bullish bias) and short setups when below (bearish bias).
Step 3: Use Bands as Context Levels
The inner band defines the normal oscillation range. Price consistently above the inner upper band indicates strong bullish momentum. The outer band marks extended territory where mean-reversion risk increases. Fibonacci extensions at 1.618x and 2.618x provide projection targets for breakout moves.
Step 4: Trade Squeezes
When a squeeze is detected (gold dots on the baseline), wait for the squeeze to release. The direction of the first strong move out of the squeeze often sets the trend for the next phase. Combine with the ZEMA bias for directional confirmation.
Step 5: Monitor Trend Quality
The trend strength composite score tells you how clean the current trend is. Scores above 60 indicate high-quality trends worth riding. Scores below 30 suggest choppy conditions where band-based mean-reversion strategies may work better.
Indicator Limitations
The JMA baseline, while adaptive, still lags price during sharp reversals. The range-lock feature helps during consolidation but cannot eliminate lag during genuine trend changes
ATR-based bands assume volatility is relatively stable over the measurement period. During news events or gap openings, the bands may not accurately reflect the new volatility environment for several bars
The volatility regime classifier uses hysteresis which creates stability but also delays regime transitions. A compression-to-expansion shift may be identified several bars after the breakout begins
Fibonacci extension levels are mathematical projections, not guaranteed targets. Price may reverse before reaching them or blow through them entirely
Squeeze detection identifies compressed volatility but does not predict the direction of the subsequent expansion. Additional directional analysis is required
The indicator works best on liquid instruments with consistent volatility patterns. Thinly traded instruments may produce unreliable regime classifications
Originality Statement
This indicator is original in its integration of adaptive baseline technology with regime-aware band construction. While ATR bands and JMA are established concepts, this indicator is justified because:
The JMA range-lock mechanism that switches to SMA during low-volatility periods is a novel approach to preventing false baseline oscillations in chop — standard JMA implementations do not include this feature
ZEMA-smoothed ATR for band construction removes noise from the volatility measure itself, producing cleaner band edges than raw ATR
The three-state volatility regime classifier with hysteresis transitions provides context-aware band behavior not available in standard Bollinger or Keltner implementations
Fibonacci-derived expansion levels integrate harmonic ratio theory with volatility measurement, providing mathematically grounded projection targets
The trend strength composite score synthesizes multiple independent quality measures (slope, efficiency, linearity, regime) into a single actionable metric
Slope-aware glow rendering and regime-adaptive coloring provide instant visual feedback on market conditions without requiring dashboard reading
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. Band levels, regime classifications, and signals are mathematical calculations based on historical data and do not predict future price movement. Squeeze conditions do not guarantee subsequent breakouts, and breakout signals do not guarantee trend continuation. 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
インジケーター

Cadence Veil [JOAT]Cadence Veil /b]
Introduction
Cadence Veil is an advanced open-source regime classification indicator that fuses an H-Infinity adaptive filter, R-squared efficiency gating, dual-window chop scoring, and Kaufman adaptive efficiency into a unified five-state regime engine. The indicator classifies every bar into one of five market states — Expansion Bull, Expansion Bear, Compression, Whipsaw, or Dormant — using a hysteresis state machine that prevents rapid flip-flopping between regimes. It then overlays volatility envelope bands, a ZEMA bias ribbon, structural pivot tracking, regime shift boxes, and gradient visualization to create a complete market phase recognition system.
The core problem this indicator solves is regime misidentification. Most traders apply the same strategy regardless of market conditions — trend-following in chop, mean-reversion in trends, or trading during dormant periods when nothing meaningful is happening. Each of these mismatches leads to losses. Cadence Veil explicitly classifies the current regime so traders can select the appropriate strategy for the conditions. A compression regime calls for breakout preparation. An expansion regime calls for trend-following. A whipsaw regime calls for caution or sitting out entirely. A dormant regime means the market lacks the energy for any strategy to work reliably.
Core Concepts
1. H-Infinity Adaptive Filter
The centerline of the indicator uses an H-Infinity filter rather than a conventional moving average. H-Infinity filtering is a control theory technique designed to produce optimal estimates under worst-case noise conditions. Unlike a Kalman filter (which assumes Gaussian noise), the H-Infinity filter makes no assumptions about noise distribution, making it more robust in financial markets where price noise is decidedly non-Gaussian:
for i = 0 to hinfOrder - 1
float s = array.get(hinfState, i)
float e = array.get(hinfError, i) + hinfNoise
float g = e / (e + hinfDist)
array.set(hinfState, i, s + g * (close - s))
array.set(hinfError, i, (1.0 - g) * e)
The filter maintains internal state and error estimates that adapt each bar. The gain parameter (error divided by error plus disturbance) determines how much the filter trusts new data versus its existing estimate. Higher disturbance values make the filter more conservative (smoother); lower values make it more responsive. The filter order parameter controls how many state dimensions are tracked, with higher orders providing more sophisticated noise modeling.
2. R-Squared Efficiency Gate
R-squared measures how well price movement fits a linear regression line. A high R-squared (close to 1.0) means price is moving in a straight, efficient line — a strong trend. A low R-squared (close to 0) means price is moving randomly with no directional efficiency:
float r2Raw = math.pow(ta.correlation(close, bar_index, effLen), 2)
float r2Smooth = ta.sma(r2Raw, effSmooth)
The indicator uses an auto-calibrating threshold: the rolling mean of R-squared plus k standard deviations. This means the threshold adapts to the instrument's typical trending behavior. A hysteresis band prevents the gate from flickering — once open, R-squared must drop further to close the gate than it needed to rise to open it.
3. Dual-Window Chop Scoring
Chop is measured using the efficiency ratio concept: the net price movement divided by the total path length over a window. A perfectly straight move scores 0 (no chop); a move that goes nowhere despite lots of bar-to-bar movement scores 1 (maximum chop). The indicator uses two windows — a fast window (default 14 bars) for recent chop and a slow window (default 50 bars) for structural chop — and blends them:
f_chop(int len) =>
float netMove = math.abs(close - close )
float pathLen = math.sum(math.abs(close - close ), len)
pathLen == 0.0 ? 1.0 : 1.0 - (netMove / pathLen)
float chopBlend = (chopFastVal + chopSlowVal) / 2.0
The dual-window approach catches both short-term whipsaws and longer-term structural chop that a single window might miss.
4. Kaufman Efficiency Ratio
The Kaufman ER provides a third independent measure of trend quality. It compares the absolute net price change over N bars to the sum of all bar-to-bar changes over the same period. Values near 1.0 indicate efficient, directional movement; values near 0 indicate noisy, non-directional movement. This complements R-squared (which measures linearity) and chop score (which measures path efficiency) by measuring absolute directional efficiency.
5. Composite Trend Score and State Machine
The three measures are blended into a single composite trend score:
float trendScore = (kaufER * 0.35) + ((1.0 - chopBlend) * 0.35) + (r2Smooth * 0.30)
This score, combined with the H-Infinity filter slope and volatility ratio, feeds into a five-state machine with persistence requirements. A candidate state must hold for a configurable number of consecutive bars (default 3) before the regime officially transitions. This prevents single-bar noise from triggering false regime changes.
The five states are:
Expansion Bull: R-squared gate open, trend score above threshold, H-Infinity slope positive
Expansion Bear: R-squared gate open, trend score above threshold, H-Infinity slope negative
Compression: High chop score, low volatility ratio — market is coiling
Whipsaw: High volatility but also high chop — dangerous conditions with large moves in both directions
Dormant: None of the above conditions met — market lacks energy or direction
6. Volatility Envelope Bands
Adaptive bands are constructed around the H-Infinity line using ZEMA-smoothed ATR. The bands scale their width based on the current regime: narrower during compression (0.7x), wider during expansion (1.2x), and standard during normal conditions. This regime-adaptive scaling means the bands contract when the market is coiling (tightening the range for breakout detection) and expand when the market is trending (giving the trend room to breathe).
Features
Five-State Regime Classification: Clear categorical identification of the current market phase with color-coded rendering throughout the indicator
H-Infinity Core Line with Glow: The adaptive filter line renders with a gradient glow whose color and intensity reflect the current regime and trend score
Regime Shift Boxes: When the regime changes, a colored box is drawn that expands to encompass the price range of the new regime, providing a visual record of regime transitions
Regime Shift Labels: Labels at regime transitions show the new regime abbreviation and the trend score at the time of transition
ZEMA Bias Ribbon: A filled ribbon between the H-Infinity line and its ZEMA shows directional bias with bull/bear coloring
Structural Pivot Detection: Swing highs and lows are identified and labeled with regime context — pivots formed during expansion regimes are colored differently than those formed during compression
Structure Lines: Dashed horizontal lines at the most recent swing high and low provide support/resistance reference
Envelope Breach Detection: The dashboard reports whether price is inside the bands, above/below the inner band, or above/below the outer band
Composite Signal Strength: A 0-100 score measuring how aligned all subsystems are (R-squared gate, Kaufman ER, chop score, and ZEMA bias)
Regime History Tracking: The dashboard shows the last three regime states in sequence, revealing the pattern of market phase transitions
Gradient Background Zones: Background coloring shifts on a gradient from compression tones to the current regime color based on the trend score
Regime-Aware Bar Coloring: Candle colors reflect the current regime with momentum-based gradient intensity
14-Row Dashboard: Displays regime state, duration, trend score, signal strength, R-squared gate status, chop blend, Kaufman ER, volatility ratio, H-Infinity gain, ZEMA bias, swing levels, envelope position, and regime history
Input Parameters
H-Infinity Filter:
Filter Order: Number of state-space dimensions (default: 3, range: 1-8)
Process Noise: Expected noise level (default: 0.5)
Disturbance: External disruption parameter (default: 1.0)
Efficiency Gate:
R-Squared Length: Correlation calculation period (default: 30)
Smoothing: R-squared smoothing period (default: 10)
Threshold k: Standard deviations above mean for auto-threshold (default: 1.0)
Chop Detector:
Fast Window: Short-term chop measurement (default: 14)
Slow Window: Long-term chop measurement (default: 50)
State Engine:
Entry Persistence: Consecutive bars required for regime transition (default: 3)
Hysteresis Band: Width of the hysteresis zone to prevent flickering (default: 0.15)
Volatility Envelope:
Inner/Outer ATR Multipliers: Band distance from the core line (default: 1.2/2.4)
ATR Length: Period for ATR calculation (default: 14)
Visuals:
Toggles for envelope bands, ZEMA bias ribbon, structural pivots, structure lines, regime shift boxes, regime shift signals, background zones, bar coloring, and dashboard
How to Use This Indicator
Step 1: Identify the Current Regime
The dashboard's regime field and the background coloring immediately tell you the market phase. This is the most important piece of information — it determines which strategy to apply.
Step 2: Match Strategy to Regime
Expansion Bull/Bear: Use trend-following strategies. Enter pullbacks to the H-Infinity line or inner band in the direction of the expansion
Compression: Prepare for a breakout. Tighten stops, reduce position sizes, and watch for the regime to shift to expansion. The ZEMA bias may hint at the breakout direction
Whipsaw: Reduce exposure or sit out. This regime produces large moves in both directions that stop out trend-followers and mean-reversion traders alike
Dormant: No edge exists. Wait for the market to wake up
Step 3: Use Signal Strength for Conviction
The composite signal strength (0-100) tells you how aligned all subsystems are. A 75+ score during an expansion regime is high-conviction. A 25 score during expansion suggests the regime may be weakening.
Step 4: Monitor Regime Transitions
Regime shift boxes and labels mark exactly where transitions occurred. The most profitable trades often come at the transition from compression to expansion — the breakout from a coiled market.
Step 5: Read the Regime History
The history chain (e.g., "COMP > EXP+ > DORM") reveals the market's recent phase pattern. A sequence like "COMP > EXP+ > COMP > EXP+" suggests a market that trends in bursts between consolidation periods.
Cadence Veil showing a regime transition sequence: compression (purple box) resolving into expansion bull (green box), with the H-Infinity line glow intensifying, envelope bands widening, and the trend score rising in the dashboard
Indicator Limitations
The H-Infinity filter, while theoretically robust, has three parameters (order, noise, disturbance) that significantly affect behavior. Optimal settings vary across instruments and timeframes and may require experimentation
The persistence requirement for regime transitions (default 3 bars) creates a delay. Fast regime changes may be identified several bars after they begin. This is a deliberate trade-off for stability
The five-state classification is a simplification of continuous market behavior. Markets can exist in states that don't cleanly fit any category, and the boundaries between states are inherently fuzzy
R-squared, chop score, and Kaufman ER all use lookback windows. They describe what the market has been doing, not what it will do. A regime can change immediately after being classified
The whipsaw state is identified but no strategy is recommended for it because whipsaw conditions are inherently difficult to trade profitably. The indicator's value here is in warning you to reduce exposure
Volatility envelope bands adapt to the regime but still use ATR, which is backward-looking. Sudden volatility shifts (news events, gaps) may not be reflected in the bands for several bars
Originality Statement
This indicator is original in its application of control theory (H-Infinity filtering) to market regime classification and its synthesis of multiple independent efficiency measures into a unified state machine. While regime detection and adaptive filtering are established concepts, this indicator is justified because:
The H-Infinity filter is rarely used in technical analysis. Its worst-case noise optimization makes it theoretically more appropriate for financial markets than the more common Kalman filter, which assumes Gaussian noise
The triple-measure efficiency assessment (R-squared linearity + dual-window chop + Kaufman efficiency) provides more robust regime detection than any single measure. Each captures a different aspect of market behavior
The five-state classification with hysteresis persistence requirements produces stable, actionable regime labels rather than the flickering binary (trending/ranging) classifications common in simpler indicators
Regime-adaptive volatility envelope scaling automatically adjusts band behavior to the detected market phase, providing context-appropriate support/resistance levels
The composite signal strength score synthesizes all subsystems into a single conviction measure
Regime shift boxes provide a visual record of market phase transitions that aids in pattern recognition across longer timeframes
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. Regime classifications are based on historical data analysis and do not predict future market phases. A market classified as "Expansion Bull" can reverse at any time. Compression does not guarantee a subsequent breakout, and the direction of any breakout is not predicted by the compression classification. 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
インジケーター

インジケーター

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 ストラテジー

Volume Acceptance Zones [BigBeluga]Volume Acceptance Zones is a market structure tool designed to identify areas of price acceptance and statistically stretched extremes. By modeling market activity as a continuous distribution, the indicator highlights where price is actively accepted versus where it behaves as a statistical outlier.
The goal is not prediction, but context — separating balanced price behavior from structurally stretched conditions.
🔵 CONCEPTS
The indicator calculates a Volume-Weighted Balance Price , representing the center of gravity for participation over a selected range.
Price dispersion around this balance point is measured using volume-weighted standard deviation .
The area within ±1 standard deviation forms the Acceptance Zone , where the majority of activity is concentrated.
Prices beyond this zone are treated as outliers , where participation thins and market reactions become more likely.
These zones do NOT represent guaranteed probabilities — they describe participation density and behavioral extremes.
🔵 STANDARD DEVIATION, BELL CURVE & OUTLIERS
At the core of this indicator lies the concept of standard deviation , which describes how price activity clusters around a central value.
When activity is observed over time, it tends to form a distribution where:
Most activity concentrates near a central balance level.
Fewer observations occur as price moves further away from that balance.
This behavior can be visualized conceptually as a bell-shaped distribution — a practical way to describe market participation density.
Prices that move beyond the Acceptance Zone deviate meaningfully from the balance of participation.
These areas are treated as outliers , where price is statistically stretched relative to recent market behavior.
Outliers do not imply immediate reversals — they signal that price is operating in a low-acceptance environment.
Market responses in these zones often include rejection, consolidation, or strong continuation if acceptance builds.
🔵 NEW: INTEGRATED FREQUENCY PROFILE
While the zones are calculated using volume-weighted math, the visual profile has been updated to a Frequency-Based Distribution . This transition allows you to see "Time at Price" rather than just raw volume.
Frequency Distribution: The profile counts the number of bars (occurrences) spent at each price bin. This highlights levels of high interest where the market finds it easy to trade, effectively acting as a Time-Price Opportunity (TPO) proxy.
Time-Based Sentiment: Each bin is split into Bull/Bear frequency. This shows which side was in control during the time spent at that specific level, identifying where buyers or sellers were more persistent.
Filtering Noise: By using frequency instead of raw volume, the profile avoids being skewed by single high-volume spikes, focusing instead on where the market established a sustained presence.
🔵 FEATURES
Acceptance Zone (±1σ)
Highlights the primary balance area where price is most actively accepted and rotational behavior is common.
Extreme Zones (±2σ)
Marks statistically stretched prices where acceptance weakens and reactions or trend continuation may occur.
Volume-Weighted Balance Line
Acts as a structural fair-value reference similar to an anchored VWAP.
Outlier Detection
Price closing beyond the acceptance zone is flagged as an outlier, helping identify exhaustion or breakout conditions.
Distribution Labels
Displays how price activity is distributed between acceptance and extreme zones, reinforcing the concept visually.
Flexible Anchoring
Calculations can be based on a fixed lookback or the visible chart range.
🔵 HOW TO USE
Treat the Acceptance Zone as a balance area where price is fairly valued and mean-reversion is common.
Observe how price behaves in Extreme Zones — rejection may signal reversion, while sustained acceptance may indicate trend continuation.
Frequency Nodes: Use the Frequency Profile to identify where the market is "stalling." High frequency nodes often act as magnets for price, while low frequency gaps (low time spent) often lead to fast price movement.
Use outlier signals in combination with trend bias, liquidity levels, or momentum tools.
🔵 CONCLUSION
Volume Acceptance Zones reframes market analysis around participation density. By distinguishing accepted price behavior from statistical outliers and providing a frequency-based view of time-at-price, the indicator helps traders understand when the market is balanced—and when it is structurally stretched. インジケーター

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 インジケーター

Scalper Pro 3 Min GoldDesigned specifically for low-timeframe scalping (ideal for 1m and 3m charts, especially on XAUUSD/Gold), the Scalper Pro 3 Min Gold is an advanced market structure breakout indicator that filters out market noise to catch explosive momentum.
Instead of giving a signal at every minor high/low cross, this script uses strict logic to ensure you only enter high-probability setups. It automatically calculates your risk and visualizes the exact Entry, Stop Loss, and Take Profit zones directly on your chart.
Key Features:
Smart Structure Breakouts: Uses internal Pivot High/Low calculations to identify true Market Structure Shifts (MSS). Stop losses are dynamically placed at the most recent logical swing low/high, not just the previous candle wick.
Consolidation Filter (Anti-Chop): The indicator analyzes the recent ATR. It requires the price to be in a tight accumulation/consolidation zone before a breakout occurs. This keeps you out of choppy, sideways markets and fakeouts.
Cooldown System: Prevents overtrading. After a valid signal is fired, the indicator enters a customizable "cooldown" period where it ignores erratic back-to-back signals.
Auto Risk:Reward Projection: Instantly draws professional Stop Loss (Red) and Target (Teal) boxes with clean labels based on your selected R:R multiplier (Default is 1:2).
How to Use:
Apply to a 1-minute or 3-minute chart (Highly optimized for Gold).
Wait for the indicator to draw the Entry/Target boxes.
The Stop Loss is automatically placed at the safest structural pivot. Execute your trade and let the price run to the projected Teal target zone.
Fully customizable inputs allow you to adjust the R:R ratio, consolidation strictness, and cooldown length to fit your personal scalping strategy. インジケーター
