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.) אינדיקטור

אינדיקטור

אסטרטגייה

אינדיקטור

אינדיקטור

אינדיקטור

אינדיקטור

Yield Spread MacroYield Spread Macro — Indicator Guide
What it does
This indicator compares the interest rate differential between two countries against the actual FX price of their currency pair, both plotted on the same normalised scale so they can be directly compared. The core idea is that exchange rates are fundamentally driven by the difference in yields between two economies — when one country's rates are significantly higher than another's, capital tends to flow toward the higher-yielding currency, pushing its price up. This indicator tracks whether the FX price is keeping up with that yield story or diverging from it.
What you're looking at on the chart
Blue line — Yield Spread (z-score)
The interest rate differential between the US and the local country, normalised to show where it sits relative to its own history. Above zero means the spread is above average. Below zero means it has compressed.
Aqua line — FX Price (z-score)
The FX pair price, normalised on the same scale as the spread so the two can be directly compared.
Shaded fill between the lines
The gap between the spread and price. When this gap is wide, the two series have diverged — price is not reflecting what the rate differential is saying.
Coloured line (lime/yellow/orange/red) — Rolling Correlation
This is the most important line on the chart. It measures how closely the yield spread and FX price are actually tracking each other over the selected window. Think of it as a trust meter for the spread signal:
🟢 Above 0.80 — strong alignment, spread is a reliable guide right now
🟡 0.40–0.80 — moderate, use alongside other inputs
🟠 0.20–0.40 — weak, something else is driving the pair
🔴 Below 0.20 — regime shift, the spread relationship has broken down entirely
Green background / ▲ DIV label
The yield spread is rising but price has not caught up yet. If correlation is strong this suggests price may follow higher. If correlation is weak, treat it as a tension signal rather than a directional call.
Red background / ▼ DIV label
The yield spread is falling but price has not caught down yet. Price is elevated relative to where the rate differential says it should be. Same caveat — only a strong correlation makes this actionable.
Horizontal dotted lines
The ±1σ and ±2σ bands show historically stretched levels. When either the spread or price z-score pushes beyond ±2, it is statistically extended relative to the lookback window.
Settings explained
Pair Settings
FX Pair
The currency pair you want to analyse. Options are USDJPY, USDCAD, EURUSD, GBPUSD, AUDUSD. Changing this automatically updates all yield series, breakeven data, and FX price feeds — you don't need to change anything else.
Yield Timeframe
The timeframe used to fetch yield data. Default is Daily. Leaving this at D is recommended regardless of what chart timeframe you are on — yield data is most meaningful and cleanest on a daily basis.
General Settings
Normalization Length
The lookback window for the z-score calculation — how many bars of history the indicator uses to compute the average and standard deviation that everything is measured against.
Lower (20–50) — reactive, reflects recent history only, z-score moves frequently
Default (100) — roughly five months on a daily chart, good medium-term context
Higher (200–300) — structural, slow-moving, only flags genuinely historical extremes
If you are a shorter-term trader bring this down. If you want to see where things sit in a multi-year context bring it up.
Spread EMA Smoothing
Applied to the raw yield spread before it gets z-scored. Yield data can print erratic single-day spikes due to auction flows or data feed quirks. This smooths those out.
Lower (3–5) — close to raw spread, more reactive, more noise
Default (10) — removes day-to-day jitter while still tracking real moves
Higher (20–30) — only responds to sustained shifts in the differential, very smooth
Divergence Settings
Divergence Lookback (bars)
How far back the indicator looks when deciding whether the spread and price are moving in opposite directions. A divergence is flagged when the spread has moved one way and price has moved the other way over this window.
Lower (3–5) — very sensitive, signals fire frequently, more noise
Default (10) — roughly two trading weeks on a daily chart
Higher (20–30) — only flags sustained, structural divergences
Min Z-Score Gap to Flag Div
The minimum difference between the spread z-score and price z-score required before a divergence label appears. This prevents the labels from firing when the two lines are close together and the divergence is trivial.
Lower (0.1–0.2) — more signals, lower quality
Default (0.3) — reasonable filter for meaningful gaps
Higher (0.5+) — only the most extreme divergences get flagged
Correlation Settings
Correlation Length (bars)
The rolling window used to measure how tightly the yield spread and FX price are tracking each other. This is the most important setting to understand.
Lower (20–30) — very reactive, correlation shifts quickly, good for seeing regime changes as they happen but noisy
Default (60) — roughly three months on a daily chart, captures a meaningful regime without being too slow
Higher (120–200) — slow-moving, tells you about the long-run structural relationship rather than the current regime
Plot Correlation Line
Toggle the correlation line on or off. If you find the chart visually busy you can turn this off and rely on the table value instead.
Display Settings
Show Zero Line — the dashed horizontal line at zero. Useful reference for whether z-scores are above or below their historical average.
Show ±1σ / ±2σ — the dotted band lines. Turn off if you want a cleaner chart.
Show Data Table — the data panel in the top right corner showing all live values including FX price, yields, real yield, implied breakeven, spread in basis points, z-scores, divergence status, and correlation reading. Turn off if you don't need it or are using the indicator on a small screen.
How to read it in practice
The right workflow is to check the correlation first, then the divergence, in that order.
Check correlation. If it is below 0.40 the spread is not currently driving the pair and the divergence signals should be treated with scepticism. Something else — geopolitics, intervention risk, risk sentiment — is dominant.
Check the spread z-score. Is the differential historically stretched or compressed? Above +2 or below −2 is a significant reading.
Check the divergence. Is price keeping up with the spread or lagging it? A green divergence with strong correlation means price may have room to catch up higher. A red divergence with strong correlation means price may have room to correct lower.
Use the real yield toggle. Switching between nominal and real yields shows you how much of the spread is being driven by inflation expectations versus actual rate differentials. If the two modes show very different spreads, inflation expectations are a significant part of the story.
The indicator works best on a daily chart with the yield timeframe set to D. It is a macro context tool, not a precise entry signal — it tells you whether the fundamental backdrop supports a directional bias, and how much to trust that signal right now. אינדיקטור

