AetherEdge - RainbowDQN Multi-Component🖊️ Overview
A self-evolving multi-component agent that fuses the core pillars of Rainbow DQN into one policy: Double (overestimation control), Dueling (separating state value from action advantage), and Prioritized Replay (re-learning in proportion to surprise / TD error). It learns from a composite reward — risk-adjusted return, drawdown avoidance, and volatility scaling — so it generalizes across trending, ranging, and high-volatility regimes alike. The internals are multi-headed, but their complex valuation is distilled into a single refined unified-signal arrow, rendered with layered glow and a premium intelligence panel.
🔶 Key Features
Three Rainbow components fused — Double + Dueling + Prioritized Replay in one policy
Composite-reward learning — risk-adjusted return + drawdown avoidance + volatility scaling, weighted
Multi-regime adaptability — volatility scaling and drawdown penalty generalize across trend / range / high-vol
Overestimation control (Double) — online net selects, target net evaluates
V/A separation (Dueling) — state value V(s) and advantage A(s,a) on separate streams
Prioritized replay + importance sampling — high-TD-error transitions learned first, with IS bias correction
Unified signal arrow only — multi-head internals distilled into one clean arrow (Layered Glow / Minimal / Labeled styles)
Refined visuals — multi-layer glow arrows, conviction ribbon, signal pulse, and a sectioned premium panel
🧠 Technical Architecture
The agent perceives the market as a five-dimensional state vector: momentum spread, RSI deviation, ADX trend strength, a volatility-regime ratio, and position-within-range — all z-normalized. Two networks exist (online + target), each with a Dueling structure — a shared trunk (tanh) forks into a Value stream V(s) and an Advantage stream A(s,a), recombined as Q = V + (A − mean A).
As Double-DQN, next-state action selection uses the online net's argmax while its valuation uses the target net, curbing overestimation; weights hard-sync every Target Net Sync bars. The composite reward fuses three heads: (1) risk-adjusted return (forward return normalized by ATR), (2) drawdown avoidance (penalizing adverse excursion within the lookahead window), and (3) volatility scaling (shrinking rewards earned under abnormally high volatility).
For prioritized replay, each transition's TD error δ = pred − target is turned into a priority |δ|^α, skewing sampling toward surprising experiences, while an importance-sampling (β) weight corrects the resulting bias. Gradients flow through the dueling aggregation (dQ/dV = 1, dQ/dA = 𝟙 − 1/3) into each stream and the shared trunk via manual backpropagation. Finally, a unified conviction blending Q-spread and advantage-spread is computed, and a single arrow is drawn only when it clears the gate.
⚙️ Recommended Settings & Tuning Guide
BTC (1H–4H): Training Horizon 800–1500, γ 0.94, Target Net Sync 25, reward weights Ret 1.0 / DD 0.6 / Vol 0.4. The balanced defaults fit well
ETH (1H–4H): As BTC, with Reward Lookahead 5–8 to value trend persistence
SOL (15m–1H): High volatility favors Vol weight 0.6–0.8 to strengthen scaling, Conviction Gate 0.45–0.55 to be selective
XRP (1H–4H): Spike-prone; DD weight ≈ 0.8 to penalize adverse excursion harder, Priority Exponent ≈ 2.0
Composite weights: raise Ret for trend-seeking, DD for steadier operation, Vol for choppy markets — allocate by market character and style
Conviction Gate: higher (0.5–0.6) gives fewer, higher-quality arrows; lower (0.3–0.4) gives more — tune to your trade frequency
Target Net Sync (τ): short (10–15) adapts fast but less stable; long (40–60) is stable — match to market stability
💡 How to Use in Practice
Reacting to the unified arrow: every arrow shown is the "final verdict" — past the multi-head valuation, composite reward, and conviction gate — a high-confidence core basis for trend-following entries
Using the conviction ribbon: the more saturated the under-price ribbon, the stronger the directional conviction; arrow plus matching ribbon color (teal bullish, coral bearish) is the most coherent setup
Across regimes: follow arrows directly in trends; in ranges the drawdown-avoidance head reduces forced signals; in high-vol the volatility head tempers overreaction
Signal pulse: the pulse dot on the firing bar improves entry-timing visibility
Multi-timeframe usage: confirm the big-picture unified direction on the higher timeframe (4H), then refine timing on aligned arrows on the lower one (15m–1H)
Combinations: pair with volume or key S/R, filtering for high-conviction arrows to lift precision further
⚠️ Important Notes
Initial learning period: right after launch the replay buffer is nearly empty and both networks are unstable; treat signals as low-confidence until it fills (several hundred bars)
Learning resets: changing parameters, switching symbol/timeframe, or recompiling reinitializes all network weights and the buffer, restarting learning from zero
Target-sync effect: calls may briefly shift right after a sync — this is normal Double-DQN behavior
On forward-looking reward: rewards and drawdown use closed-bar forward data (a standard RL training construct); current-bar evaluation is on confirmed values, but as with any adaptive system, historical and live behavior can differ — always forward-test
Constraints: this is a lightweight implementation operating within Pine's compute budget
🚨 Disclaimer
This indicator is an analytical and educational visualization tool. The Rainbow DQN (Double/Dueling/Prioritized Replay), composite reward, networks, and signal outputs are quantitative heuristics computed on-chart from price data — they are not financial advice, buy/sell signals, or any guarantee of future performance. Reinforcement-learning agents can and do make wrong calls. Always combine any tool with your own analysis and disciplined risk management. Indicator

Indicator