NEWS [Ordinary Trader]# NEWS
NEWS by Ordinary Trader marks high-impact USD economic news events on your chart — CPI, NFP, FOMC, PCE, GDP, and the rest of the red-folder calendar — both past and upcoming.
Part of the Ordinary Trader family alongside **EMAs**, **FVGs**, **KEY LEVELS**, **ZONES**, and **STRATEGY (LITE / PRO)**. The methodology calls for standing aside during high-impact news; this indicator makes those events impossible to miss.
## Visuals
Each event produces a **full-height vertical column** at the exact event time, plus a **small triangle marker** in a thin pane below the chart. Hover the marker for event name, day, date, and time in your selected timezone.
~3 months of historical events stay visible. ~1 week of upcoming events floats in the projected area to the right of your latest candle.
## Tiers + Filters
Events auto-classify into 4 tiers, each with its own colour:
- **Tier 1** — CPI, NFP, FOMC Rate Decision, PCE, GDP
- **Tier 2** — FOMC Minutes, Retail Sales, ISM PMI, PPI
- **Tier 3** — ADP, Consumer Confidence, Michigan, JOLTS, Initial Jobless Claims, Durable Goods
- **Uncategorised** — everything else (default OFF)
Hybrid filtering: tier master toggles + per-event toggles.
## Alerts (optional)
Pre-event TradingView alerts fire N minutes before each visible event (default 30). Same filters apply. One-time setup: enable in indicator settings + add a TradingView alert with condition `Any alert() function call`.
## Timezone
10 options (ET / CT / PT / UTC / UK / CET / Tokyo / HK / Singapore / Sydney) for tooltips and alerts. DST automatic.
## Notes
- USD events only; non-USD on the roadmap.
- Built on the Forex Factory data feed maintained by **@toodegrees** via Pine Seeds. The visual layer, tier classification, filter UI, and alerts are original work.
- License: Mozilla Public License 2.0. Free to use. אינדיקטור

Quant H - TradeRRQuant H - TradeRR
Quant H - TradeRR is a visual regime indicator that classifies market conditions into three states: Bull, Bear, and Sideways. It uses a rolling log-return model to label each bar, then builds a live transition matrix from chart history so you can see how likely the market is to remain in the current regime or shift into another one.
The core idea is simple: markets tend to move in persistent states, and those states can be measured. This script turns that into a clean on-chart framework by showing both the current regime and the probability structure behind it.
What it does
* Labels each bar as Bull, Bear, or Sideways
* Builds a live Markov transition matrix from visible chart history
* Highlights regime persistence through the diagonal probabilities
* Estimates the stationary distribution, showing the long-run regime mix
* Marks durable regime transitions directly on the chart
* Adds a subtle background ribbon so regime shifts are easy to spot visually
How to use it
* Best used on higher timeframes like 4H, Daily, and Weekly
* Works especially well on trending assets like indices, crypto, and liquid large caps
* Adjust the lookback window and thresholds to make regime detection tighter or looser
* Watch the diagonal of the matrix closely: higher diagonal values suggest stronger regime persistence
How to read it
* Bull: positive rolling return above the chosen threshold
* Bear: negative rolling return below the chosen threshold
* Sideways: anything in between
* Transition matrix: probability of moving from one regime to another
* Stationary distribution: the long-run baseline mix of Bull/Bear/Sideways regimes
Why it matters
Most indicators only tell you what price is doing now. This one helps frame what state the market is in, how sticky that state has been, and how often transitions happen. It is designed to support regime awareness, not replace your execution model.
Notes
* This is a probabilistic framework, not a prediction engine
* Results depend on the visible chart history and your chosen parameters
* Best used alongside structure, trend, volatility, and risk management
Disclaimer
This script is for educational and research purposes only. It is not financial advice. אינדיקטור

Quantum Pulse AIHigh-Level Overview
This script is a hybrid trading system that combines traditional trend-following indicators with a k-Nearest Neighbors (k-NN) Machine Learning engine. Instead of relying solely on hardcoded crossovers, it looks at the current market conditions, searches its historical memory for similar moments, and predicts the next move based on what happened in the past.
1. The Technical Foundation (Base Features)
Before the AI even kicks in, the script tracks a robust baseline of institutional-grade metrics:
Moving Averages: Two customizable MAs (SMA/EMA/VWMA) determine short-term momentum.
VWAP & Bands: Anchored daily VWAP with up to 3 standard deviation bands to judge institutional value and overbought/oversold extremes.
Trend Smoothing: Hull Moving Average (HMA) and Supertrend dictate the broader directional bias.
Momentum Filters: ADX ensures the market is actually trending (ignoring chop), while relative volume tracks participation.
2. The AI k-NN Classification Engine
This is the "brain" of the script. It uses a mathematical algorithm to predict price direction based on Euclidean geometry.
Feature Vectors: It takes 4 real-time data points (MA spread, Price vs. VWAP, HMA slope, and Relative Volume) and normalizes them into a 4-dimensional spatial grid.
Historical Scanning: The script looks back in time (e.g., 2,000 bars) and calculates the exact geometric distance between the current market conditions and historical market conditions.
Voting System: It isolates the k closest historical matches (e.g., the 8 most similar moments in the past). It then looks at what price actually did next in those historical moments (went up or went down). Those neighbors "vote" on the current probability, generating a Bull/Bear Confidence Percentage.
3. Signal Filtering & State Tracking (Anti-Flicker)
The script includes strict logic to prevent chart clutter and false signals:
Convergence: A signal will only fire if the AI probability is above your defined threshold (e.g., 70%), the ADX shows a strong trend, and price is structurally on the correct side of the VWAP.
State Tracker: A built-in memory state (currentTradeState) forces strict alternation. Once an "AI BUY" fires, the system locks into a Long state. It will ignore any duplicate bullish spikes and will only fire again when an "AI SELL" conditions are met.
4. Dashboards & UI
Core Dashboard: A bottom-center panel that gives a rapid visual summary of all traditional metrics (Price, VWAP, MA, HMA, ST, ADX, Volume).
ML Ensemble Panel: A top-right heads-up display showing the AI's exact live confidence percentages, its grading scale (A+, A, B, C), and the current active forecast.
Day Trading Extras: Automatically plots Previous Day High/Low/Close, daily Pivot points, Support/Resistance levels, and the critical First 15-Minute High/Low breakout zones. אינדיקטור

Bull Flag & Handle Detector# Bull Flag & Handle Formation Detector (BFH)
### TradingView Indicator — User Manual v1.3
**Author:** hkpress@CANSLIM Research | **Methodology:** William O'Neil / Mark Minervini
## What Is This Indicator?
The **Bull Flag & Handle Formation Detector** automatically identifies one of the most powerful and reliable continuation patterns in technical analysis — the Bull Flag with Handle. It evaluates each formation in real-time across six quality dimensions and produces a live **Setup Score (0–10)** and **Verdict** on your chart.
This indicator is designed for traders who follow the **IBD CAN SLIM** and **Minervini SEPA** methodologies, where buying a stock in a proper base with declining volume and institutional support is the foundation of high-probability entries.
## How to Install
1. Open TradingView and navigate to any chart
2. Click **Pine Script Editor** at the bottom of the screen
3. Click **New** → paste the full indicator code
4. Click **Save** and give it a name
5. Click **Add to Chart**
Recommended timeframes: **Daily** (primary), **Weekly** (confirmation), **60-min** (intraday swing)
## What the Indicator Detects
The indicator monitors four sequential stages:
**Stage 1 — POLE** — Strong directional price thrust (the flagpole)
**Stage 2 — FLAG** — Orderly consolidation after the pole
**Stage 3 — HANDLE** — Tighter secondary consolidation before breakout
**Stage 4 — BREAKOUT** — Price reclaims pole top on expanding volume
Each stage is validated against configurable quality thresholds before advancing to the next.
## Dashboard Overview
The dashboard panel shows a real-time summary of every quality factor. The state indicator in the top-right corner shows one of four values:
| State | Meaning |
|---|---|
| Scanning... | No active formation detected |
| IN FLAG | Flag consolidation in progress |
| IN HANDLE | Handle forming — breakout approaching |
| BREAKOUT | Price has reclaimed the pole top |
## Quality Factors Explained
**1. Pole**
The flagpole is the initial sharp price thrust. A valid pole requires price to rise at least the configured minimum % (default 12%) within 3–20 bars. A weak or slow pole indicates lack of institutional conviction.
**2. Flag Duration**
The number of bars the consolidation has been forming.
| Duration | Signal |
|---|---|
| Too Short (< Min bars) | Overhead supply not yet absorbed — weak hands still present |
| Healthy (Min–Max bars) | Normal distribution of selling has occurred |
| Stale (> Max bars) | Price has lingered too long — institutional momentum fading |
Default healthy range: 5 to 25 bars (adjustable)
**3. Drawdown**
How far price has pulled back from the pole top.
| Drawdown | Signal |
|---|---|
| Too Shallow (< 8%) | Insufficient shakeout — weak hands not flushed |
| Healthy (8%–22%) | Normal consolidation — supply being absorbed |
| Too Deep (> 22%) | Base too loose — institutional confidence weakening |
| Broken (> 35%) | Pattern invalidated — reset and re-scan |
The ideal flag correction is 1/3 to 1/2 of the pole's advance.
**4. Volume**
Volume behavior during the flag is one of the most critical confirmation signals.
| Volume Level | Signal |
|---|---|
| Strong Exhaustion (< 35% of avg) | Selling pressure nearly gone |
| Exhausting (< 70% of avg) | Normal healthy drying-up |
| Neutral (70%–100%) | Acceptable but not ideal |
| Elevated (> 100% of avg) | Active selling still occurring — not ready |
The Decline Streak counter shows how many consecutive bars volume has been falling. A streak of 3 or more bars adds 1 point to the setup score.
**5. ATR Tightness**
Measures how quiet price action has become relative to its historical baseline. Formula: Current ATR(14) ÷ Historical ATR(50). A ratio below 0.65 means the stock is "coiling" — energy building for the next move. A ratio above 1.0 means wide, erratic swings are still present.
**6. Close Range**
Measures how closely clustered closing prices are over the last N bars (default 5). Formula: (Highest close − Lowest close) ÷ Lowest close × 100. This is the "tightness of closes" measure preferred by Minervini — stocks that close within a tight range are under institutional accumulation.
**7. MA Support and Structure**
Two sub-checks for moving average context.
MA Support shows whether price is testing a key moving average: On 10 EMA (shallow flag), On 20 EMA (most common for healthy flags), On 50 SMA (deeper flag, still valid if other factors strong), Above Key MAs (strong trend), or Below Support (caution).
MA Structure shows whether price is above each major moving average. All four pointing up (10^ 20^ 50^ 200^) is the ideal condition.
## Setup Score (0–10)
| Factor | Points |
|---|---|
| Valid pole detected | 1 |
| Drawdown in healthy range | 1 |
| Flag duration in healthy range | 1 |
| Volume exhausted (below threshold) | 2 |
| Volume declining 3+ consecutive bars | 1 |
| ATR tightness confirmed | 1 |
| Close range tight | 1 |
| Price near 10/20/50 MA | 2 |
| **Total possible** | **10** |
Volume and MA support are double-weighted because they most directly represent institutional behavior.
**Verdict:**
| Score | Verdict | Action |
|---|---|---|
| 8–10 | HIGH QUALITY | Strong setup — watch for breakout entry |
| 5–7 | DEVELOPING | Pattern forming — monitor closely |
| 3–4 | WEAK SETUP | Too many conditions unmet — wait |
| 0–2 | NO SETUP | Not a valid formation |
## Visual Elements on the Chart
**Background Shading**
Yellow tint = price is currently in the Flag stage. Teal tint = price is currently in the Handle stage.
**On-Chart Labels**
| Label | Meaning |
|---|---|
| POLE +18.4% / 7 bars | Pole detected at this bar |
| FLAG START | Flag consolidation has begun |
| FLAG STALE / Momentum Risk | Flag exceeded maximum duration |
| EARLY -- Supply Risk | Flag not yet long enough |
| HANDLE | Handle consolidation has begun |
| BREAKOUT! | Price reclaimed pole top — entry signal |
**Dots Below Bars**
Small teal circles appear below each bar when the indicator is in an active flag or handle AND volume is below the exhaustion threshold — a continuous visual reminder that selling pressure is drying up.
**Breakout Arrow**
A green BO arrow appears below the breakout bar when price reclaims the pole top.
## Settings Reference
**Pole Settings**
| Parameter | Default | Description |
|---|---|---|
| Min Rise % | 12% | Minimum % gain to qualify as a pole |
| Min Duration | 3 bars | Shortest acceptable pole |
| Max Duration | 20 bars | Longest acceptable pole |
**Flag Settings**
| Parameter | Default | Description |
|---|---|---|
| Min Duration | 5 bars | Too short = supply not absorbed |
| Max Duration | 25 bars | Too long = momentum fading |
| Healthy DD Min % | 8% | Minimum pullback for healthy flag |
| Healthy DD Max % | 22% | Maximum pullback before base too deep |
| Invalidate DD % | 35% | Pattern cancelled if price falls this far |
**Handle Settings**
| Parameter | Default | Description |
|---|---|---|
| Min Duration | 3 bars | Minimum handle length |
| Max Duration | 15 bars | Maximum handle length |
| Max Drawdown % | 12% | Handle must be tighter than the flag |
**Volume Settings**
| Parameter | Default | Description |
|---|---|---|
| Avg Period | 20 | Lookback for average volume |
| Exhaustion Threshold | 0.70 | Volume below 70% of avg = exhausted |
**Tightness Settings**
| Parameter | Default | Description |
|---|---|---|
| ATR Period | 14 | Period for ATR calculation |
| ATR Tight Ratio | 0.65 | Current ATR must be below 65% of historical |
| Close Range Bars | 5 | Bars for close range calculation |
| Max Close Range % | 4.5% | Maximum acceptable close spread |
**Display Settings**
| Parameter | Default | Options |
|---|---|---|
| Position | Top Right | 9 positions: Top/Middle/Bottom × Left/Center/Right |
| Text Size | Small | Tiny / Small / Normal / Large |
## Alerts
| Alert Name | Trigger |
|---|---|
| Flag Formation Started | A new flag has begun forming |
| Handle Forming | Handle stage started — prepare for breakout |
| Breakout Signal | Price reclaimed the pole top |
| Flag Too Long (Stale) | Flag exceeded maximum duration |
| Volume Drying Up Strongly | Volume fell below 40% of average |
| Price Testing Key MA | Price within proximity of 10/20/50 MA |
To set an alert: right-click the chart → Add Alert → select BFH indicator → choose condition.
## Entry and Risk Management
**Entry**
Primary entry: buy when price closes above the handle high on above-average volume (ideally 40%+ above the 50-day average). Secondary entry: pivot point breakout above the flag high if no handle forms.
**Stop Loss**
Place initial stop 7–8% below your entry price (Minervini standard). Alternatively, stop just below the handle low or 20 EMA.
**Position Sizing**
Risk no more than 1–2% of total portfolio on any single position. Adjust share count so that a 7–8% loss equals your dollar risk limit.
**Hold Rules**
If the stock surges 20–25% in 3 weeks or less after breakout, apply the 8-Week Hold Rule (O'Neil). Do not sell prematurely during normal consolidations after a confirmed breakout.
## Common Scenarios
**Scenario A — Ideal Setup (Score 8–10)**
Pole of +20% in 8 bars, flag lasting 15 bars with 14% drawdown, volume at 58% of average with a 6-bar decline streak, ATR at 55% of historical, price testing 20 EMA, all MAs pointing up. Action: monitor closely for breakout on expanding volume.
**Scenario B — Too Short Flag**
Flag only 3 bars, volume still at 90% of average. Action: wait. Supply has not been sufficiently distributed. A breakout from here is likely to fail.
**Scenario C — Flag Stale Warning**
Flag at 26 bars, exceeding the maximum. Action: the Stale warning label appears on the chart. Institutional momentum has likely faded — reduce conviction and wait for a fresh base.
**Scenario D — Handle Too Deep**
Handle showing 14% drawdown, exceeding the 12% maximum. Action: raise scrutiny. A handle should not dip below the midpoint of the flag body.
## Frequently Asked Questions
**Why does the indicator sometimes reset mid-formation?**
The state machine resets when any invalidation condition is triggered: drawdown exceeds the kill threshold, duration exceeds the maximum, or the handle drops too far. This prevents tracking of broken patterns.
**The flag score is high but price never breaks out — why?**
A high score indicates a quality consolidation, not a guaranteed breakout. Always confirm with overall market direction, sector strength, and a fundamental catalyst. Never trade against a weak general market (IBD Market Outlook: Uptrend Under Pressure or Market in Correction).
**Should I use this on weekly charts?**
Yes. Weekly charts filter out noise and show the big-picture base. Adjust duration inputs to Min: 3, Max: 10 for weekly timeframes.
**What if there is no handle?**
Not all valid bull flags form a handle. If the flag scores 7+ and volume has dried up strongly, a breakout directly from the flag is still tradeable. The handle adds an extra degree of safety.
**Can I use this for crypto or forex?**
Yes. The logic is price and volume based and works on any liquid instrument. For crypto, consider widening the drawdown thresholds (DD Min: 10%, DD Max: 30%) to account for higher volatility.
## Methodology References
This indicator is built on the published frameworks of William J. O'Neil (How to Make Money in Stocks — CAN SLIM methodology), Mark Minervini (Trade Like a Stock Market Wizard — SEPA methodology), and IBD Investor's Business Daily pattern guidelines.
## Disclaimer
This indicator is an educational and analytical tool only. It does not constitute financial advice or a recommendation to buy or sell any security. All trading involves risk. Past pattern performance does not guarantee future results. Always conduct your own research and consult a qualified financial advisor before making investment decisions.
*Bull Flag & Handle Formation Detector v1.3 — hkpress @ CANSLIM Research* אינדיקטור

אינדיקטור

אינדיקטור

אינדיקטור

אינדיקטור

Shmita Cycles | Astral Vision Shmita Cycles | Astral Vision 🌠💠
This indicator marks the Shmita years on the Bitcoin chart, highlighting the start and end dates of each seven-year biblical cycle and shading the entire period between them.
The Shmita (Hebrew for "release" or "sabbatical year") is a one-year period that occurs every seven years in the Jewish calendar, during which debts are cancelled and land lies fallow.
A number of analysts and researchers have observed that Shmita years have historically coincided with significant financial market stress and Bitcoin cycle lows, making it an unconventional but recurring point of reference in crypto market cycle analysis.
Calculation ⚙️
The indicator contains three hardcoded Shmita periods with their precise start and end dates derived from the Jewish calendar:
First period: September 25, 2014 to September 13, 2015. This window encompasses Bitcoin's bear market trough and the beginning of the 2015 to 2017 recovery cycle.
Second period: September 7, 2021 to September 25, 2022. This window encompasses the peak of the 2021 bull market and the subsequent bear market, including the FTX collapse and the cycle bottom.
Third period: September 23, 2028 to September 11, 2029. This is the projected future Shmita year based on the fixed seven-year cadence of the Jewish calendar.
On each bar, the indicator checks whether the current bar's timestamp falls within any of the three defined periods. If it does, a background color is applied to the chart for that bar, producing a continuous shaded zone across the entire Shmita window.
At the last bar, three glow lines are drawn at each Shmita start and end date. Each glow is composed of three overlapping vertical lines at the same timestamp: a wide line at 80% transparency, a medium line at 55% transparency, and a thin line at 0% transparency, producing a layered luminous effect. The start date uses the positive theme color and the end date uses the negative theme color, visually distinguishing entry into and exit from each Shmita window.
The vertical lines extend from a fixed high value of 10,000,000 to a fixed low of 10.0, covering Bitcoin's entire historical and plausible future price range on a logarithmic scale without distorting the chart the way coordinate-based approaches would.
Plots 📊
Background color shading across each Shmita period
Glow vertical line at each Shmita start date in the positive theme color
Glow vertical line at each Shmita end date in the negative theme color
Inputs 🎛️
No date or period inputs: the three Shmita windows are hardcoded to the Jewish calendar dates
Colors 🎨
5 Astral Vision presets + custom override. Default: Inferno.
Purpose 🎯
The Shmita cycle is not a technical indicator in the conventional sense: it does not use price, volume, or any mathematical transformation of market data. Its value lies in providing a fixed external temporal reference that has shown empirical overlap with Bitcoin market cycle turning points across the two completed Shmita years since Bitcoin's inception, offering a non-price-derived framework for contextualizing where the current market might sit within a longer macro rhythm. Displaying the future 2028-2029 Shmita window allows traders to mark a calendrical reference point for the projected next cycle without any assumptions about price level.
Disclaimer ⭕️
This indicator is for informational and educational purposes only. It does not constitute financial advice. Past performance is not indicative of future results. Always do your own research before making investment decisions. אינדיקטור

אינדיקטור

Bitcoin vs Inverted DXY Regime | Astral Vision Bitcoin vs Inverted DXY Regime | Astral Vision 🌠💠
Inspired by: @JackGreenCrypto
This indicator plots the Z-Score of Bitcoin's log price and the inverted Z-Score of the DXY Dollar Index on the same scale, shifted forward in time by a configurable lag, to visualize the historical inverse relationship between dollar strength and Bitcoin price and to identify divergences between the two series before they resolve in price.
Calculation ⚙️
Both Bitcoin and DXY are first transformed by taking their natural logarithm. Working in log space is essential for two reasons: Bitcoin has moved across several orders of magnitude, so raw price differences between 2015 and 2024 are not comparable; and the inverse relationship between DXY and Bitcoin is proportional rather than linear, meaning a 10% move in DXY has a proportionally similar impact regardless of absolute price level.
The Z-Score is then computed independently for each series using the same formula: subtract the simple moving average of the log series over the lookback window from the current log value, then divide by the standard deviation of the same window. The result for each series is: Z = (log(price) - SMA(log(price), N)) / StDev(log(price), N), where N is the configurable Z-Score lookback. This expresses each series in units of standard deviations above or below its own rolling mean, making the two series directly comparable on the same scale regardless of their absolute price differences.
The DXY Z-Score is then multiplied by -1 to invert it. Since DXY and Bitcoin historically move in opposite directions, the uninverted DXY Z-Score would mirror Bitcoin rather than track it. After inversion, the two series should theoretically overlap or move together during periods of normal inverse correlation. Divergences, where Bitcoin's Z-Score moves in one direction while the inverted DXY Z-Score moves in the other, signal a breakdown in the typical relationship that has historically tended to resolve by one series catching up to the other.
The inverted DXY line is plotted with a configurable forward offset in bars. This operationalizes the observed lag between dollar index movements and their full transmission into Bitcoin price, allowing the DXY signal to be read as a leading indicator rather than a coincident one.
Plots 📊
Bitcoin log Z-Score over the configurable lookback window
Inverted DXY log Z-Score shifted forward by the configurable lag
Inputs 🎛️
Z-Score Lookback: rolling window for mean and standard deviation applied to both series
DXY Lag: bars to shift the inverted DXY signal forward in time
Colors 🎨
5 Astral Vision presets + custom override. Default: Paradiso.
Purpose 🎯
Standard correlation tools between Bitcoin and DXY operate on raw prices or percentage returns, which are distorted by the enormous scale difference between the two assets and by Bitcoin's exponential growth trend. Computing both in log space and normalizing via Z-Score removes these distortions entirely, placing both series on equal statistical footing. The forward shift on the DXY line turns a coincident correlation chart into a directional leading signal: when the inverted DXY is rising ahead of Bitcoin's Z-Score, it suggests dollar weakness is building that has not yet fully priced into Bitcoin, and vice versa.
Disclaimer ⭕️
This indicator is for informational and educational purposes only. It does not constitute financial advice. Past performance is not indicative of future results. Always do your own research before making investment decisions. אינדיקטור

AetherEdge Hybrid Quantum-Inspired Predictor🖊️ Overview
AetherEdge Hybrid Quantum-Inspired Predictor is a next-generation 3-class (UP/DOWN/SIDE) probability prediction engine that fuses three heterogeneous models: a quantum-mechanical wavefunction approach, a K-Nearest Neighbors historical analog search, and a self-learning neural network. Born-rule probabilities derived from complex amplitudes ψ, distance-weighted K-NN voting, and Softmax-based self-optimizing neurons all converge into a single ensemble distribution. With a complete visualization system featuring a radar chart, pie chart, and historical analogs, it decodes the market's "superposition state."
🔶 Key Features
3-Layer Hybrid Architecture: Quantum + KNN + Neural
Quantum Layer: Complex wavefunction ψ, Gaussian amplitudes, decoherence, phase
KNN Layer: K-nearest analog search in 3D feature space
Neural Layer: Online gradient descent + Softmax + Weight decay
3-Class Classification: UP/DOWN/SIDE probability distribution
3 Core Features: Price Structure / Liquidity / Sentiment Proxy
On-Chart Radar Chart: 3-axis visualization
On-Chart Pie Chart: Instant state distribution view
Historical Analogs Display: Top-3 similar past patterns
Quantum Internal State Monitor: Re(ψ), Im(ψ), |ψ|², entropy
State Flip Markers: Auto-detection of directional transitions
Strategy Suggestion Engine: LONG BIAS / SHORT BIAS / RANGE FADE, etc.
🧠 Technical Architecture
This indicator is designed as an ensemble predictor of three heterogeneous models.
Feature Engineering:
Price Structure: EMA20/50/100 + RSI + ATR-deviation composite (tanh normalized)
Liquidity: Close position + wick asymmetry + VWAP deviation + sweep detection
Sentiment Proxy: Vol-Z + price-volume divergence + A/D + volume spike
Quantum Layer:
Wavefunction Construction: ψ_state = Σ A·e^(iθ) per feature
Gaussian Amplitude: A(f, target) = exp(-(f-target)²/(2σ²))
Phase Intensity: θ = f × qPhase × π/2 + offset
Born Rule: P_state = |ψ|² / Σ|ψ|²
Decoherence: P' = (1-γ)·P + γ/3 for quantum→classical transition
Quantum Coherence: 1 - H/log(3) state clarity
KNN Layer:
Euclidean distance search in 3D feature space
Distance-weighted voting w = 1/(1+d)
Aggregates labels (UP/DOWN/SIDE) at past kHorizon-bar future
Records Top-3 analogs (rank, distance, realized return)
Neural Layer:
3-class Softmax classifier (3 inputs → 3 outputs, 12 parameters)
Cross-Entropy Gradient: g = p - target
Update Rule: w_new = w·decay - lr·g·feature
Weight Decay: Prevents overfitting + forgets old patterns
Ensemble Integration:
Weighted average: P = (q·P_q + k·P_k + n·P_n) / Σw
After normalization, max-probability class becomes dominant state
Strategy Engine:
domProb ≥ 0.55 + UP → LONG BIAS
domProb ≥ 0.55 + DOWN → SHORT BIAS
domProb ≥ 0.55 + SIDE → RANGE FADE
confidence < 0.15 → HIGH UNCERTAINTY
⚙️ Recommended Settings & Tuning Guide
Crypto Defaults:
BTC (4H): qWeight=0.35, kWeight=0.35, nWeight=0.30, kK=20
ETH (1H): qWeight=0.30, kWeight=0.40, nWeight=0.30, kHorizon=5
SOL (high-vol): qSigma=1.5, qDecoher=0.15, kThresh=0.5
XRP (short-term): kHorizon=3, kThresh=0.2, nLR=0.02
Quantum Layer:
qWeight=0.20: Conservative (suppress quantum contribution)
qWeight=0.35: Standard
qWeight=0.50: Experimental (quantum-dominant)
qSigma=0.8: Sharp (clear states)
qSigma=1.2: Standard
qSigma=2.0: Smooth (high uncertainty)
qDecoher=0.05: Pure quantum
qDecoher=0.10: Standard
qDecoher=0.30: Strong classical approximation
KNN Layer:
kK=10: Curated matches (sharp)
kK=20: Standard
kK=40: Smooth (conservative)
kLookback=300: Lightweight
kLookback=500: Standard
kLookback=1000: Long-term patterns
kThresh=0.2%: Sensitive (short TF)
kThresh=0.3%: Standard
kThresh=0.5%: Conservative (long TF)
Neural Layer:
nLR=0.005: Cautious learning (stable)
nLR=0.015: Standard
nLR=0.05: Fast adaptation (unstable)
nDecay=0.999: Long-term memory
nDecay=0.997: Standard
nDecay=0.99: Quick forgetting
💡 How to Use in Practice
LONG BIAS + High Q-Coherence: Strongest buy signal, consider entry
SHORT BIAS + High Confidence: Strongest sell signal, build short
RANGE FADE: Range strategies, sell premium, fade both extremes
HIGH UNCERTAINTY: Reduce positions, observe mode
State Flip → UP: Early trend transition, early entry
All Top-3 Analogs Same Direction: Strong historical evidence, raise confidence
3-Model Consensus: Quantum/KNN/Neural all UP → highest confidence
3-Model Divergence: Split opinion, exercise caution
Dir Bias > 0.3: Strong upward bias
Vol Anomaly Detected: Suspend forecasts during normal-time logic
AetherEdge Synergy:
Self-Evolving S/R Grid: LONG BIAS + support reaction = high-win-rate entry
Volatility Regime GAN: SHORT BIAS + EXPAND forecast = powerful drop setup
SMC AI Confidence: 3-model consensus + high-conf zone = conviction entry
Neural Divergence Hunter: State Flip + divergence = reversal confirmation
⚠️ Important Notes
Initial Learning Period: Neural & KNN immature until bar_index > 110
Model Divergence: Split opinions signal weak signal strength
Quantum is Approximation: Mathematical analogy, not actual quantum computing
History Dependent: Cannot handle unprecedented market events
Computation Load: Radar & pie rendering slightly heavy
Repaint: Runs at barstate.islast, displayed only at last bar
Neural Weights: Reset to defaults on chart reload
Confidence < 0.15: Near-uniform distribution, recommend avoiding trades
🚨 Disclaimer
This indicator is an advanced hybrid prediction tool for educational and research purposes only and does not constitute financial advice. "Quantum-inspired" is a mathematical analogy, not actual quantum computing. The 3-model ensemble prediction is a probabilistic method and does not guarantee future price movements. Use with thorough validation and proper risk management. אינדיקטור

AetherEdge Volatility Regime GAN Simulator🖊️ Overview
AetherEdge Volatility Regime GAN Simulator is a next-generation volatility forecasting engine that encodes the current market state as a 6-dimensional feature vector, performs K-NN search against a historical database of up to 500 bars, and generates 100 Monte Carlo paths of likely future trajectories. By integrating Haar wavelet decomposition, Softmax-weighted sampling, and K-means regime clustering, it visualizes the future σ distribution as a complete fan chart and histogram. Inspired by Generative Adversarial Networks, it reconstructs future scenarios from historical market patterns — an innovative simulator for the modern trader.
🔶 Key Features
3-Scale Volatility: Short/Medium/Long σ (annualized)
Haar Wavelet Decomposition: high/mid/low frequency triple-scale
6D Feature Vector: σ-z (×3) + VoV-z + Wavelet-z (×2)
K-NN Analog Search: Top-K nearest historical states
Softmax-Weighted Sampling: Temperature τ controls similarity allocation
Monte Carlo Path Generation: 100 paths build future distribution
K-Means Regime Clustering: CALM/NORMAL/ELEVATED/STRESSED/EXTREME/CRISIS
Fan Chart Visualization: P5-P95, P25-P75, median line
Terminal Distribution Histogram: σ_T probability density
Complete Statistical Dashboard: E , median, CI90, skew, regime distribution
Match Quality Indicator: ⟨d⟩ assesses analog availability
🧠 Technical Architecture
This indicator is designed as a history-based generative model.
Feature Engineering:
Log-return ret = ln(close/close )
3-scale stdev × √(annFactor) for annualized σ
Haar wavelet: |W_s| = √(s/2) × |mean_recent - mean_older|
200-bar z-score normalization (outlier robust)
6D Feature Vector:
z1=σS, z2=σM, z3=σL, z4=VoV, z5=W_hi, z6=W_mid
K-NN Search:
Euclidean distance d = √Σ(z_now - z_hist)²
Top kNeighbors selected
Softmax Sampling:
w_i = exp(-d_i / τ) / Σexp(-d_j / τ)
Low τ → focus on closest, High τ → diversify
Monte Carlo Path Generation:
Per simulation: cumulative probability samples a neighbor
σ-ratio projection pathVol = volS × (histFutVol / nVol)
Innovation noise + noiseAmp × volS × U(-0.5, 0.5)
Quantile Computation:
P5/P25/P50/P75/P95 extracted at each time step
Fan chart + smooth polyline rendering
K-Means Clustering:
2D space (σ-z, VoV-z) classified into 4-6 regimes
Lloyd's algorithm for kmIters iterations
σ-z ascending sort (regime 0 = calmest)
Match Quality Metric:
⟨d⟩ < 1.0: TIGHT (high reliability)
⟨d⟩ < 2.5: LOOSE (moderate)
⟨d⟩ ≥ 2.5: POOR (no analog → warning)
⚙️ Recommended Settings & Tuning Guide
Crypto Defaults:
BTC (Daily): volLen=20, annFactor=365, historyLen=500
ETH (4H): volLen=14, volMed=42, kNeighbors=15
SOL (high-vol): volLen=10, nSims=200, noiseAmp=0.12
XRP (short-term): volLen=14, forecastLen=10, kNeighbors=15
History Depth:
historyLen=200: lightweight, recent only
historyLen=500: standard (recommended)
historyLen=1000+: long-term pattern reference
K-NN Settings:
kNeighbors=10: curated, sharp forecast
kNeighbors=20: standard (balanced)
kNeighbors=50: smooth, conservative
Temperature Parameter:
tempSample=0.3: elite concentration (focus on nearest)
tempSample=1.0: standard (recommended)
tempSample=3.0: diversification (high uncertainty)
Monte Carlo:
nSims=50: lightweight, low-resolution
nSims=100: standard
nSims=200+: high-resolution histogram
Noise Amplitude:
noiseAmp=0.05: conservative (history-faithful)
noiseAmp=0.08: standard
noiseAmp=0.15: exploratory (unknown scenarios)
Regime Count:
nRegimes=3: coarse (simple)
nRegimes=4: standard
nRegimes=6: granular (CALM→CRISIS)
💡 How to Use in Practice
EXPAND forecast + STRESSED: Buy options / strengthen hedges
CONTRACT forecast + CALM: Range strategies / sell premium
Narrow CI90 + TIGHT match: High-confidence forecast, execute strategy
Wide CI90 + POOR match: Unknown territory, exercise caution
P95 > 2× volS: Tail-risk alert, reduce position
Regime Transition Detection:
CALM → ELEVATED: Caution mode
STRESSED → EXTREME: Crisis approaching
EXTREME → STRESSED: Storm passing
Skew Interpretation:
right-tail: Upside risk dominant (vol spike possible)
symmetric: Standard scenario
left-tail: Downside risk dominant (vol crash possible)
AetherEdge Synergy:
SMC AI Confidence Engine: CONTRACT forecast + high-conf zone = compression breakout setup
Self-Evolving S/R Grid: EXPAND forecast + line cluster = breakout preparation
Neural Divergence Hunter: STRESSED + divergence = elevated reversal probability
All-in-One Dashboard: Regime + direction = comprehensive judgment
⚠️ Important Notes
History Dependency: Waits for bar_index > 210 to accumulate history (no early rendering)
POOR Match Warning: ⟨d⟩ > 3.0 indicates low forecast reliability
History-Based Prediction: Cannot handle unprecedented market events
Fan Chart Width: Wide CI90 indicates high uncertainty
Repaint Behavior: Runs only on barstate.islast, displayed at last bar
Computation Load: Large nSims × forecastLen may slow rendering
Cluster Initialization Sensitivity: K-means convergence depends on initial values (increase kmIters for stability)
🚨 Disclaimer
This indicator is an advanced volatility-simulation tool for educational and research purposes only and does not constitute financial advice. GAN-style Monte Carlo prediction is a stochastic simulation method and does not guarantee future volatility. Historical patterns may not repeat — particularly during unprecedented events, the forecast may fail. Use with thorough validation and proper risk management.
אינדיקטור

AetherEdge Multi-Feature Neural Divergence Hunter🖊️ Overview
AetherEdge Multi-Feature Neural Divergence Hunter is a revolutionary divergence engine that simultaneously detects divergences across 6 independent oscillators and self-evolves neural weights based on each feature's empirical accuracy. Every feature (RSI/MACD/Stoch/CCI/MFI/MOM) detects both Regular and Hidden divergences in parallel, and Softmax-normalized dynamic weights evaluate confluence. With its 3D visual encoding (color × size × shape), the type and strength of every signal is identifiable at a glance — a next-generation divergence hunter.
🔶 Key Features
6 Parallel Oscillator Detection: RSI / MACD Hist / Stochastic / CCI / MFI / Momentum
Up to 12 Divergence Variants (2 types × 6 features) tracked simultaneously
Softmax Neural Weight Learning: Auto-redistribution based on empirical accuracy
Reward-Based Weight Updates: Bonus for correct, penalty for wrong
Confluence Counting: Separate Regular/Hidden tracking, combined for trigger
3D Visual Encoding:
Color: REG Bull/Bear, HID Bull/Bear, MIXED — 5-class system
Size: tiny→huge based on confluence count (5 levels)
Shape: Regular=triangle, Hidden=arrow, Mixed=label
Composite Neural Oscillator: Weighted average centered display
Confluence Glow: Background opacity reflects strength
Per-Feature Accuracy Tracking: Individual hit-rate records
Dynamic Divergence Lines: Width and style identify type
🧠 Technical Architecture
This indicator is a neural-weight-learning system processing 6 oscillators in parallel.
Feature Normalization:
RSI/Stoch/MFI: Native 0-100
MACD Hist/CCI/Momentum: Normalized to 0-100 over 100-bar range
Pivot Storage Method (Pine v5 compatible):
Eliminates dynamic history access by storing previous-pivot oscillator values
12 slots managed: prevPL_rsi, prevPL_macd, ...
Divergence Detection (per feature):
Regular Bull: Price LL + Oscillator HL
Hidden Bull: Price HL + Oscillator LL
Regular Bear: Price HH + Oscillator LH
Hidden Bear: Price LH + Oscillator HH
Distance filter: minBarsBet ≤ pivot gap ≤ maxBarsBet
Neural Weight Learning:
Evaluates return after rewardLook bars per signal
Correct (ret > 0): w += learnRate × |ret| × 100
Wrong (ret < 0): w -= learnRate × |ret| × 50 (asymmetric penalty)
Weight constraint:
Softmax Normalization (temperature τ):
w_i = exp((rawW_i - max) / τ) / Σexp(...)
Low τ → concentrate on best; High τ → uniform
Composite Neural Oscillator:
nnOsc = Σ(value_i × w_i) / Σw_i - 50
3-bar EMA smoothing, 5-zone state detection
3D Visual Encoding:
Color = type, Size = strength, Shape = category — 3-dimensional information transmission
⚙️ Recommended Settings & Tuning Guide
Crypto Defaults:
BTC (4H): pivotLen=5, minConfluence=2, learnRate=0.08 (standard)
ETH (1H): pivotLen=4, minConfluence=2, rewardLook=8
SOL (high-vol): pivotLen=6, minConfluence=3, rewardLook=12
XRP (short-term): pivotLen=3, minConfluence=2, rewardLook=5
Pivot Sensitivity:
pivotLen=3: high-sensitivity, noisy
pivotLen=5: standard
pivotLen=8–10: HTF, certainty-focused
Confluence Threshold:
minConfluence=1: many signals, false positives
minConfluence=2: standard (recommended)
minConfluence=3: curated, fewer
minConfluence=4+: ultra-curated, rare
Learning Parameters:
learnRate=0.05: conservative, stable
learnRate=0.08: standard
learnRate=0.15: fast, unstable risk
softmaxTemp=0.5: elite concentration (focus on best 1-2)
softmaxTemp=1.5: standard (balanced)
softmaxTemp=3.0: uniform (diversity)
Feature Selection Strategy:
Oscillator-focus: RSI + Stoch + MFI (momentum group)
Trend-focus: MACD + CCI + Momentum
Full parallel: All 6 ON (recommended, NN auto-curates)
💡 How to Use in Practice
5+ Confluence + REG MIXED: Strongest reversal signal (huge size emphasis)
3 REG Bull + NN 80%: High-probability reversal-buy candidate
3 HID Bull: Trend-continuation pullback buy
MIXED (REG+HID): Transition zone / unstable market
Neural Oscillator Usage:
EXTREME OB (>35): Overheated, watch for reversal
EXTREME OS (<-35): Bottom zone, watch for bounce
OS zero-cross + divergence: Direction confirmation
Learning Maturity Check:
Per-feature Acc% > 60%: feature is reliable
Acc% < 45%: feature is failing, ignore
Many Pending: still learning, wait
AetherEdge Synergy:
SMC AI Confidence Engine: A+ zone + 5× confluence = ultimate alignment
NeuraNet Predictor: Direction match + REG MIXED = double confirmation
RL Signal Optimizer: CONFIDENT + divergence = strong entry
All-in-One Dashboard: HIGH-CONVICTION + huge label = supreme reversal signal
⚠️ Important Notes
Pivot Lag: Divergence confirms pivotLen bars later (no real-time detection)
Weight Reset: Chart reload resets weight learning
Learning Maturity: Per-feature Acc% reliable only after Signals ≥ 20
Overfitting Risk: High learnRate + long runtime may over-skew weights
Hidden Divergence Nature: Continuation signal — avoid counter-trend misuse
MIXED Interpretation: Simultaneous REG+HID = transitional confusion, be cautious
Feature Disabling: Turning off unused features improves weight allocation
🚨 Disclaimer
This indicator is an advanced divergence-analysis tool for educational and research purposes only and does not constitute financial advice. Neural weight learning is a stochastic optimization method and does not guarantee future profits. Divergences suggest reversal or continuation possibilities but do not guarantee outcomes. Use with thorough validation and proper risk management.
אינדיקטור

GLI Trend Analysis | Astral Vision GLI Trend Analysis | Astral Vision 🌠💠
This indicator plots the Global Liquidity Index and its exponential moving average, using the EMA crossover as a directional trend signal for the global monetary environment. The GLI is constructed from the same comprehensive 21-source aggregation used across the Astral Vision liquidity suite: 17 major central bank balance sheets converted to USD via live FX rates, minus the Fed's non-stimulative liabilities (Reverse Repo Facility and Treasury General Account), plus M2 money supply for the US, EU, China, and Japan.
Calculation ⚙️
The GLI is computed as:
Fed balance sheet, minus RRP (Reverse Repo: overnight cash parked at the Fed by money market funds, which drains liquidity from the financial system), minus TGA (Treasury General Account: the US government's cash balance at the Fed, which also drains liquidity when it grows), plus the balance sheets of the Bank of Japan, People's Bank of China, Bank of England, ECB, Reserve Bank of India, Bank of Canada, Reserve Bank of Australia, Swiss National Bank, Central Bank of Russia, Central Bank of Brazil, Bank of Korea, Reserve Bank of New Zealand, Sveriges Riksbank, and Bank Negara Malaysia, each converted to USD by multiplying by the corresponding live FX rate, plus M2 money supply for the US, EU (converted via EURUSD), China (converted via CNYUSD), and Japan (converted via JPYUSD).
The subtraction of RRP and TGA from the Fed balance sheet is a critical correction absent from simpler GLI implementations. The Fed's balance sheet includes liabilities that do not actually inject money into the financial system: when RRP balances are high, money market funds are lending cash back to the Fed overnight, effectively withdrawing it from circulation. Similarly, a growing TGA means the government is holding more cash at the Fed rather than spending it into the economy. Subtracting both produces a more accurate measure of net liquidity actually available to financial markets.
An EMA of configurable length is applied to the resulting GLI series. When GLI is above its EMA, global liquidity is in an uptrend relative to its own smoothed baseline, historically associated with expanding risk appetite and upward pressure on Bitcoin and other risk assets. When GLI is below its EMA, the trend is contractionary.
Both the GLI line and the background color on the price chart are shifted forward in time by a configurable offset in bars, operationalizing the empirically documented lead-lag relationship between global liquidity inflections and Bitcoin price response.
Plots 📊
GLI line colored by its position relative to the EMA, shifted forward by the configurable offset
EMA line as a neutral reference
Background color on the price chart reflecting GLI trend direction, shifted forward by the same offset
Inputs 🎛️
EMA Length: smoothing period for the GLI trend baseline
Lead Offset: bars to shift both the GLI signal and the background color forward in time
Colors 🎨
5 Astral Vision presets + custom override. Default: Infinito.
Purpose 🎯
A standard EMA crossover applied to Bitcoin price measures Bitcoin's own momentum without any external reference. This indicator applies the same crossover logic to global central bank liquidity, producing a regime signal that is causally upstream of Bitcoin price rather than derived from it. The forward shift separates this tool from coincident liquidity indicators by explicitly positioning the signal as a leading reference, reflecting the time lag between liquidity creation and its transmission into asset prices. The RRP and TGA correction further distinguishes it from simpler GLI charts available elsewhere, which overstate liquidity by including Fed liabilities that do not reach financial markets.
Disclaimer ⭕️
This indicator is for informational and educational purposes only. It does not constitute financial advice. Past performance is not indicative of future results. Always do your own research before making investment decisions. אינדיקטור