AetherEdge - PPO Policy Optimizer🖊️ Overview
A self-evolving policy-gradient agent built on Proximal Policy Optimization (PPO) that optimizes its trading policy itself. A NeuraLib policy network outputs a softmax probability distribution over LONG / SHORT / FLAT, improved through a PPO-style clipped objective — the probability ratio between the new and old policy is clipped to , so a single update can never shove the policy too far, the key to PPO's stability. Updates are driven by a virtual advantage estimate (GAE-style) computed against a learned value baseline. Learning from experience on your chart, it visualizes its evolving conviction with a policy-probability line (LONG %) and a trend line that recolors with the policy's tilt.
🔶 Key Features
PPO clipping — the probability ratio is clipped to , structurally preventing oversized policy updates (the heart of PPO stability)
Actor-Critic architecture — a shared trunk forks into an Actor head (softmax policy) and a Critic head (value baseline)
Virtual advantage (GAE-style) — forward-return-minus-baseline smoothed over time for a low-bias, low-variance advantage signal
Entropy bonus — prevents premature collapse to a single action, encouraging exploration
Multi-epoch optimization — each collected minibatch is reused several times per bar (PPO's data efficiency)
Policy LONG % line — the policy's LONG probability plotted 0–100 (best on its own scale)
Color-shifting trend line — nudged up/down by policy tilt, recolored by dominant action and confidence
Intelligence panel — per-action probabilities, dominant action, value baseline, policy entropy, and rollout state at a glance
🧠 Technical Architecture
The agent perceives the market as a four-dimensional state vector: momentum spread (ATR-normalized fast/slow EMA gap), RSI deviation, a volatility-regime ratio, and position-within-range — all z-normalized. This state passes through a NeuraLib-style Actor-Critic network: a shared trunk (tanh hidden) forks into an Actor head producing three logits → softmax policy π(a|s), and a Critic head producing a scalar value V(s).
The virtual advantage follows GAE (Generalized Advantage Estimation). Iterating backward through the rollout, the TD residual δ = r + γV(s′) − V(s) is smoothed by γλ into  = δ + γλ·Â_next, then normalized to zero mean and unit variance (standard PPO practice).
The heart of the PPO update is the clipped objective. With the ratio r(θ) = π_new(a|s)/π_old(a|s), the objective is min(r·Â, clip(r, 1−ε, 1+ε)·Â). Outside the trust region — advantage positive with r above 1+ε, or negative with r below 1−ε — the gradient is zeroed, structurally bounding each update step. This combines with the policy gradient ∂logπ(a)/∂logit = 𝟙 − p, an entropy bonus, and the Critic's squared-error value regression (weighted by vfCoef), all backpropagated manually into the shared trunk. The collected rollout is re-optimized over several epochs and minibatches.
⚙️ Recommended Settings & Tuning Guide
BTC (1H–4H): Training Horizon 800–1500, Clip ε 0.2, GAE λ 0.95, γ 0.94, Epochs 3, Hidden 8. Standard PPO settings fit well
ETH (1H–4H): As BTC, with Reward Lookahead 5–8 to capture slightly longer advantage
SOL (15m–1H): High volatility favors Clip ε 0.15–0.2 (more conservative updates), Entropy ≈ 0.02 to strengthen exploration, ATR-normalization always ON
XRP (1H–4H): Spike-prone; GAE λ ≈ 0.9 to curb variance, Value Loss Weight 0.5–0.7 for baseline accuracy
Clip ε: smaller (0.1–0.15) is more conservative and stable; larger (0.25–0.3) learns faster but less stably — match to market stability
Learning Rate α: 0.02–0.04 is the stable zone; lower it if diverging, raise Epochs if convergence is slow
Entropy Bonus: raise to 0.02–0.05 if the policy biases too early to one side
💡 How to Use in Practice
Reacting to the LONG % line: 50% is neutral. A cross above 60% is a clearly bullish policy; below 40% is bearish. Drag it to its own scale to watch threshold breaks
Using the color-shifting trend line: when the line turns the LONG color and sits above price, it acts as a bullish-bias support line; the SHORT color makes it a bearish-bias resistance line
Policy tilt (flips): the moment the dominant action flips LONG↔SHORT, the trend line's color change is your directional-shift signal
Reading entropy: low panel entropy = the policy is confident; high = undecided. Low entropy plus a strong probability line marks the highest-confidence conditions
Multi-timeframe usage: confirm the big-picture policy bias on the higher timeframe (4H), then refine timing on aligned lower-timeframe (15m–1H) LONG %
Combinations: use divergence between price and the LONG % line as an early reversal warning
⚠️ Important Notes
Initial learning period: right after launch the rollout is nearly empty and both policy and value are unstable; treat signals as low-confidence until it fills (several hundred bars)
Learning resets: changing parameters, switching symbol/timeframe, or recompiling reinitializes the network weights and rollout, restarting learning from zero
On-policy nature: PPO is on-policy, so actions are sampled stochastically from the policy; selection can vary even in similar conditions — this is normal exploration
On forward-looking reward: rewards and advantages use closed-bar forward returns (a standard RL training construct); current-bar policy evaluation is on confirmed values, but as with any adaptive system, historical and live behavior can differ — always forward-test
Constraints: this is a lightweight implementation operating within Pine's compute budget
🚨 Disclaimer
This indicator is an analytical and educational visualization tool. The Proximal Policy Optimization, policy network, virtual advantage computation, reward shaping, and probability outputs are quantitative heuristics computed on-chart from price data — they are not financial advice, buy/sell signals, or any guarantee of future performance. Reinforcement-learning agents can and do make wrong calls. Always combine any tool with your own analysis and disciplined risk management. Indicator

AetherEdge - DuelingDQN Breakout Hunter🖊️ Overview
A self-evolving breakout agent built on a Dueling Deep-Q-Network that learns to hunt breakouts on its own. Its defining trait is a forked network: a Value stream V(s) that learns "how promising is this state at all", and an Advantage stream A(s,a) that learns "which action is relatively better here", recombined as Q(s,a) = V(s) + (A(s,a) − mean A). This separation lets the agent value the breakout context independently of the directional decision, sharpening action selection exactly where it counts — inside detected breakout zones. Learning from experience on your chart, it visualizes its hunt with auto support/resistance boxes and faint probability arrows.
🔶 Key Features
Dueling DQN architecture — shared trunk → Value and Advantage streams → recombined via the dueling aggregation; state quality and action advantage learned separately
Self-evolving breakout learning — no pre-training; breakout context learned continuously from the live chart
Breakout reward bonus — extra reward for correct actions in breakout context, focusing learning on breakouts
Auto S/R zones — boxes spawn on rolling S/R breaks, with full lifecycle management
Faint probability arrows — drawn with subtle opacity scaled to softmax action probabilities derived from advantages
Prioritized Experience Replay (PER) — high-reward transitions re-learned preferentially
Exploration vs. exploitation — ε-greedy exploration avoids ossifying in local optima
Intelligence panel — V(s), per-action A(s,a), selected action, advantage spread, breakout context, and zone count at a glance
🧠 Technical Architecture
The agent perceives the market as a four-dimensional state vector: momentum spread (ATR-normalized fast/slow EMA gap), relative position within Bollinger Bands, ATR distance to the nearest S/R, and a volatility-regime ratio — all z-normalized.
The core is the Dueling structure. Input passes through a shared trunk (tanh hidden), then forks. The Value stream runs through its hidden layer to a scalar V(s); the Advantage stream runs through its hidden layer to three per-action values A(s,a). They aggregate as Q(s,a) = V(s) + (A(s,a) − mean_a A(s,a)), the mean-subtraction ensuring identifiability between Value and Advantage. Learning is done by manual backpropagation through this aggregation: gradients are correctly distributed to the advantage outputs (dQ/dA = 𝟙 − 1/3) and the value output (dQ/dV = 1), then propagated back through each stream's hidden layer and into the shared trunk.
The reward function is a directional, ATR-normalized forward return, plus a bonus for success in breakout context. Transitions (s, a, r, s′) enter the experience replay buffer, sampled by |reward|^exponent. As the zone lifecycle, boxes spawn on rolling S/R breaks and are pruned oldest-first on lifespan or cap overflow. Probability arrows vary in opacity by softmax advantage probability and are drawn only when the advantage spread clears the gate. The statistics panel makes the internal Value and Advantage readable.
⚙️ Recommended Settings & Tuning Guide
BTC (1H–4H): Training Horizon 800–1500, γ 0.92–0.95, Shared Hidden 8 / Stream Hidden 4, S/R Lookback 20, Breakout Bonus 0.5. Standard settings fit well
ETH (1H–4H): As BTC, with Reward Lookahead 5–8 to value post-break follow-through
SOL (15m–1H): High volatility favors Zone Width 0.3–0.5 (wider boxes absorb fakeouts), ε 0.05–0.08, Breakout Bonus 0.6–0.8 to strengthen breakout learning
XRP (1H–4H): Spike-prone; Priority Exponent ≈ 2.0, longer S/R Lookback (25–30) to focus on major levels
Learning Rate α: 0.02–0.04 in trending markets; 0.04–0.08 in choppy ones
Stream Hidden Units: widen to 6–8 for richer advantage representation on instruments with diverse breakout types
maxBoxes / Zone Lifespan: maxBoxes 4–6 to see only key levels; extend Lifespan to retain zones longer
💡 How to Use in Practice
Reacting to high-advantage actions: when one action's advantage dominates with a high spread, the agent sees a clear edge in the break direction — a basis for trend-following entries
Using S/R boxes: auto-spawned zones mark post-break retest (return-move) levels; watch reactions at zone edges
S/R flips: capture the classic pattern where a broken resistance zone flips to support, via the box plus the advantage shift
Arrow opacity: darker arrows mean higher action probability and stronger conviction; treat faint arrows as wait-and-see
Multi-timeframe usage: read the big-picture break and zones on the higher timeframe (4H), then refine timing on aligned high-advantage actions on the lower one (15m–1H)
Combinations: filter for breaks accompanied by volume surges to reject fakeouts and elevate signal quality
⚠️ Important Notes
Initial learning period: right after launch the replay buffer is nearly empty and both Value and Advantage are unstable; treat signals as low-confidence until it fills (several hundred bars)
Learning resets: changing parameters, switching symbol/timeframe, or recompiling reinitializes all network weights, the buffer, and zones, restarting learning from zero
Nature of zones: boxes are structural markers from rolling S/R breaks, not signals in themselves; judge alongside the agent's advantage
On forward-looking reward: rewards use closed-bar forward return (a standard RL training construct); current-bar action selection is made on confirmed values, but as with any adaptive system, historical and live behavior can differ — always forward-test
Constraints: this is a lightweight implementation operating within Pine's compute budget
🚨 Disclaimer
This indicator is an analytical and educational visualization tool. The Dueling Deep-Q-Network, experience replay, reward shaping, breakout-zone detection, and action probabilities are quantitative heuristics computed on-chart from price data — they are not financial advice, buy/sell signals, or any guarantee of future performance. Reinforcement-learning agents can and do make wrong calls. Always combine any tool with your own analysis and disciplined risk management.
Indicator

Indicator

Indicator

Kitty's Law [theUltimator5]MOASS is tomorrow.
MOASS will always be tomorrow.
Murphy's law states anything that can go wrong will go wrong.
With GameStop, we have something called Kitty’s law .
Kitty’s law states that whenever people can fit in a March-May 2024 fractal, people will fit in a March-May 2024 fractal.
This indicator is an embodiment of Kitty's law.
This indicator matches the current price action to the GME fractal from 2024, finds a best fit section, then projects forwards the resulting price action. A short squeeze has never been so near!
HOW IT WORKS
Now getting into the technical aspects of this indicator, since it is a bit more complicated than the silly description has it seem.
The values from 2024 are hard coded into arrays. There are two arrays. Hourly and daily. If the timeframe is set to daily, it will use the daily array for comparison. If any other timeframe, it will use hourly (yes I know that weekly, monthly etc... are correlating to hourly but deal with it)
The indicator then uses a lookback period off the current bar (you can define the length) and finds the best fit section match from the selected array (hourly or daily) using a custom Pearson correlation algorithm. Once it finds the best fit section match, it plots it over the chart and projects the rest of the array onto the chart, filling out the fractal.
If the ticker you are looking at is NOT GME, then it won't project anything. Instead, it will tell you to stop looking at bad tickers and go back to GME.
Disclaimer: This indicator is meant for fun and is NOT a technical analysis indicator and is cosmetic only! Indicator

Risk Manager [SkaleHub]Overview
The ultimate capital preservation tool. This indicator calculates mathematically secure stop-loss placements based on real-time market volatility (ATR) and features a dynamic dashboard that tells you the exact position size to take to protect your account.
The Edge
Amateurs blow accounts by guessing their lot sizes and placing arbitrary stop-losses. This tool professionalizes your risk. By adjusting your position size relative to the asset's current volatility, it ensures that whether you are trading a quiet forex pair or a volatile crypto asset, your monetary risk remains an exact, controlled percentage of your capital.
Key Features:
Volatility-Based Stops: Automatically calculates stop-loss levels using the Average True Range (ATR), ensuring your stop is safely tucked behind the market's natural "noise" to prevent early liquidations.
Auto-Position Sizing: Input your account balance and risk tolerance (e.g., 1%), and the built-in dashboard instantly outputs the exact number of shares or units you should buy.
On-Chart Visual Guardrails: Optionally plots dynamic crosshair lines on the chart so you can visually see exactly where your mathematically optimized stop-loss should be placed before entering a trade.
How to Use
Apply the indicator and open the settings menu. Enter your total account balance and your strict risk percentage (1-2% is highly recommended).
When your Level 3 Momentum Trigger fires an entry signal, look at the Risk Manager dashboard in the corner of your screen.
Execute the trade using the exact "Position Size (Units)" displayed on the dashboard, and immediately set your hard stop-loss at the "Stop Distance" mapped out on the chart.
Author's Note
This is a premium, Invite-Only script. It is Level 4 of the SkaleHub Training System. To gain access, your PulseWire username must be explicitly authorized through the SkaleHub Academy. Indicator

BNC Market Bias DashboardA multi-timeframe sentiment gauge built on the BullNaked Crypto strategy framework. No signals, no entries — just a clear read of where the market stands right now across 7 timeframes simultaneously.
Scores each timeframe (3min, 9min, 27min, 81min, 3H, Daily, Weekly) across 5 indicators — EMA stack, Naked RSI zones, Stochastic RSI, Ichimoku Cloud, and Keltner Channel — and combines them into a weighted overall bias rating. Higher timeframes carry more weight because the higher the timeframe, the stronger the signal.
Rating scale: Strong Bull → Bull → Lean Bull → Neutral → Lean Bear → Bear → Strong Bear
What each column shows:
EMA stack alignment (9/30/50/100/200)
Naked RSI health zone (36 / 46 / 56 / 65 system)
Stochastic RSI position
Ichimoku Cloud position
Keltner Channel position
Per-timeframe signal suggestion
The overall score is weighted so Daily and Weekly carry 3× the influence of the 3-minute, reflecting the core principle that trend is truth on the higher timeframe. Use this to build your story before placing any trade — if the higher timeframes disagree with your entry timeframe, the story isn't complete yet.
Overlays directly on your chart. Table anchors to the bottom-left corner. All timeframes and indicator settings are fully adjustable in the settings panel.
Not financial advice. For educational and informational purposes only. Indicator

Indicator

Indicator

Indicator

Indicator

Indicator

Indicator

Markov Regime Oscillator PRO🟦 Markov Regime Oscillator PRO is a quantitative regime-classification and forward-probability forecasting engine rendered as a centred oscillator panel. Every bar is classified into one of three regimes — Bull, Bear, Sideways — using a drift-adjusted, volatility-normalised k·σ·√N threshold. The regime sequence feeds two parallel semi-Markov transition matrices (Young / Mature) with exponentially-decayed counts, producing live N-bar forward probabilities and 95 % Bayesian credible intervals on the next-bar probability vector.
The indicator integrates nine analytical layers — drift-adjusted classification, adaptive k·σ·√N threshold, EWMA-decayed transition matrix, semi-Markov duration conditioning, N-bar forecast cone via matrix iteration, Bayesian credible intervals, stationary distribution, velocity precursor with optional momentum filter, and multi-timeframe confluence — each rendered on a single oscillator panel through reference levels, a regime ribbon, gradient fill, three-layer neon glow signals, and an in-panel forecast polyline. A 30-row PRO status dashboard rendered on the main price chart (not the oscillator panel) reports every readout in real time.
Built with mathematical honesty. Every +1 forward probability carries a 95 % Dirichlet-posterior credible interval, the EWMA half-life is user-set so the model can adapt as market character evolves (2020 ≠ 2024), the semi-Markov split splits the chain on regime age so mature trends are not treated like young ones, and the documentation is explicit about what the model can and cannot predict.
🟦 HOW THE CORE ENGINE WORKS
Regime Classification
Each bar, the engine measures the rolling N-bar log return — optionally adjusted for the long-term drift of the asset:
logRet_raw = log(close / close )
meanDrift = SMA(log(close / close ), driftWin)
logRet = logRet_raw − N × meanDrift (when Drift Adjustment is ON)
The bar is labelled by comparing this return against the configured boundary:
- `logRet > +threshold` → BULL
- `logRet < −threshold` → BEAR
- otherwise → SIDEWAYS
The classification runs every bar with no look-ahead. When the optional Momentum Filter is enabled, the Bull / Bear labels additionally require the oscillator velocity to agree with the direction — killing late entries on exhausted moves.
Adaptive Threshold (k · σ · √N)
Traditional Markov regime indicators use a fixed percentage cut — e.g. "±5 % over 20 bars". This collapses on real markets: the same 5 % is trivial in a 2017 mania and never reached in 2023 chop. The fix is to scale the boundary with realised volatility:
threshold_adaptive = k × σ × √N
where σ is the per-bar log-return standard deviation over a configurable window (default 100 bars). Under a random walk, k = 1.0 cuts at the 16th / 84th percentiles; k = 2.0 at the 2.5th / 97.5th percentiles. The default k = 1.5 reproduces classic ±1.5-sigma thresholds.
Fixed-percentage mode is still available for users who want to lock the threshold deliberately.
Drift Adjustment (Alpha-Adjusted Classification)
Strong-trending markets (long BTC bull runs, persistently uptrending equity indices) carry a non-zero baseline drift. Without adjustment, the rolling log return systematically exceeds zero in such markets — producing excessive Bull-regime flips that reflect baseline drift rather than incremental kinetic energy.
The fix is to subtract the long-term mean drift before threshold comparison:
logRet_excess = log(close / close ) − N × mean(log returns, driftWin)
Log returns become EXCESS returns over the asset's own long-run drift — what quant desks call "alpha-adjusted" classification. The default 250-bar drift window approximates one trading year on the daily timeframe.
Oscillator Value
The classified log return is normalised by the active threshold and scaled to ±100 = boundary, clipped at ±300:
oscVal = clip( logRet / threshold × 100, ±300 )
The oscillator value is the central panel signal. Reference levels at ±100 (solid) mark the official regime boundaries, ±70 (dashed) mark the pending early-warning zone, and 0 (dashed) is the neutral midline.
Regime Confidence
Once classified, the move's strength is normalised relative to the active boundary:
confidence = |logRet| / threshold
| Confidence | Tier | Visual |
|---|---|---|
| < 1.0× | weak | ▱▱▱ |
| 1.0× – 2.0× | moderate | ▰▱▱ |
| 2.0× – 3.0× | strong | ▰▰▱ |
| ≥ 3.0× | stretched | ▰▰▰ |
The confidence value feeds the High Confidence alert (≥ 2.5× trigger) and is reported in the Status dashboard.
🟦 EWMA DECAY ON TRANSITION COUNTS
The Ancient-History Problem
A classic Markov chain counts every historical transition with equal weight — a Bull→Bear flip from five years ago contributes the same as one from yesterday. This breaks when market character changes: the 2020 COVID crash regime dynamics are not the same as 2024 retail mania, but a vanilla counter weighs them identically.
The Refinement (EWMA / RiskMetrics-style decay)
Markov Regime Oscillator PRO applies exponential decay to the transition counts every confirmed bar BEFORE incrementing for the new transition:
decayFactor = 0.5 ^ (1 / halfLife)
counts = counts × decayFactor (all 9 cells, every bar)
counts = counts + 1.0 (new transition)
After `halfLife` bars, an old count weighs HALF its original. This is the same math RiskMetrics uses for EWMA volatility — adapted here to regime transition memory.
| Half-life | Behaviour |
|---|---|
| 50 – 200 | highly reactive — adapts fast, probabilities noisy |
| 300 – 700 | balanced (default 500) |
| 1000+ | stable — slow adaptation, smooth probabilities |
The decay is applied to all three matrices in lockstep (full, young, mature) so the semi-Markov split below stays internally consistent.
🟦 SEMI-MARKOV DURATION CONDITIONING
The Memoryless Problem
A standard Markov chain says: "Given I'm in Bull, the probability of staying Bull tomorrow is X — regardless of whether Bull started yesterday or 200 bars ago." This is the memoryless property, and on real markets it's wrong. A 200-bar-old Bull regime carries different mean-reversion risk than a 5-bar-old one.
The Refinement
Markov Regime Oscillator PRO additionally builds two CONDITIONAL transition matrices:
- `P_young` — transitions counted when the source regime's age was below the Age Median input
- `P_mature` — transitions counted when the source regime's age was at or above the Age Median
Both matrices are constructed in parallel with the unconditional matrix, using the same per-bar bucketing logic, the same EWMA decay, and the same Dirichlet smoothing.
The active forecast then uses the matrix matching the CURRENT regime's tier — Young or Mature. A 5-bar-old Bull is statistically more likely to continue than a 50-bar-old one; semi-Markov captures this empirically without leaking into the unconditional chain.
The active matrix tier is reported live in the Status dashboard's "Matrix" cell.
🟦 N-BAR FORECAST CONE
Matrix Iteration
The 3×3 transition matrix P encodes one-bar-ahead probabilities. To project further out, the state vector is iterated through P:
s_0 = = unit vector on current regime
s_{k+1} = s_k · P (matrix multiplication)
For each step k = 1 … forecastSteps, the iteration produces the probability of each regime at that future bar.
Expected Oscillator Value
At each forecast step, the expected oscillator value is computed as:
E = 100 · ( P(Bull | k) − P(Bear | k) )
This number is +100 when the model expects pure Bull, −100 when pure Bear, and ~0 when Side.
In-Panel Polyline
The cone is rendered as a colored polyline extending PAST the last confirmed bar into the future, drawn via `line.new()` so segments are pixel-stable on any chart zoom. Each segment is colored by the dominant regime at that step (Bull / Bear / Side).
Honest Limitation
The cone is reliable up to ~5 bars; beyond that the iteration converges toward the stationary distribution and the forecast loses information. The default Forecast Horizon is 5 bars — covers the meaningful window without illusion.
The forecast is matrix-implied, not a momentum extrapolation. If the oscillator is currently at +250 (strong Bull) but the matrix says P(Bull → Side) is high, the cone will regress to the matrix-implied expected value — showing a visual "cliff" at step 1. This is mathematically honest, not a bug.
The dashboard's "HORIZON +N" cell reports the dominant regime at the terminal forecast step plus its probability — for a single-glance read of where the chain expects to be at horizon end.
🟦 BAYESIAN CREDIBLE INTERVALS
Why Ranges, Not Point Estimates
A forecast like "P(Bull) +1 = 75 %" carries hidden uncertainty. With only 30 historical Bull-source transitions, the true probability could plausibly be anywhere between 55 % and 90 %. With 2000 historical Bull-source transitions, the same 75 % is tightly bracketed at, say, 73 – 77 %.
Reporting a single number hides the difference. Hedge-fund and academic forecasts always carry uncertainty bands; this oscillator does the same.
The Derivation (Dirichlet Posterior, Gaussian Approximation)
The transition matrix posterior is Dirichlet(α + counts) with Laplace (α = 1) prior. Each marginal is Beta with parameters (α_i, Σα − α_i). The Gaussian approximation to that Beta gives:
mean = α_i / Σα
var = α_i · (Σα − α_i) / ( Σα² · (Σα + 1) )
95 % CI ≈ mean ± 1.96 · √var
The CI is computed for the +1 row (the most actionable forecast) and clipped to .
Reading the Dashboard
P(Bull) +1 75 %
| CI Width | Interpretation |
|---|---|
| Narrow (e.g. 73 – 77) | large sample, robust estimate, trust the call |
| Wide (e.g. 50 – 95) | small sample, fragile estimate, don't bet the desk |
This is the difference between a quantitative estimate and an indicator guess.
🟦 STATIONARY DISTRIBUTION π
Power-iterating the matrix to convergence yields the stationary distribution — the long-run probability of being in each regime, independent of the current state. With 50 iterations on a well-behaved stochastic matrix, the distribution is essentially converged.
π(Side) + π(Bull) + π(Bear) = 1.0
The dashboard's "STATIONARY π" section reports each component. Reading π reveals the asset's structural bias regardless of the current regime — e.g., π(Bull) = 55 % on BTC daily tells you the market spends a majority of its time in Bull regimes over the long run, which is fundamentally different from a sideways-grinding instrument with π(Side) = 60 %.
The stationary distribution also serves as the asymptote of the forecast cone: as k → ∞, the cone collapses to π.
🟦 VELOCITY PRECURSOR & MOMENTUM FILTER
Velocity Definition
The oscillator velocity is the N-bar rate-of-change of the oscillator value:
velocity = oscVal − oscVal
velocityThr = VELOCITY_BASE · √(velocityWin / 5)
The threshold auto-scales with the window so the accel / decel / flat labels stay meaningful at any setting.
Early-Warning Cue
Velocity flips direction BEFORE the official ±100 boundary is crossed — it is a leading indicator of regime change. The Status dashboard's "Velocity" cell displays:
- ↑ accelerating (velocity > +threshold) — colored bull
- ↓ decelerating (velocity < −threshold) — colored bear
- ═ flat — neutral
This partially mitigates the inherent lookback lag of threshold-based regime detection.
Optional Momentum Filter
When the Momentum Filter is enabled, regime classification additionally requires velocity sign agreement:
Bull → logRet > +threshold AND velocity > 0
Bear → logRet < −threshold AND velocity < 0
This kills late-entry signals where price has extended past the threshold but momentum is already exhausted — a classic source of false signals at trend tops/bottoms. Reduces signal count, raises signal quality. Recommended for swing trading, optional for scalping.
🟦 PENDING-REGIME EARLY WARNING
Because the regime is classified from `log(close / close )`, the official regime label inherently lags. This is structural, not a bug, but can be partially mitigated.
Inside Sideways, when the log return reaches 70 % of either boundary, the dashboard fires an early-warning cue:
distance_fraction = max(|logRet| / threshold, ...)
isPending = (regime == SIDE) AND (distance_fraction ≥ 0.70)
The Status panel's "Pending" cell displays the direction the return is leaning toward and the current fraction:
⚠ ▲ BULL 87 %
Color matches the leaning regime. The Pending Regime alert (default OFF, opt-in) fires on the first bar a pending state is entered.
This is not a regime change signal — it's a "watch this" cue, triggered roughly 30 % before the official threshold is crossed. Used alongside the official regime change, it gives the user advance notice without compromising the threshold's strictness.
🟦 SELECTABLE SIGNAL SMOOTHING
A second smoothed signal line overlays the main oscillator. Crossovers between the main and signal lines mark momentum-of-regime shifts — these often precede actual regime changes by 1-3 bars.
Four smoothing algorithms are available:
| Method | Character |
|---|---|
| EMA (default) | Exponential — classic lag/smoothness |
| HMA | Hull — near-zero lag for short windows |
| ALMA | Arnaud Legoux (0.85, 6.0) — Gaussian-weighted, smoothest |
| SMA | Simple — most stable, most lag |
The Signal Cross alert can be optionally filtered by HTF alignment — when enabled, the alert fires only when LTF and HTF regimes match. Filter is auto-bypassed when HTF Confluence is globally OFF (silent-kill protection).
🟦 MULTI-TIMEFRAME CONFLUENCE
The same regime logic runs on a user-configured higher timeframe via `request.security` with `lookahead = barmerge.lookahead_off` and `gaps = barmerge.gaps_off` (anti-repaint mandatory). The result is reported in the Status dashboard's HTF block:
| State | Display | Color |
|---|---|---|
| HTF regime matches LTF regime | ✓ ALIGNED | bull |
| HTF regime differs from LTF | ⚠ DIVERGENT | bear |
| Insufficient HTF data | — | foreground |
Divergent regimes are common at trend turns — the LTF flips before the HTF catches up. Aligned regimes carry higher conviction. A separate alert ("MTF Confluence") fires on regime entries only when the HTF agrees.
Recommended pairings:
| Chart | HTF |
|---|---|
| 15m | 1H |
| 1H | D |
| 4H | W |
| D | W |
| W | M |
Use at least 3× your chart timeframe — anything closer and the two regimes track each other with no information gain.
🟦 OSCILLATOR PANEL VISUAL LAYER
Main Oscillator Line
The oscillator value plotted as a continuous line with five color tiers reflecting regime strength:
| Range | Color |
|---|---|
| ≥ +100 | full Bull |
| +70 to +100 | dim Bull (pending up) |
| −70 to +70 | neutral Side |
| −100 to −70 | dim Bear (pending down) |
| ≤ −100 | full Bear |
Line width is configurable 1 – 5 pixels.
Signal Line
A smoothed overlay of the main oscillator, faded foreground color, single-pixel width. Drives the Signal Cross alert and the dashboard Signal cell.
Reference Levels
Three horizontal levels per panel side:
- ±100 — official regime boundaries (solid plot line)
- ±70 — pending early-warning zones (dashed `line.new`)
- 0 — neutral midline (dashed `line.new`)
The dashed lines use `line.new()` rather than `plot.style_circles` so they remain pixel-stable at any chart zoom — they will NOT rescale or fragment.
Regime Ribbon
The oscillator panel background is tinted to the current regime color at 20 % opacity. Provides instant regime context at a glance — Bull / Bear / Side periods are visually separated even when zoomed out on long history. Toggleable.
Gradient Fill
The area between the oscillator line and zero is filled in the regime color, with intensity scaling adaptively by distance from zero — stronger color = higher conviction. Empty at zero.
Three-Layer Neon Glow Signals
On every confirmed regime transition (after the Min Hold filter passes), the indicator drops a three-layer halo on the oscillator line:
| Layer | Size | Transparency | Purpose |
|---|---|---|---|
| Outer | size.large | 80 % | Soft halo |
| Middle | size.normal | 50 % | Mid-glow |
| Core | size.small | 0 % | Bright center |
Bull entries (▲ triangle up), Bear entries (▼ triangle down), and Side entries (◆ diamond). The Min Hold input (default 4 bars) requires a new regime to persist before its flip is drawn — kills label spam in choppy zones without affecting the underlying transition counts.
Forecast Cone Polyline
On the last confirmed bar, a colored polyline extends into the future for N bars, plotting the expected oscillator value at each step. Color reflects the dominant regime at that step. Drawn with `line.new()` so segments are pixel-stable; recomputed on every chart refresh.
🟦 PRO STATUS DASHBOARD
A single dashboard rendered on the MAIN PRICE CHART (not the oscillator panel) via `force_overlay = true`. This keeps the oscillator panel uncluttered so the oscillator line, signal line, gradient fill, and forecast cone get the full pane height.
The dashboard is structured in seven sections, all theme-aware:
| Section | Cells |
|---|---|
| REGIME | Regime, Age + tier, Confidence, Pending, Velocity |
| FORECAST +1 | P(Bull), P(Bear), P(Side) — each with 95 % CI |
| HORIZON +N | Dominant regime at terminal forecast step + probability |
| STATIONARY π | π(Bull), π(Bear), π(Side) — long-run equilibrium |
| OSCILLATOR | Value, Signal direction, Threshold, Drift basis points |
| HTF | Regime + Aligned / Divergent status |
| DATA | Mode, Decay half-life, Matrix tier, Sample N |
Position is configurable across 9 chart corners. Text size: Tiny / Small / Normal / Large. Default Tiny so the full 30-row layout fits on any chart without scrolling. Background and text colors flip between Dark and Light display modes.
🟦 COLOR THEMES
Ten cohesive palettes tuned to the Apex design system, each defining three regime axes (Bull, Bear, Sideways):
| Theme | Character | Bull | Bear | Sideways |
|---|---|---|---|---|
| Focus (default) | Modern | Cyan | Deep orange | Cool blue-grey |
| Prism | Classic | Forest green | Crimson | Slate grey |
| Solar | Warm | Amber | Indigo red | Lavender grey |
| Frost | Cool | Sky blue | Soft lavender | Pale steel |
| Laser | Neon | Lime green | Hot crimson | Charcoal grey |
| Aurora | Bright | Gold | Scarlet | Warm beige |
| Plasma | Electric | Aqua | Magenta | Slate teal |
| Bloom | Soft | Mint | Hot pink | Blue-grey |
| Eclipse | Deep | Navy | Dark crimson | Steel grey |
| Carbon | Minimal | Near-white | Mid-grey | Dark grey |
One theme selection drives every visual component: oscillator line, signal line, reference levels, ribbon, fill, glow signals, forecast cone, and all dashboard cells.
Dark / Light Display Mode
Dashboard chrome (background, foreground, borders, section dividers) flips between dark-on-bright and bright-on-dark. The regime axis colors remain consistent across modes — only the panel chrome changes.
🟦 ALERT SYSTEM
Seven alert conditions, each independently togglable:
| Alert | Condition |
|---|---|
| Bull Regime Entry | Regime flipped to BULL (after Min Hold confirmation) |
| Bear Regime Entry | Regime flipped to BEAR (after Min Hold confirmation) |
| Sideways Regime Entry | Regime flipped to SIDEWAYS (default OFF) |
| High Confidence | confidence ≥ 2.5× threshold, first bar of crossing |
| Pending Regime | Inside Sideways, log return ≥ 70 % of either boundary (default OFF) |
| MTF Confluence | Bull / Bear entry + HTF agrees |
| Signal Cross | Main oscillator crosses signal line (default OFF) |
All alerts fire on confirmed bar close. Entry alerts respect the Min Hold filter — a new regime must persist Min Hold bars before its entry alert fires, matching the on-chart glow markers.
The Signal Cross alert can be optionally filtered by HTF alignment (Multi-Timeframe → Filter Signal Cross by HTF). The filter is automatically bypassed when HTF Confluence is globally OFF, so enabling the filter without HTF doesn't silently kill the alert.
🟦 SETTINGS REFERENCE
Theme
- Theme — One of 10 Apex palettes. Default: Focus
- Display Mode — Dark / Light. Default: Dark
Regime Logic
- Threshold Mode — Adaptive (k·σ·√N) / Fixed (%). Default: Adaptive
- Lookback Window — Bars for the rolling log return. Default: 20
- Adaptive k — Sigma multiplier. Default: 1.5
- Fixed Bull Threshold — Used only in Fixed mode. Default: 5.0 %
- Fixed Bear Threshold — Used only in Fixed mode. Default: 5.0 %
- Volatility Window — Bars for the per-bar stdev. Default: 100
- Min Hold — Bars a new regime must persist for entry alerts and glow markers. Default: 4
- Drift-Adjusted Log Returns — Toggle the drift adjustment. Default: ON
- Drift Window — Bars for the long-term mean drift estimate. Default: 250
- Require Momentum Agreement — Velocity sign filter on regime classification. Default: OFF
Bayesian Math
- EWMA Transition Counts (Decay) — Toggle exponential decay. Default: ON
- Decay Half-Life — Bars after which an old count weighs half. Default: 500
- Semi-Markov Duration Conditioning — Toggle the Young / Mature split. Default: ON
- Age Median — Boundary between Young and Mature regimes. Default: 10
- Bayesian Credible Intervals (95 %) — Toggle CI display in the dashboard. Default: ON
Forecast
- Forecast Cone Horizon — Number of bars projected by matrix iteration. Default: 5
- Show Forecast Cone — Toggle the in-panel cone polyline. Default: ON
Oscillator
- Show Signal Line — Toggle the smoothed signal overlay. Default: ON
- Signal Smoothing Method — EMA / HMA / ALMA / SMA. Default: EMA
- Signal Smoothing Length — Window length. Default: 5
- Velocity Window — Bars for the rate-of-change measurement. Default: 5
- Oscillator Line Width — Pixels. Default: 2
Display
- Show Regime Ribbon — Toggle the panel background tint. Default: ON
- Show Gradient Fill — Toggle the oscillator-vs-zero fill. Default: ON
- Show Reference Levels — Toggle the ±100 / ±70 / 0 horizontal lines. Default: ON
- Show Regime Change Glow — Toggle the three-layer halo markers. Default: ON
Multi-Timeframe
- Enable HTF Confluence — Toggle. Default: ON
- HTF Resolution — Higher timeframe. Default: D
- Filter Signal Cross by HTF Alignment — Conditional filter on cross alert. Default: OFF
Dashboard
- Show Status Dashboard — Toggle. Default: ON
- Position — Nine chart corners. Default: Top Right
- Size — Tiny / Small / Normal / Large. Default: Tiny
Alerts
- Bull / Bear / Sideways Regime Entry — Independent toggles
- High Confidence (≥ 2.5×) — Default: ON
- Pending Regime — Default: OFF
- MTF Confluence — Default: ON
- Signal Cross — Default: OFF
🟦 COMPATIBILITY
Works on all asset classes and all timeframes in PulseWire Pine Script v6.
- Crypto: Spot, futures, perpetual contracts
- Forex: All pairs
- Equities: Stocks, ETFs, indices
- Commodities: Metals, energy, agriculture
- Timeframes: 1m through Monthly
The adaptive threshold normalises by per-bar realised volatility, and the drift adjustment normalises by the asset's long-run mean drift — together making the regime classification volatility-and-drift-agnostic across assets without manual recalibration. The same default settings work on BTCUSDT daily, SPY weekly, and EURUSD 4H — only the HTF resolution input should be adjusted to match the chart timeframe.
🟦 TECHNICAL NOTES
- Pine Script v6
- `max_labels_count = 500`, `max_lines_count = 500`, `max_bars_back = 5000`
- No repainting — all regime classifications are computed on confirmed bar close. The HTF request uses `lookahead = barmerge.lookahead_off` and `gaps = barmerge.gaps_off`
- Transition counting uses `barstate.isconfirmed` to avoid double-counting the live bar
- Regime change debouncing uses `ta.barssince` to avoid runtime-indexed history reads (which can trip "cannot determine max_bars_back" in Pine v6)
- Heavy computation (P matrix construction, N-step iteration, Bayesian CI math, stationary distribution power iteration, dashboard rendering) is gated on `barstate.islast` to run once per chart render
- Matrix multiplication is implemented as unrolled single-line expressions over a flat 9-cell array for portability and speed
- EWMA decay multiplies all 9 cells of all 3 matrices (counts, countsYoung, countsMature) once per confirmed bar — O(27) per bar overhead
- Dirichlet smoothing prevents NaN propagation when a regime has not appeared in visible history — empty rows fall back to uniform 1/3
- Duration buckets classify by the SOURCE regime's age at the moment of transition (`regAge `), so the bucketing reflects the regime that was about to transition rather than the destination
- `ta.crossover` / `ta.crossunder` are computed at global scope every bar to satisfy Pine's stateful-series rule (the gated cross events read from the cached values)
- Dashboard is rendered with `force_overlay = true` on the main price chart — keeps the oscillator panel free of UI clutter
- Reference-level dashed lines use `line.new()` with `style = line.style_dashed` and `extend = extend.both` for pixel-stable rendering at any zoom
🟦 LIMITATIONS — READ THIS
This indicator is statistically honest about what it can and cannot do. Four known limitations:
1. The Markov assumption is partially violated. Markets are not memoryless. The semi-Markov Young / Mature split mitigates this but does not eliminate it. EWMA decay further mitigates by down-weighting ancient transitions, but a truly path-dependent process (one where the SEQUENCE of recent regimes matters, not just the last one) is not captured.
2. Forward probabilities are not predictions. They are conditional probabilities under the chain assumption with the credible intervals quantifying the SAMPLING uncertainty around them. A "Bull 58 % at +5 bars" reading does not mean "58 % chance the next 5 bars are bullish" — it means "given a long-run sample of similar starting states and the active EWMA-decayed transition matrix, 58 % were in Bull at +5 bars". Use the cone as ONE input alongside other analysis.
3. The regime label lags by N bars. This is structural — the rolling log return necessarily looks back. The Pending early warning and the optional Momentum Filter partially mitigate this but cannot eliminate the lag. Treat the official regime change as a confirmation, not a leading signal.
4. Forecast cone reliability decays with horizon. By +5 bars the cone is at the edge of usefulness; by +20 bars it collapses toward the stationary distribution and carries no additional information beyond π. The default horizon is 5 bars for this reason. Do not over-interpret the right side of the cone.
🟦 DISCLAIMER
This indicator is provided for educational and informational purposes only. It does not constitute financial advice. Past performance does not guarantee future results. The forward probabilities are conditional estimates derived from historical transition counts under a (semi-)Markov model assumption — they are NOT guarantees about future market behaviour. Always conduct your own analysis and apply proper risk management. Indicator

Markov Forecaster PRO🟦 Markov Forecaster PRO is a regime-classification and probability-forecasting engine built on a discrete-time Markov chain over three states — Bull, Bear, Sideways. Every bar is labelled from its rolling N-bar log return; the labels feed a 3×3 transition matrix that is power-iterated for the stationary distribution and exponentiated for forward-probability cones (P¹, P³, P⁵, P^horizon). Unlike the dozens of textbook Markov indicators on PulseWire, this one layers four original refinements on top of the standard chain construction — each addressing a well-known weakness of the memoryless Markov assumption.
The indicator integrates seven analytical layers — adaptive regime classification, semi-Markov duration tracking, sample-size disclosure, pending-regime early warning, forward-probability forecasting, look-ahead-free backtesting with fees and slippage, and multi-timeframe confluence — each rendered on a single overlay chart through a regime ribbon, three-layer neon glow signals, and four theme-aware dashboard panels.
Built with statistical honesty in mind. The backtest charges configurable commission and slippage on every entry and exit, the transition matrix flags rows with insufficient data, the duration-conditional probabilities are shown alongside the unconditional ones, and the documentation is explicit about what the model can and cannot predict.
🟦 HOW THE CORE ENGINE WORKS
**Regime Classification**
Each bar, the engine measures the rolling N-bar log return:
logRet = log(close / close )
The bar is labelled by comparing this return against the configured boundary:
- `logRet > +threshold` → BULL
- `logRet < −threshold` → BEAR
- otherwise → SIDEWAYS
The classification runs every bar with no look-ahead. The choice of threshold determines how reactive the regime label is, and this is where the first refinement enters.
**Adaptive Threshold (k · σ · √N)**
Traditional Markov regime indicators use a fixed percentage cut — e.g. "±5 % over 20 bars". This collapses on real markets: the same 5 % is trivial in a 2017 mania and never reached in 2023 chop. The fix is to scale the boundary with realised volatility:
threshold_adaptive = k × σ × √N
where σ is the per-bar log-return standard deviation over a configurable window (default 100 bars). Under a random walk, k = 1.0 cuts at the 16th / 84th percentiles; k = 2.0 at the 2.5th / 97.5th percentiles. The default k = 1.5 reproduces classic ±1.5-sigma thresholds.
Fixed-percentage mode is still available for users who want to lock the threshold deliberately.
**Regime Confidence**
Once classified, the move's strength is normalised relative to the active boundary:
confidence = |logRet| / threshold
| Confidence | Tier | Visual |
|---|---|---|
| < 1.0× | weak | ▱▱▱ |
| 1.0× – 2.0× | moderate | ▰▱▱ |
| 2.0× – 3.0× | strong | ▰▰▱ |
| ≥ 3.0× | stretched | ▰▰▰ |
The confidence value drives the ribbon transparency (in Adaptive Intensity mode), feeds the High Confidence alert (≥ 2.5× trigger), and is reported in the Status dashboard.
🟦 SEMI-MARKOV DURATION BUCKETS
**The Memoryless Problem**
A standard Markov chain says: "Given I'm in Bull, the probability of staying Bull tomorrow is X — regardless of whether Bull started yesterday or 200 bars ago." This is the memoryless property, and on real markets it's wrong. A 200-day-old Bull regime carries different mean-reversion risk than a 5-day-old one.
**The Refinement**
Markov Forecaster PRO additionally builds two CONDITIONAL transition matrices:
- `P_young` — transitions counted when the source regime's age was below its empirical average duration
- `P_mature` — transitions counted when the source regime's age was at or above the average
Both matrices are constructed in parallel with the main P, using the same per-bar bucketing logic and updated continuously. The self-transition probabilities for the current regime are then surfaced in the Status dashboard:
P young / mature 91% / 64%
The user reads this as: "When this regime was young (under its avg duration), it continued 91 % of the time. When mature, only 64 %." On a long-running regime this is the canonical signal that mean-reversion risk is rising — without the rest of the chain math being polluted.
A minimum of 10 samples per bucket is required before a value is shown; below that the cell reports "—" rather than display an unreliable probability.
🟦 FORWARD PROBABILITY CONE
**Matrix Exponentiation**
The 3×3 transition matrix P encodes one-bar-ahead probabilities. To project further out, the matrix is multiplied by itself:
P¹ = P — next bar
P³ = P × P × P — 3 bars out
P⁵ = P × P × P × P × P — 5 bars out
P^h = repeated h times — user-configured horizon
The Forecast Cone panel renders all four horizons for each of the three destination regimes, conditioned on the current regime. A trader reading the row "BULL" sees the probability the market will be in Bull at each horizon, given the current regime.
**Stationary Distribution**
Power-iterating the matrix to convergence yields the stationary distribution — the long-run probability of being in each regime, independent of starting state. With 50 iterations (default), any well-behaved 3×3 stochastic matrix is essentially converged.
stat + stat + stat = 1.0
This is rendered as the "long-run" row in the Forecast panel and the "Long-run share" cell in the Status panel.
**Honest Limitation**
The cone uses the UNCONDITIONAL matrix (averaged over all regime ages). For duration-conditional probabilities, the Status panel's P cell is the relevant readout. This split is explicit in both the cone footer label and the Forecast input tooltip.
🟦 SAMPLE-SIZE DISCLOSURE
A probability is only as reliable as the data behind it. Markov Forecaster PRO surfaces sample size in three places:
**Per-row sample count in the Transition Matrix**
A fifth column "n" in the matrix panel reports the number of transitions from each source regime. The cell is colored by reliability tier:
| Sample N | Tier | Color |
|---|---|---|
| ≥ 100 | high | foreground |
| 30 – 99 | moderate | dim |
| < 30 | low | divergent (warning) |
A row with fewer than 30 transitions is flagged because three-decimal probabilities derived from sparse data are noise, not signal.
**Total Sample N in the Status panel**
The Status dashboard's "Sample N" cell sums all transition counts and reports a global reliability tier:
| Total N | Tier |
|---|---|
| ≥ 200 | high (full color) |
| 50 – 199 | moderate (foreground) |
| < 50 | low (divergent warning) |
**Matrix footer**
The matrix panel's footer also shows the total N in compact notation (e.g. "N = 1.8k") for at-a-glance check.
The goal of this layer is honesty: a freshly-loaded chart with 30 bars of history should NOT display the same matrix as a 10-year chart, and the reliability tier makes the difference obvious without the user having to inspect counts manually.
🟦 PENDING-REGIME EARLY WARNING
**The Lookback Lag**
Because the regime is classified from log(close / close ), the official regime label inherently lags — by the time the threshold is crossed, the move is already N bars old. This is a structural feature of the model, not a bug, but it can be partially mitigated.
**Pending Logic**
Inside Sideways, when the log return reaches 70 % of either boundary, the dashboard fires an early-warning cue:
distance_fraction = max(|logRet| / threshold, ...)
isPending = (regime == SIDE) AND (distance_fraction ≥ 0.70)
The Status panel's "Pending" cell displays the direction the return is leaning toward and the current fraction:
⚠ ▲ BULL 87%
Color matches the leaning regime. The Pending Regime alert (default OFF, opt-in) fires on the first bar a pending state is entered.
This is not a regime change signal — it's a "watch this" cue, triggered roughly 30 % before the official threshold is crossed. Used alongside the official regime change, it gives the user advance notice without compromising the threshold's strictness.
🟦 LOOK-AHEAD-FREE BACKTEST
**The Look-Ahead Trap**
`regime` is derived from `log(close / close )`, which contains today's close. Allocating today's return to today's regime is look-ahead bias — the strategy would "know" today's regime before today's close, which is impossible in real-time trading. Most published Markov backtests have this bug.
**The Fix**
Markov Forecaster PRO allocates positions on the PRIOR bar's confirmed regime:
regForAlloc = regime // yesterday's confirmed regime
If yesterday's regime was Bull, we are long today. The strategy is realisable in real time because the previous bar's regime is known when the current bar opens.
This means the strategy is delayed by one bar relative to the regime label — and that's the correct, honest treatment. If a Bull→Bear flip happens on bar t, the strategy takes bar t's loss (still long from regime =Bull) and exits at bar t+1.
**Fees and Slippage**
Every Bull entry and exit pays the configured per-fill cost:
costFrac = feesPct/100 + slippageBps/10000
costPerFill = log(1 − costFrac) // negative log-space cost
The cumulative cost is debited from the Bull log-return total:
Bull gross = exp(bullLogR) − 1
Bull net = exp(bullLogR + bullCostLogR) − 1
A round-trip pays the fee + slippage twice. With defaults (0.10 % fee, 5 bps slippage), each round-trip costs roughly 0.30 % of equity in log space.
**Display**
The Backtest panel renders:
| Field | Value |
|---|---|
| Per-regime rows | GROSS cumulative log return (no fees) |
| Strategy row | NET cumulative (fees applied) vs Buy-and-Hold |
| Methodology footer | trade count · fee % · slippage bps |
The headline strategy result is the NET number — the realistic outcome a trader would have experienced. The gross numbers are kept for diagnostic comparison.
**What This Is Not**
This is a diagnostic backtest, not a tradable strategy. There is no position sizing, no risk management, no overnight financing, no shorting. It tells you whether "long when prior bar was Bull, flat otherwise" would have beaten buy-and-hold after fees — nothing more.
🟦 MULTI-TIMEFRAME CONFLUENCE
The same regime logic runs on a user-configured higher timeframe via `request.security` with `lookahead = barmerge.lookahead_off` and `gaps = barmerge.gaps_off` (anti-repaint mandatory). The result is reported in the Status dashboard's HTF block:
| State | Display | Color |
|---|---|---|
| HTF regime matches LTF regime | ✓ ALIGNED | bull |
| HTF regime differs from LTF | ⚠ DIVERGENT | bear |
| Insufficient HTF data | — | foreground |
Divergent regimes are common at trend turns — the LTF flips before the HTF catches up. Aligned regimes carry higher conviction. A separate alert ("MTF Confluence") fires on regime entries only when the HTF agrees.
Recommended pairings:
| Chart | HTF |
|---|---|
| 1H | D |
| 4H | W |
| D | W |
Use at least 3× your chart timeframe — anything closer and the two regimes track each other with no information gain.
🟦 VISUAL LAYER
**Regime Ribbon**
The chart background is tinted to the current regime color with three style options:
| Style | Behaviour |
|---|---|
| Subtle | Fixed 92 % transparency (price stays hero) |
| Bold | Fixed 75 % transparency (easy to scan from far) |
| Adaptive Intensity | Transparency scales with confidence (60 % – 95 %) |
In Adaptive Intensity mode, a strong directional move (confidence ≥ 3×) renders the ribbon at full intensity; a weak move stays faint. The ribbon doubles as a visual confidence meter.
**Three-Layer Neon Glow Signals**
On every confirmed regime change (after the Min Hold filter), the indicator drops a three-layer halo on the chart:
| Layer | Size | Transparency | Purpose |
|---|---|---|---|
| Outer | size.large | 80 % | Soft halo |
| Middle | size.normal | 50 % | Mid-glow |
| Core | size.small | 0 % | Bright center |
Bull markers (▲) render below the bar; Bear (▼) and Sideways (◆) render above. The Min Hold input (default 4 bars) requires a new regime to persist before its flip is drawn — kills label spam in choppy zones without affecting the underlying transition counts.
**Confidence Tags (optional)**
An off-by-default toggle adds the confidence multiplier to each signal arrow ("BULL 2.3×"), useful for screen captures and analysis.
🟦 DASHBOARDS
Four theme-aware panels, each independently togglable and positionable:
**Status Panel** (default: Bottom Left)
Compact live readout — current regime, age, confidence, pending direction, average duration, young/mature bucket, P young vs mature, expected remaining bars, long-run share, sample size, and HTF alignment. 16 rows base, 19 with HTF block enabled.
**Transition Matrix Panel** (default: Top Right)
3×3 next-bar P matrix with diagonal-highlighted self-transition cells. The fifth column reports per-row sample size with reliability tier coloring. Matrix footer shows total N.
**Forecast Cone Panel** (default: Middle Right)
Forward probability for each destination regime at horizons +1, +3, +5, and +configured. Steady-state row shows the long-run distribution. Current regime is reported at the bottom for context.
**Backtest Panel** (default: Bottom Right)
Per-regime gross cumulative return, average per-bar, and the bar count. Strategy row shows NET return vs buy-and-hold. Methodology footer lists trade count, fee, and slippage.
All four panels share the same theme palette and adapt to Dark / Light display mode. Text size is independently configurable (Tiny / Small / Normal / Large).
🟦 COLOR THEMES
Ten cohesive palettes tuned to the Apex design system, each defining three regime axes (Bull, Bear, Sideways):
| Theme | Character | Bull | Bear | Sideways |
|---|---|---|---|---|
| Prism | Classic | Forest green | Crimson | Slate grey |
| Focus | Default | Cyan steel | Deep orange | Cool blue-grey |
| Solar | Warm | Amber | Indigo red | Lavender grey |
| Frost | Cool | Sky blue | Soft lavender | Pale steel |
| Laser | Neon | Lime green | Hot crimson | Charcoal grey |
| Aurora | Bright | Gold | Scarlet | Warm beige |
| Plasma | Electric | Aqua | Magenta | Slate teal |
| Bloom | Soft | Mint | Hot pink | Blue-grey |
| Eclipse | Deep | Navy | Dark crimson | Steel grey |
| Carbon | Minimal | Near-white | Mid-grey | Dark grey |
One theme selection drives every visual component: ribbon, glow signals, all four dashboard headers, regime-colored cells, diagonal matrix highlights, and HTF alignment color.
**Dark / Light Display Mode**
Dashboard chrome (background, foreground, borders, section dividers) flips between dark-on-bright and bright-on-dark. The regime axis colors remain consistent across modes — only the panel chrome changes.
🟦 ALERT SYSTEM
Six alert conditions, each independently togglable:
| Alert | Condition |
|---|---|
| Bull Regime Entry | Regime flipped to BULL (after Min Hold confirmation) |
| Bear Regime Entry | Regime flipped to BEAR |
| Sideways Regime Entry | Regime flipped to SIDEWAYS (default OFF) |
| High Confidence | confidence ≥ 2.5× threshold, first bar of crossing |
| MTF Confluence | Regime change + HTF agrees |
| Pending Regime | Inside Sideways, log return ≥ 70 % of either boundary (default OFF) |
All alerts fire on confirmed bar close and use the standard `alertcondition` mechanism. The Min Hold filter applies to entry alerts — a new regime must persist Min Hold bars before its entry alert fires, matching the on-chart glow markers.
The Sideways and Pending alerts are default-off because they can fire more frequently than the other types — opt-in by design.
🟦 SETTINGS REFERENCE
**Theme**
- Theme — One of 10 Apex palettes. Default: Focus
- Display Mode — Dark / Light. Default: Dark
**Regime Logic**
- Threshold Mode — Adaptive (k·σ·√N) / Fixed (%). Default: Adaptive
- Lookback Window — Bars for the rolling log return. Default: 20
- Adaptive k — Sigma multiplier. Default: 1.5
- Fixed Bull Threshold — Used only in Fixed mode. Default: 5.0 %
- Fixed Bear Threshold — Used only in Fixed mode. Default: 5.0 %
- Volatility Window — Bars for the per-bar stdev. Default: 100
- Min Hold — Bars a new regime must persist for label drawing. Default: 4
**Forecast**
- Forecast Horizon — Bars projected by the right-most cone column. Default: 10
- Stationary Power — Power-iteration count. Default: 50
**Regime Ribbon**
- Show Regime Ribbon — Toggle. Default: ON
- Ribbon Style — Subtle / Bold / Adaptive Intensity. Default: Adaptive Intensity
**Signal Labels**
- Show Regime Change Signals — Toggle. Default: ON
- Glow Effect — Three-layer halo toggle. Default: ON
- Show Confidence on Signal — Adds multiplier tag (e.g. "BULL 2.3×"). Default: OFF
**Multi-Timeframe**
- Enable HTF Confluence — Toggle. Default: ON
- HTF Resolution — Higher timeframe. Default: D
**Backtest**
- Trading Fee (% per fill) — Per-side commission. Default: 0.10 %
- Slippage (bps per fill) — Per-side slippage in basis points. Default: 5
**Dashboards**
- Show Status / Matrix / Forecast / Backtest — Independent toggles. Default: all ON
- Dashboard Size — Tiny / Small / Normal / Large. Default: Small
**Panel Positions**
- Status Panel — 9-position grid. Default: Bottom Left
- Matrix Panel — Default: Top Right
- Forecast Panel — Default: Middle Right
- Backtest Panel — Default: Bottom Right
**Alerts**
- Bull / Bear / Sideways Regime Entry — Independent toggles
- High Confidence — Default: ON
- MTF Confluence — Default: ON
- Pending Regime — Default: OFF
🟦 COMPATIBILITY
Works on all asset classes and all timeframes in PulseWire Pine Script v6.
- Crypto: Spot, futures, perpetual contracts
- Forex: All pairs
- Equities: Stocks, ETFs, indices
- Commodities: Metals, energy, agriculture
- Timeframes: 1m through Monthly
The adaptive threshold normalises by per-bar realised volatility, making the regime classification volatility-agnostic across assets without manual recalibration. The same default settings work on BTCUSDT daily, SPY weekly, and EURUSD 4H — only the HTF resolution input should be adjusted to match the chart timeframe.
🟦 TECHNICAL NOTES
- Pine Script v6
- `max_labels_count = 500`, `max_lines_count = 100`, `max_bars_back = 5000`
- No repainting — all regime classifications are computed on confirmed bar close. The HTF request uses `lookahead = barmerge.lookahead_off` and `gaps = barmerge.gaps_off`
- Regime change debouncing uses `ta.barssince` to avoid runtime-indexed history reads (which can trip "cannot determine max_bars_back" in Pine v6)
- Heavy computation (matrix exponentiation, stationary distribution, dashboard rendering) is gated on `barstate.islast` to run once per chart render
- Transition counting uses `barstate.isconfirmed` to avoid double-counting the live bar
- Backtest accumulators charge fees at trade boundaries — entries and exits detected by `regForAlloc != regForAlloc `
- Duration buckets use the SOURCE regime's age at the time of transition for classification; the threshold is the empirical average duration of that regime, computed continuously
- Matrix multiplication is implemented as an unrolled 3×3 flat-array routine for portability and speed
- Empty-row fallback to uniform 1/3 in the transition matrix prevents NaN propagation when a regime has not appeared in visible history
🟦 LIMITATIONS — READ THIS
This indicator is statistically honest about what it can and cannot do. Three known limitations:
1. **The Markov assumption is partially violated.** Markets are not memoryless. The duration buckets (Section: Semi-Markov Duration Buckets) mitigate this but do not eliminate it.
2. **Forward probabilities are not predictions.** They are conditional probabilities under the chain assumption. A "Bull 58 % at +10 bars" reading does not mean "58 % chance the next 10 bars are bullish" — it means "given a long-run sample of similar starting states, 58 % were in Bull at +10 bars". Use the cone as ONE input alongside other analysis.
3. **The regime label lags by N bars.** This is structural — the rolling log return necessarily looks back. The Pending early warning partially mitigates this but cannot eliminate the lag. Treat the official regime change as a confirmation, not a leading signal.
🟦 DISCLAIMER
This indicator is provided for educational and informational purposes only. It does not constitute financial advice. Past performance does not guarantee future results. The hypothetical backtest is a diagnostic tool — there is no position sizing, no risk management, and no consideration of overnight financing, dividends, or other real-world frictions beyond the configured fee and slippage. Always conduct your own analysis and apply proper risk management. Indicator

VWSR Zones By AcrofinsVWSR Zones — Acrofins Edition
A volume-weighted support/resistance engine with break/retest signals, a configurable risk-management overlay, and a session-aware money manager. Built to make discretionary price-action trading more structured and less reactive.
What this indicator does
Most "support and resistance" tools draw lines at every minor swing high or low and leave you to decide which ones matter. This indicator does the prioritization for you.
Every time price makes a pivot (a swing high or swing low), the indicator scores that pivot based on how much volume traded into it and how strongly price reacted after it formed. High-volume pivots with sharp reactions get high scores; thin-volume pivots with weak reactions get low scores. Nearby pivots get clustered into zones, and each re-touch of a zone strengthens it further. Zones decay in importance as they age, and the weakest ones get pruned so the chart stays clean.
The result is a small set of ranked, weighted S/R zones — typically 4–8 active at any time — instead of dozens of unprioritized lines. Zones are fully price-anchored and extend to the right of the chart so they move naturally with every scroll and pan.
On top of the zone engine sits a complete trade-management layer: break detection, retest detection, automatic SL/TP/break-even levels, a higher-timeframe trend filter, an intraday-only mode, a daily loss cap, and a real-time dashboard.
Key features at a glance
Zone engine
Volume-weighted pivot scoring (0–100 scale)
Adaptive zone clustering with ATR-padded merge
Touch counter (each retest reinforces the zone)
Age decay so old zones lose relevance gracefully
Auto-pruning when the active count exceeds your cap
Conviction scale displayed on each zone label (●●○○○ through ●●●●●)
Color intensity reflects conviction — bold solid fill for strong zones, soft transparent fill for weak zones
Signals
Break ▲ / Break ▼ detection with optional close-past-zone confirmation
Retest ▲ / Retest ▼ queue tracking up to 6 broken zones in parallel (most indicators only track the most recent)
Counter-trend tagging ⚠ when a signal fires against the higher-timeframe trend
Optional volume floor and volume cap filters (gap-day protection)
Optional momentum filter (×ATR candle range)
Risk management
Four built-in presets (Conservative, Balanced, Aggressive, Scalping) plus full Custom
ATR-based SL with optional zone-aware override
Three take-profit targets with R-multiple targeting
Break-even trail after TP1
Optional intraday-only mode that blocks late entries and force-closes positions
Money manager
Currency-symbol and number-notation configurable (works globally — Western K/M/B or Indian K/L/Cr)
Per-trade risk in your account currency
Daily loss cap that blocks new entries once hit
Lot-aware sizing for futures/options (configurable lot size)
Session and lifetime P&L tracking
Higher-timeframe context
Configurable HTF (default 1H) with fast/slow EMA classification
Trend direction (Bullish / Bearish / Neutral) shown in dashboard
Counter-trend signals flagged with ⚠ symbol
Optional hard-block of counter-trend entries
Operational
Instrument-type auto-detect (Index vs Single Stock) with adaptive filter defaults
Session filter with configurable timezone
Optional weekly expiry-day filter for derivatives traders (useful for NSE, CBOE)
Persistent statistics across input changes (W/L, Win Rate, Avg R, BE saves)
Theme-adaptive colors (light & dark) with WCAG AA contrast
JSON webhook format for alerts (for automation pipelines)
How it works under the hood
1. Pivot scoring
When a swing high (resistance pivot) or swing low (support pivot) confirms, three score components are computed:
Base score (10 points) — every pivot starts with a baseline
Volume score (0–40 points) — ratio of pivot-bar volume to recent average volume
Reaction score (0–30 points) — how far price moved away from the pivot in the next N bars, measured in ATR
Total raw score is capped at 100. Conviction is shown on each zone label as a dot scale:
Scale
Tier
Score range
●●○○○
Weak
< 30
●●●○○
Medium
30–60
●●●●○
Strong
60–85
●●●●●
Elite
85+
Zone fill color intensity matches the conviction tier — Elite zones are bold and opaque; Weak zones are soft and transparent. This lets you read zone importance at a glance without needing to check labels.
2. Zone clustering
If a new pivot is within Zone Merge Distance × ATR of an existing zone of the same type, it merges into that zone instead of creating a new one. The merge expands the zone bounds (with ATR padding maintained), increments the touch counter, and adds a fraction of the new pivot's score plus a touch bonus.
If no nearby zone exists, a new zone is created with ATR-padded bounds (±0.15 × ATR).
3. Decay and cleanup
Every confirmed bar, all zone scores decay slightly (rate controlled by Age Decay Rate). Zones are removed when they get too old, too weak, or have been broken without retest for too long. If the active zone count exceeds Max Active Zones, the weakest one is pruned.
4. Break detection
A bullish break fires when price closes above a resistance zone's top (optionally requiring close to exceed by X × ATR). A bearish break fires on the symmetric condition. Optional filters require minimum volume, maximum volume (gap protection), and minimum candle range.
When multiple zones break on the same bar, the higher-scored zone wins — so you get the most meaningful signal, not a random one.
5. Retest detection
After a break, the indicator watches for price to return and test the broken zone (which has flipped role — broken resistance becomes support and vice versa). A valid retest requires:
Price touched the zone within the configured retest window
Price bounced off the zone by at least Min Retest Reaction × ATR
Bounce close is on the right side of the zone
A queue tracks up to 6 broken zones in parallel — so retests of zones broken several signals ago aren't lost.
6. Trade lifecycle
When risk management is enabled and a signal fires (and no position is currently active), an entry is taken at the close of the signal bar. SL is placed using your configured preset (ATR-based or zone-aware). Three TPs are spaced at R-multiples of the SL distance.
The trade is tracked bar-by-bar:
Each TP fires once (first-touch latching)
After TP1, SL trails to break-even (configurable)
Trade closes when SL is hit, TP3 is hit, or (in intraday mode) the force-close time is reached
A 1/3 + 1/3 + 1/3 partition model computes realized R-multiple at close
Abbreviations explained
Abbrev
Meaning
S/R
Support / Resistance
VWSR
Volume-Weighted Support / Resistance
ATR
Average True Range — a volatility measure
EMA
Exponential Moving Average
HTF
Higher Timeframe (e.g., when chart is 5m, HTF might be 1H)
SL
Stop Loss — the price at which you accept the trade is wrong
TP
Take Profit (TP1, TP2, TP3 = three profit targets)
BE
Break-Even — SL moved to entry price after TP1
R
Risk unit — distance from entry to original SL
R:R
Risk-to-Reward ratio
W/L
Wins / Losses
CT
Counter-Trend (signal direction conflicts with HTF trend)
F&O
Futures & Options
CE / PE
Call / Put (Indian markets terminology)
OHLC
Open, High, Low, Close
Settings groups walkthrough
⚙️ Main Settings — Pivot Lookback, Max Active Zones, Zone Merge Distance, Min Score to Display.
🎯 Instrument Preset — Auto-detect (recommended) identifies Index vs Single Stock from the ticker. Indices use looser volume filters; single stocks get tighter defaults with gap-day protection.
📈 HTF Trend Filter — Two-EMA trend classifier on a higher timeframe. Counter-trend signals get tagged ⚠. Can flag or hard-block counter-trend entries.
🕒 Session & Expiry — Configurable session window (timezone-aware). Optional weekly expiry-day filter for derivatives traders.
🌙 Intraday-Only Mode — Entry cutoff time and force-close time. Useful for strict day-traders who want an automatic guardrail.
📦 Zone Detection — ATR length, volume lookback, reaction window, age decay, max zone age.
🔍 Filters — Volume floor, volume cap (gap protection), momentum filter, mitigation filter, close-past-zone filter.
🎯 Signals — Toggle Break/Retest signals, configure retest window, set minimum retest reaction.
🛡️ Risk Management — Choose preset or Custom. Presets:
Conservative: SL 2.5×ATR, TP 1R/2R/4R
Balanced (default): SL 1.5×ATR, TP 1R/2R/3R
Aggressive: SL 1.0×ATR, TP 1.5R/2.5R/4R
Scalping: SL 0.8×ATR, TP 0.8R/1.5R/2R
💰 Money Manager — Account capital, per-trade risk %, daily loss cap %, currency symbol, number notation, lot-aware sizing.
🎨 Visual — Theme, zone visibility, label visibility, watermark, font sizes.
📊 Dashboard — Toggle, position, stats display, reset counter.
🔔 Alerts — Toggle per-event alerts. JSON webhook format available for automation.
Visual elements on the chart
Zones — Price-anchored colored boxes extending to the right edge of the chart. Resistance zones in the bear color, support zones in the bull color. Fill opacity reflects conviction tier — ●●●●● Elite zones are bold and solid; ●●○○○ Weak zones are faint and transparent. Zones move naturally with the chart in all directions.
Zone labels — Dot-scale conviction badge, numeric score, touch count, and broken flag. Examples:
●●●○○ 45 — medium zone, score 45
●●●●● 91 ×3 — elite zone with 3 touches
●●●●○ 67 ✕ — strong zone that has been broken
Break ▲ / Break ▼ markers — Labels at the signal candle. Bullish breaks appear below the bar pointing up; bearish breaks above the bar pointing down. Counter-trend breaks tinted amber with ⚠.
Retest ▲ / Retest ▼ markers — Same style as breaks but for retest signals.
Force-close markers — ⏰ FORCE CLOSE on the bar where the intraday cutoff fired.
SL/TP/Entry lines — Five lines from the entry bar: Entry (dotted blue), SL (solid red, dims to translucent when BE active), TP1/TP2/TP3 (dashed green, turns solid cyan with ✓ on hit). Labels show price, % distance from entry, and optional money risk.
Dashboard — Live state table including zone trend, HTF trend, signal, score, active zone count, session status, live trade levels, risk metrics, daily P&L, and lifetime stats.
Recommended usage
Day-trading (5m–15m chart): Lookback 5–10, HTF 60 or 240, Intraday-only ON, Balanced or Scalping preset.
Swing trading (1H–4H chart): Lookback 10–15, HTF D, Intraday-only OFF, Conservative or Balanced preset.
Position trading (D chart): Lookback 15–25, HTF W, Intraday-only OFF, Conservative preset.
Indices (NIFTY, BankNIFTY, SPX, NDX etc.): Use Auto-detect or Index preset. Volume filters auto-relax. HTF filter is especially useful — indices respect macro trends more consistently than individual stocks.
Single stocks: Use Auto-detect or Single Stock preset. Gap-day protection on. Volume cap prevents false breaks on news spikes.
Alerts
All alerts are bar-close based (no intra-bar firing). Available events:
🟢 Break ▲ / 🔴 Break ▼
🟢 Retest ▲ / 🔴 Retest ▼
🛑 SL Hit / 🛡️ Break-Even Stop-Out
🎯 TP1 Hit / TP2 Hit / TP3 Hit
🛡️ Break-Even Activated
⏰ Intraday Force-Close
🚫 Daily Loss Cap Hit
⚠ Counter-Trend Signal
Toggle JSON webhook format for automation pipelines. Each break/retest alert includes ticker, price, score, SL, TP1/TP2/TP3, R:R, and counter-trend flag.
Notes on data assumptions
No repaint — signals confirm on bar close. HTF trend uses lookahead_off so the HTF reference never includes future data.
No backtest engine — the W/L stats are based on the indicator's own simulated entries. Useful for sanity-checking parameters, not for performance verification. Run a proper strategy backtest before sizing real money.
Money tracking is theoretical — P&L is computed as R-multiple × per-trade money risk. It does not model slippage, commissions, taxes, or option premium decay.
Disclaimer
This is a technical analysis tool, not financial advice. The signals and risk levels generated are based on historical price action and the indicator's own logic; they do not predict future results. Past performance of any signal pattern does not guarantee future performance. Trading involves substantial risk of loss. Use this tool to structure your own decisions, not to replace them. Always size positions according to your risk tolerance and verify levels independently before acting.
VWSR Zones — Acrofins Edition · v2.0.0 · Acrofins (Kiva Financial Services Pvt. Ltd.) Indicator

Indicator

Strategy

Indicator

Indicator

Indicator
