Precedent [ThrowMaster]===============================================================
WHAT IT IS
===============================================================
Precedent does not predict. It measures.
Every time a defined market event confirms on your chart, Precedent
records what price actually did over the following N bars. Once enough
comparable records have accumulated, it displays the empirical
distribution of those recorded outcomes: how far price travelled, how
often it reached a given distance, and how many bars that took.
The question it answers is narrow and deliberately so:
"On this symbol, on this timeframe, when this kind of event happened
at this kind of price level in this kind of market condition, what
followed afterwards, and across how many cases?"
Every number shown is measured from the visible history of the chart you
are looking at. Nothing is imported from another market, no outcome
percentages are hard-coded, and no distribution shape is assumed. If the
chart has not yet produced enough comparable cases, the indicator stays
silent and tells you how many it has.
This is a context tool. It produces no buy or sell signals, no entry
prices, and no stop levels, and it is not designed to be used as one.
Please read the section titled THE MOST IMPORTANT WARNING before using
it on a live chart.
===============================================================
HOW IT WORKS
===============================================================
1. LEVEL MAP
A running inventory of prices that carry structural meaning is
maintained bar by bar:
- Swing pivots confirmed with a symmetrical left/right lookback
(default 21 bars each side for external structure, 5 for internal).
- Equal highs and equal lows: when a new pivot lands within the merge
tolerance of an existing level, that level's touch count increases
rather than a second level being created.
- Unfilled fair value gaps: a three-bar imbalance where the current
bar's low is above the high from two bars ago (or the mirror for
the bearish case). Each additional gap overlapping the same price
adds to that level's weight, so three gaps stacked at one price
are recorded as one level carrying three factors.
- Order blocks: the extreme of the last opposite-coloured candle
immediately before a displacement bar, where displacement means a
body in the top 15 percent of the last 100 bodies AND the move
takes out the most recent internal pivot. Displacement alone is not
enough; it must be tied to a structural break.
- Previous day and previous week high and low, requested with a
one-bar offset so no unclosed higher-timeframe data is used.
Each level accumulates a WEIGHT equal to the number of independent
factors coinciding there, plus a bonus for repeated touches and for age
beyond 200 bars. Two factors closer together than the merge tolerance
(default 0.25 x ATR) are treated as one level with two factors, never as
two levels. This prevents an order block that naturally sits inside a
fair value gap from being counted twice.
A level whose weight reaches the MAJOR threshold (default 4) is
classified MAJOR; weight 1 to 3 is MINOR; anything else is NONE.
Note on interpretation: a heavily touched level is treated as more
SIGNIFICANT, not as stronger. Repeatedly tested highs and lows are
exactly the prices that attract sweeps. The indicator does not assume
which way that resolves; it measures what actually followed.
2. EVENT CLASSES
Six event types are detected. Every one of them locks its state at bar
close.
SWP Sweep Price trades beyond a mapped level and closes back
inside it, with a wick in the top quartile of the
last 100 wicks on that side.
SHF Shift A close beyond the most recent confirmed external
swing, in either direction (break of structure or
change of character).
SQZ Squeeze Bollinger Bands (20, 2.0) contract entirely inside
Keltner Channels (20, 1.5 x ATR) for at least five
consecutive bars, then expand back out.
CLX Climax Volume in the top 5 percent of the last 200 bars
combined with a bar range in the top 10 percent.
Where volume is unavailable, range plus body size is
used instead and the dashboard states which.
REJ Reject A bullish or bearish engulfing bar, or a pin bar with
a wick in the top quartile of the last 100, but only
when it occurs at a mapped level. A rejection candle
floating in empty space is not recorded at all.
DIV Divergence Price makes a lower low while cumulative flow makes a
higher low, or the mirror case, measured at confirmed
pivots. Flow is signed by body position within the
bar range and scaled by volume where volume exists.
Divergence is measured against volume-weighted flow, not against an
oscillator. An oscillator derived from price and then compared back to
price adds no independent information; volume is a separate data source.
Two events of the same class are never recorded closer together than the
full horizon. This is a deliberate statistical constraint: it costs
sample size, and it buys the guarantee that no two stored outcomes share
an overlapping future.
3. CONTEXT SCORE
Three voices contribute to an additive score from 0 to 100. Nothing
gates. No voice can block a signal; each only adds weight.
STRUCTURE 35 Whether the recent sequence of confirmed swing highs
and lows agrees with the event's direction.
FLOW 30 The percentile rank of the bar's signed flow over the
last 200 bars, cut to one fifth when its sign
disagrees with the event direction.
HTF 35 Whether the higher timeframe close sits above or below
its own 50-period EMA, in agreement with the event.
The score is then discounted by regime and renormalised back to a 0-100
scale, so scores remain comparable across regimes:
RANGE structure x 0.70 (structure breaks constantly and means
little inside a range)
TRANSITION higher tf x 0.80 (higher timeframe bias is least
reliable while it is turning)
TREND flow x 0.85 (large volume is ordinary in a trend
and therefore less informative)
One correction is applied automatically: Climax and Divergence are
themselves defined from flow, so for those two classes the flow weight
is halved and the freed weight is split evenly between structure and
higher timeframe. Without this, the flow voice would confirm an event
that flow itself created.
The score is converted into a two-level tier by comparing it to the 60th
percentile of past scores for the same event class on this chart. There
is no fixed cut-off number.
4. SIGNATURE AND BACKOFF
Each recorded event is filed under a discrete key:
event class x location class x regime x direction x score tier
Direction is never merged at any level, because upward and downward
outcomes are not symmetrical.
When a new event confirms, the engine looks for stored outcomes sharing
that key. If fewer than the minimum sample (default 20) exist, it drops
the finest component and looks again:
L3 event + location + regime + direction + tier
L2 event + location + regime + direction
L1 event + regime + direction
L0 event + direction
The first level with a sufficient sample is used, and the dashboard
always states which level was used and how many records it contained.
If even L0 is short, nothing is drawn and the dashboard shows
CALIBRATING with the current count.
Seeing L1 or L0 rather than L3 is normal, not a fault. Non-overlapping
sampling produces a limited number of independent cases per chart, and
the backoff exists precisely to handle that honestly rather than
displaying a percentage built on four observations.
5. OUTCOME STORE
For each recorded event the engine tracks, for the following H bars
(default 24):
- excursion at H/4, H/2, 3H/4 and H, expressed in R where R is the
ATR(14) value at the event bar
- maximum favourable and maximum adverse excursion
- the bar number at which the move first reached +1R, +2R and +3R,
or zero if it never did
The record is written to the store only after H bars have fully elapsed.
A projection displayed today is therefore built exclusively from events
that had already finished before it was issued. This is a structural
property of the design, not a discipline that has to be maintained.
6. WHAT IS DRAWN
- An empirical quantile fan. The outer envelope traces the 5th and
95th percentiles of the matched outcomes at each of the four
checkpoints; the inner envelope traces the 25th and 75th; the
dashed centre line traces the 50th. The shape is asymmetric and
heavy-tailed whenever the underlying data is, because the values
are measured percentiles rather than a fitted curve.
- A target line. The median maximum favourable excursion of the
matched set is converted to a price, then snapped to a mapped
structural level if one lies within half an ATR. Statistics choose
the zone; structure chooses the exact price. The label states
"level" when a snap occurred and "stat" when it did not.
- Hit rate and expected bars. Both are read at the nearest whole R
ring (+1R, +2R or +3R) to the target distance, and the ring is
named on the label. Hit rate is the share of matched records that
reached that ring within H bars. The bar count is the median
first-passage time among those records that reached it.
7. RUN TRACKER
A run begins at a confirmed structure shift and ends at the next
confirmed shift in the opposite direction. Within a run, occurrences of
each event class and direction are counted. When the run closes, one
record per class is stored: how many had occurred before the reversal.
The observation unit is therefore the run, not the event. This matters:
counting events directly would produce heavily overlapping samples,
since several events inside one run share the same future. Counting runs
does not.
The panel answers a question most tools ignore entirely: given that a
third bearish divergence has now printed in this uptrend, in what
fraction of past runs on this chart did the reversal arrive by the
third, and in what fraction did the run extend to a fourth or beyond.
8. SELF-AUDIT
Every displayed projection resolves into exactly one of four states, and
these are never merged:
HIT the target was reached first
ADV the -1R reference was reached first
AMB both were touched inside the same bar, so the order is
unknowable from bar data and the case is discarded rather
than claimed
EXP H bars elapsed with neither touched
The dashboard reports the running counts, and separately compares the
average hit rate the tool projected against the hit rate it actually
realised. If those two numbers diverge, the tool is telling you its own
estimates are miscalibrated on this chart.
Two further panels report whether the classification axes carry any
information at all: median outcome for tier A versus tier B, and median
outcome for MAJOR versus MINOR versus NONE locations. If a pair does not
separate, that axis is not contributing, and you are meant to see that.
===============================================================
WHAT MAKES IT ORIGINAL
===============================================================
- Outcome statistics are conditioned on a discrete event signature
and computed from the chart's own history, rather than assumed from
a parametric distribution or imported as fixed percentages.
- Projection targets are snapped onto mapped structural levels, so
the displayed price is a real level rather than a quantile value
floating in empty space.
- The hierarchical backoff makes sparse conditioning explicit: the
display always names the level of specificity that was achievable
and the sample size behind it.
- Sequence statistics use the completed run as the observation unit,
which removes the sample overlap that direct event counting creates.
- The indicator scores its own past projections against outcomes and
displays projected versus realised hit rate on the chart.
===============================================================
HOW TO READ THE CHART
===============================================================
HORIZONTAL LINES
The image below shows the level map alone, with the projection layer
switched off, so the two grades of level can be compared directly: gold
solid lines mark MAJOR levels, thin dotted lines mark MINOR ones.
Two families of horizontal line exist, and they are drawn so that they
can never be confused with each other.
THE LEVEL MAP owns thin dotted lines and gold:
Gold, solid, width 2 A MAJOR level: four or more independent
structural factors coincide at this price.
Washed white, DOTTED, A MINOR level: one to three factors.
width 1
THE TARGET FAMILY owns solid width-2 lines in mint, coral and slate.
No target line is ever drawn dotted or at width 1.
Mint, solid, width 2, The target of the live projection.
full opacity Extends to the right. Only one is live at
a time.
Coral, dotted, width 1 The -1R adverse reference of the live
projection. Removed the moment the
projection resolves. This is a measurement
boundary used to classify the outcome. It
is NOT a stop loss and must not be used as
one.
Once a projection resolves, its target line keeps its full width and
stays solid. Only its colour and opacity change:
Mint, faded HIT: price reached it within the horizon.
Coral, faded ADV: price reached the -1R reference
first.
Slate blue-grey, faded EXP or AMB: the horizon elapsed with
neither touched, or both were touched in
the same bar and the case was discarded.
Resolved lines are retained deliberately. A price that the statistics
selected, and that was then snapped onto a structural level, often
remains structurally relevant afterwards, and it is useful to see where
those prices were. The number retained is configurable and defaults to
six.
Read the fade as expiry of a claim, not as expiry of the price. The
faded line is a record that this price was once selected as a target and
of what happened next. It is not a live target and carries no ongoing
claim about the future.
The image below shows several resolved projections on one chart, so the
three outcome colours can be compared side by side: a faded mint line
where price reached the target, a faded coral line where it reached the
adverse reference first, and a faded slate line where the horizon
elapsed without either being touched. The markers carry the matching
three-letter outcome. Projections that did not work out are shown here
deliberately; the indicator records its own failures and so should its
description.
Level lines are redrawn on each new bar and only levels within six ATR
of current price are displayed, up to fourteen at a time.
THE FAN
Outer shaded band 5th to 95th percentile of matched
historical outcomes.
Inner shaded band 25th to 75th percentile.
Dashed centre line 50th percentile, the median path.
Teal the event pointed upward.
Coral the event pointed downward.
The fan is frozen at the moment the projection is issued and is never
recalculated. It reaches forward exactly H bars.
The next image shows a single live projection close up: the two shaded
bands, the dashed median path, the mint target line, and the label
carrying hit rate, sample size and remaining bars. Note that the bands
are not symmetrical around the median, because they are measured
percentiles rather than a fitted curve.
EVENT MARKERS
A small label prints at each recorded event, below the bar for upward
events and above for downward ones. It contains a three-letter code and
a number:
SWP sweep SHF shift SQZ squeeze
CLX climax REJ rejection DIV divergence
The number is the count of that event class and direction so far inside
the current run. "DIV 3" means this is the third divergence of that
direction since the last structure shift.
When a projection resolves, its marker gains a suffix and changes
colour:
HIT green target reached first
ADV red the -1R reference reached first
AMB amber both touched in the same bar; discarded
EXP amber the horizon elapsed with neither touched
THE TARGET LABEL
Three lines at the right end of the projection:
line 1 the target price, followed by "level" if it was snapped onto
a mapped structural level or "stat" if no level was near
line 2 hit rate and sample size, for example: hit 61% n=38
line 3 while the projection is live: bars remaining and the R ring
the hit rate refers to. Once it resolves, this line is
replaced by "RESOLVED" followed by HIT, ADV, AMB or EXP, and
the whole label takes the matching colour.
The bar count was frozen when the projection was issued and only counts
down. Nothing behind it is recalculated.
THE DASHBOARD
EVENT class, direction, and sequence number in this run
LOCATION MAJOR / MINOR / NONE and the level weight
REGIME RANGE / TRANS / TREND, the context score, tier
SIGNATURE backoff level used and sample size
WITH q50 q75 q95 terminal excursion quantiles measured ALONG the
event's own direction, in R
AGAINST q25 q05 the same distribution's tail measured AGAINST the
event's direction, in R
TARGET price and hit rate
ETA bars remaining and the R ring, or "no open
projection"
RUN EXT how far the current run has extended, in R
FLOW SOURCE "volume" or "proxy"
SEQ 1 / 2 / 3 / 4+ share of past completed runs that reversed after
that many events of this class
RUNS median median count before reversal, and number of runs
TIER A / B median outcome in R for each tier, with counts
LOC MAJ/MIN/NONE median outcome in R for each location class
LEDGER running totals of hit, adv, amb and exp
CALIBRATION average projected hit rate against realised
The dashboard is reproduced below at readable size, since every claim
made in the HOW IT WORKS section is meant to be verifiable there: the
backoff level actually used, the sample size behind it, the quantiles,
the sequence distribution, the two axis-health rows, and the running
comparison of projected against realised hit rate.
WITH and AGAINST are measured relative to the event's own direction, not
relative to the chart. For a downward event, a WITH value of +1.4R means
price fell by 1.4 ATR, and an AGAINST value of -1.8R means price rose by
1.8 ATR before the horizon closed. AGAINST is the row that tells you how
violent the route can be, and it is the row most worth reading before
deciding on any position size.
===============================================================
THE MOST IMPORTANT WARNING
===============================================================
DO NOT TREAT THE GREEN LINE AS A TARGET TO TRADE TOWARD, AND DO NOT
TREAT ANY MARKER AS AN ENTRY SIGNAL.
You will observe the following, and it is the single most dangerous
thing about this indicator:
The projection expires. The bars run out. The label reads "closed". And
then, twenty or fifty bars later, price finally reaches the green line.
It is tempting to read that as the tool having been right after all. It
was not, and here is why that reading destroys accounts:
1. The green line is snapped to a structural level. Structural levels
get revisited eventually, because that is what they are. Price
arriving there after the horizon has expired is not evidence of
anything. It is what levels do.
2. The expected bar count is a median of the cases that reached the
ring. By definition, roughly half of the successful cases took
longer than that. "The estimate elapsed and it is not there yet"
is an ordinary outcome, not a malfunction.
3. Route is not measured. The indicator records where price ended up
and how far it travelled. It does not promise that the path there
was survivable. Price can travel far against you first, and still
arrive. The AGAINST row is the only place the route appears at all,
and even there it is a summary, not a guarantee.
A faded line is a closed case. It has no ETA, no live claim and no
implication that price is still heading there. If price later reaches a
faded line, that is not a delayed hit. It is a structural level being
revisited, which is what structural levels do.
That third point is what actually costs money. A leveraged position
opened on the strength of a hit rate can be liquidated by an adverse
excursion long before the target is reached. The account is closed; the
target being reached afterwards is irrelevant to it. This is not a
remote scenario. It is the ordinary case whenever leverage is applied to
a statistic that describes destinations rather than routes.
The -1R red line does not protect you either. It is a measurement
boundary chosen so outcomes can be classified consistently. It is not a
risk parameter and was never sized to be one.
Precedent is a context tool. It tells you what has typically followed
this kind of moment on this chart, with the sample size attached. Entry
timing, position size, stop placement, leverage and the decision to
trade at all remain entirely yours and must come from a method this
indicator does not contain and does not attempt to contain.
If the only thing you take from a projection is "hit 61 percent, so buy"
you have misread it. The intended reading is closer to: "in 38
comparable cases on this chart, price reached this level within 24 bars
in 61 percent of them, taking a median of 9 bars, and the adverse tail
of that distribution ran to -1.8R."
===============================================================
LIMITATIONS AND REPAINT POLICY
===============================================================
REPAINT BEHAVIOUR, ELEMENT BY ELEMENT
- Event detection, tier assignment and score sampling are locked at
bar close. They do not change afterwards.
- Swing pivots confirm with a delay equal to the pivot length in bars
(default 21). A level cannot appear before its pivot is confirmed.
That delay is the cost of not looking ahead, and it is not avoided
anywhere in this script.
- Higher timeframe values are requested with a one-bar offset, so
only completed higher timeframe bars are used. On the chart
timeframe this means the higher timeframe bias lags by one higher
timeframe bar.
- The fan, the target line and the adverse line are computed once, at
the confirmed bar that issued them, and are never recalculated.
- The dashboard and the countdown update live within the forming bar
by design. The countdown only subtracts from a number that was
frozen at issue; no statistic behind it is recomputed.
KNOWN LIMITATIONS
- The statistics are descriptive, not predictive. They summarise what
has already happened on the chart in front of you. They are not a
forecast and are not out-of-sample.
- Sample sizes are small by construction. Requiring non-overlapping
outcomes limits the number of independent cases available, which is
why the backoff and the visible sample counts exist.
- Until enough completed outcomes exist, nothing is drawn at all. The
image below shows that state: the dashboard reports CALIBRATING and
the current count against the required minimum, and no fan, target
or hit rate appears anywhere on the chart.
- Chart history is finite. On low timeframes the available bars may
cover only a matter of weeks, and possibly only one market regime.
Treat a large sample drawn from a single regime with caution.
- Outcomes are measured at bar resolution. When a bar touches both
the target and the adverse reference, the order is unknowable and
the case is marked ambiguous and discarded rather than assumed.
- Statistics apply only to events this indicator itself defined. If
you identify a setup it did not mark, no displayed percentage
describes it. Borrowing a number from a different occasion is a
misuse.
- Where a symbol provides no usable volume, flow falls back to a
body-position proxy on the same percentile scale. The dashboard
states which is in use. Mixing the two would corrupt the store, so
the fallback applies to the whole session or not at all.
- Changing the higher timeframe from Auto to Manual changes what the
signature key means. The stored outcomes are therefore cleared and
rebuilt from zero when you do it. This is intentional.
- Nothing here is tuned. There is no optimiser and no fitted weight.
Thresholds are percentiles over disclosed rolling windows. If a
parameter is changed, the level map and the statistics change with
it, and the sample must accumulate again.
===============================================================
DISCLAIMER
===============================================================
This script is published for educational and analytical purposes. It is
not financial advice, not a recommendation to buy or sell any
instrument, and not a trading system. It produces no entry signals, no
stop levels and no position sizing.
Historical measurement does not indicate future results. Markets change
regime, and a distribution measured on past bars may not describe the
next ones. Trading carries risk of loss, and leveraged trading carries
risk of total loss. Any decision taken while this indicator is on the
chart remains entirely the responsibility of the person taking it.
Индикатор

Compression Expansion Map [Pineify]Compression Expansion Map
Overview
Compression Expansion Map is a Pine Script v6 volatility lifecycle oscillator. It converts Bollinger and Keltner widths into comparable compression depths, records joint dwell, and confirms release with rising ATR.
Problem Definition
A squeeze flag only asks whether one envelope is inside another. It hides how unusual current narrowness is versus history, whether two volatility measures agree, and whether contraction has persisted. It can call any exit an expansion when width merely normalizes. Fixed thresholds transfer poorly across markets and timeframes because scales and distributions differ.
Design Rationale
Bollinger width uses standard deviation; Keltner width uses ATR. Each is basis-normalized and ranked against its own history. An agreement discount prevents one narrow envelope from creating maximum energy while the other remains broad; dwell separates a brief dip from a mature regime.
“Not compressed” is insufficient. Release must follow minimum dwell, reduce compression at minimum velocity, and show positive ATR slope. This adds lag but filters normalization. Ranks resist outliers, while sacrificing absolute magnitude.
Key Features
Self-normalized Bollinger and Keltner bandwidth percentiles.
Agreement-weighted compression energy with dwell maturity.
Release velocity, ATR slope, and ATR percentile combined into expansion force.
Centered field, DNA, halo, phases, dashboard, and confirmed alerts.
How It Works
Bollinger width is band distance divided by absolute basis; Keltner width is normalized identically. ta.percentrank maps each to 0–100; inversion gives high depth to historically narrow envelopes.
Average depth receives a 0.60-to-1.00 agreement factor based on depth distance. Above threshold, a bar counter starts. Progress toward Minimum Compression Bars raises energy from 75% to 100%, so Primed requires depth and residence.
Release velocity is the one-bar decline in compression; ATR slope compares current ATR with its earlier value. The first confirmed bar outside mature compression must pass both thresholds. Expansion force blends capped velocity, positive slope, and ATR percentile. It persists only while ATR rises and never beyond Maximum Expansion Hold. No future or external data is requested.
How Multiple Indicators Work Together
This is one sequence, not an unrelated blend. Bollinger observes dispersion; Keltner observes true range. Ranks create comparability, agreement prevents domination, and dwell stores persistence. Release velocity measures discharge; ATR slope tests acceleration. DNA lines expose inputs while the hero field and dashboard explain state.
Trading Ideas and Insights
A rising positive field means volatility is unusually compressed versus history. Primed is persistent compression, not direction. The expansion diamond confirms qualified release but cannot predict its direction. Repeated starts without maturity can mark unstable ranges; long dwell followed by weak release can mean normalization. These are contexts, not entry or performance claims.
Unique Aspects
The components are standard; the lifecycle is the contribution. Two normalized depths must agree, compression accumulates residence memory, and expansion requires release from maturity plus range acceleration. The charge/release layout makes order visible. Implementation is independent; no retrieved source was used, reconstructed, translated, or altered.
How to Use
Allow the percentile lookback to warm up.
Read the positive field as compression energy and compare DNA lines for agreement.
Treat Primed as volatility context, not direction.
Use the negative field and confirmed diamond for a qualified release.
Confirm direction, liquidity, execution, and risk independently.
Disable secondary layers for a cleaner view.
Customization
Envelope Length sets the window; multipliers alter raw widths; rank lookback controls context and adaptation.
Compression Threshold controls narrowness, while Minimum Compression Bars adds maturity and lag. Release Velocity controls discharge. ATR Slope settings define acceleration: lower values react faster but admit weaker releases. Maximum Expansion Hold caps persistence. Reevaluate settings across markets and timeframes.
Assumptions and Limitations
History must be representative. Percentiles are relative, both envelopes share price data, and ATR is directionless. Expansion cannot determine breakout direction or continuation.
Live-bar values and phases may change before close; markers and alerts require barstate.isconfirmed . There is no lookahead, negative offset, external symbol, or higher-timeframe request, but the model is lagging and parameter-sensitive. Gaps, illiquidity, regime breaks, and short history reduce usefulness. Orders, fees, slippage, and profitability are outside scope.
Conclusion
Compression Expansion Map replaces a Boolean squeeze with an inspectable lifecycle. Depth measures charge, dwell measures maturity, and qualified release plus ATR acceleration measures expansion without claiming direction or outcomes.
Индикатор

Regime Detector [StrixEDGE]📊 WHAT IT DOES
StrixEDGE Regime Detector automatically classifies the market into four distinct states — Strong Trend, Weak Trend, Ranging, or Volatile Chop — using a proprietary four-metric analysis system. Subtle background colors make the current regime instantly visible without cluttering your chart.
🔬 WHY IT'S DIFFERENT
Most regime indicators rely solely on ADX. This indicator combines four independent dimensions: ADX for trend strength, RSI range-shift analysis for bull/bear regime identification, KAMA slope for adaptive trend direction, and ATR volatility ratio for market character assessment. The four-layer approach catches regime changes that single-metric tools miss entirely.
⚙️ HOW IT WORKS
The indicator evaluates four metrics simultaneously:
• ADX measures raw trend strength (>25 = trending)
• RSI tracks whether momentum is operating in bull mode (40-80) or bear mode (20-60)
• KAMA's normalized slope detects whether price is directional or flat
• ATR ratio reveals if volatility is above or below its historical average
These combine into a decision matrix: all four must agree for a "Strong Trend" classification. Partial agreement produces "Weak Trend." Low ADX + flat KAMA = "Ranging." High volatility without trend = "Volatile Chop."
📈 HOW TO USE
• Green background = Strong Uptrend → trade with trend, trail stops
• Red background = Strong Downtrend → look for shorts or stay flat
• Blue background = Ranging → use mean-reversion setups, avoid trend strategies
• Amber background = Volatile Chop → reduce size or sit out
• Diamond markers appear when regime shifts — these are key decision points
🎛️ INPUTS & DEFAULTS
ADX Period: 14 | RSI Period: 14 | KAMA Length: 21 | ATR Period: 14
ATR Lookback: 50 | Flat Threshold: 0.05 | Sensitivity: Normal
All inputs adjustable. Conservative mode raises thresholds for fewer signals. Aggressive lowers them.
═══════════════════════════════════════════════════════
🔧 CUSTOMIZATION
All parameters are fully adjustable through the indicator settings panel. Inputs are grouped logically:
• ⚙️ Core Parameters — main calculation settings
• 📊 Table Settings — table size (Tiny to Huge), position (4 corners), visibility toggle
• 🎨 Visual Settings — colors, show/hide elements
• 🔔 Alert Settings — threshold values for notifications
📊 DATA TABLE
A built-in data table displays all key metrics in real-time. Adjust the table size from Tiny to Huge to match your chart layout. Position it in any corner. Toggle visibility on/off.
🔔 ALERTS
Pre-built alert conditions for all major signals. Set up alerts via TradingView's alert dialog — select this indicator and choose from the available conditions.
⏱️ RECOMMENDED TIMEFRAMES
Works on all timeframes. Recommended: 1H, 4H, Daily for best signal quality. Lower timeframes produce more signals but with higher noise. Weekly/Monthly for position trading context.
✅ COMPLIANCE
• No repainting — all signals based on confirmed bar close data
• No future data references
• Open-source code — verify the logic yourself
⚠️ DISCLAIMER
This indicator is a technical analysis tool, not financial advice. It does not predict future price movements. Past patterns and signals do not guarantee future results. Trading involves substantial risk of loss. Always use proper risk management, including stop losses and appropriate position sizing. Never risk more than you can afford to lose. Индикатор

Volatility Regime Trend Ribbon [Pineify]Volatility Regime Trend Ribbon
Overview
This overlay adapts smoothing as markets change. It ranks ATR, selects a regime, and adjusts trend speed and ribbon width.
Key Features
Three ATR percentile regimes.
Regime-specific trend lengths and band scales.
Optional colors, confirmed markers, and alerts.
How It Works
ATR is ranked over a rolling window. Low ranks select low volatility, high ranks select high volatility, and middle ranks select normal volatility. Warm-up uses the normal state.
The selected length drives a recursive EMA-style center. Ribbon edges equal the center plus or minus ATR times the base multiplier and regime scale. This is a price boundary, not a statistical confidence interval. Direction turns bullish after a confirmed close above the upper edge, bearish below the lower edge, and otherwise retains its prior state.
Trading Ideas and Insights
Colors separate quiet, ordinary, and elevated ranges. A band exit can frame a direction change; movement inside stays unresolved. Gaps or thin trading can add lag and false transitions. No output is an automatic trade.
How Multiple Indicators Work Together
ATR measures range, percentile rank adds context, adaptive smoothing changes speed, and the band supplies the direction threshold. They form one engine without external data.
Unique Aspects
The original design links volatility to smoothing speed and band scale, not just color. Retained direction inside the band adds hysteresis; alerts distinguish regime and direction changes.
How to Use
Apply it to a liquid market and let the percentile window warm up.
Tune lengths and band scales for the symbol and timeframe.
Read center color as direction and ribbon color as regime.
Use confirmed alerts with independent risk controls.
Customization
ATR Length controls range sensitivity; Percentile Lookback controls context. Thresholds define states, lengths set speed, and band inputs set transition distance. Display layers are optional. Current values can change intrabar; markers and alerts require a confirmed close.
Conclusion
This ribbon organizes volatility regime and ATR percentile context for 15-minute to daily charts. It uses past and present data, remains lagging and parameter-sensitive, and makes no performance claim.
Индикатор

Trender [IQ]IQ Trender - TradingIQ
🔹 OVERVIEW
IQ Trender is a non-repainting trend rail built around one simple visual language:
Flat = range. Ramp = trend. Brightness = conviction.
Most trend tools try to follow every movement in price. In sideways conditions, that can leave you reading a line that bends, twitches, and changes direction inside the same noise you were trying to filter.
IQ Trender is designed to behave differently. While the market remains inside its adaptive hold zone, the rail stays deliberately flat. When the underlying trend evidence becomes strong enough, it commits to a rising or falling leg and moves in one direction until that condition genuinely changes.
The result is a clean distinction between three market states:
Holding - the rail is flat and the market is being treated as a range or consolidation.
Rising - the rail has committed to an upward leg.
Falling - the rail has committed to a downward leg.
Direction is shown by color. Conviction is shown by color intensity and glow. The Trender Radar explains the current state numerically, while the Ghost Forecast extends the rail's present trajectory into a fading uncertainty cone.
This is a trend-reading and visualization tool, not a signal service. It does not issue buy or sell calls, and it makes no claim of profitability or predictive certainty.
🔹 THE ONE-LINE MENTAL MODEL
The fastest way to read IQ Trender is to ignore the mathematics at first and watch the shape of the rail:
A flat rail means the model is holding through noise.
An upward ramp means the model has committed to a rising leg.
A downward ramp means the model has committed to a falling leg.
A stronger glow means the estimated trend is showing greater statistical conviction.
This is the same sequence demonstrated in the walkthrough: a directional leg can flatten during a pause, pullback, or consolidation, then recommit if the broader move resumes. The bearish interpretation is the mirror image - falling leg, flat hold, then a renewed falling leg if downside evidence returns.
The flat section is important. It is not a prediction that a breakout is about to happen. It is the indicator saying that current movement has not earned a directional commitment.
🔸 HOW THE ENGINE WORKS
IQ Trender combines three separate jobs: estimating the trend beneath price, deciding whether that trend is statistically meaningful, and drawing a rail that cannot wiggle backward within a committed leg.
Track the underlying trend
A robust local-linear Kalman filter estimates the level and slope beneath the candles. Unlike a conventional moving average that applies a fixed weighting pattern, this is a state-estimation model: it updates its estimate from the difference between expected and observed price.
Large isolated deviations are reduced with a robust update, so a single wick cannot directly yank the rail to a new location. The model also adapts its measurement-noise estimate as conditions change.
⬞
Measure the uncertainty
The filter calculates an innovation deviation - a live estimate of how much movement is normal relative to its current model. IQ Trender uses that value to size the hold band.
When conditions are noisy, the tolerance can widen. When conditions are calmer, it can tighten. This lets the same mental model adapt across different symbols, price levels, and timeframes without using one fixed distance everywhere.
⬞
Test for commitment and change
The estimated slope is compared with its own uncertainty to produce conviction. Hysteresis uses separate thresholds for entering and leaving a committed trend, helping prevent repeated state changes near one boundary.
A two-sided cumulative change test also monitors standardized price surprises. That evidence helps the rail distinguish a genuine opposing change from ordinary counter-movement when a leg is already active.
⬞
Draw the rail
The visible rail is a separate, slew-limited ratchet guided by the Kalman center. Once an upward leg begins, the rail can only move upward until a valid reversal or hold condition is reached. Once a downward leg begins, it can only move downward.
That monotone-within-leg behavior is what creates IQ Trender's signature geometry: flat holds connected by clean directional ramps instead of a line that bends around every candle.
🔹 THE ADAPTIVE HOLD BAND
The shaded band is the rail's live range corridor.
While the rail is holding, the band opens around it to show the volatility-adjusted area in which price can move without forcing a directional leg. When the rail commits to a trend, the displayed band eases shut onto the rail because the model has left its holding state. When the rail becomes flat again, the band gradually reopens.
The band should be read as a model tolerance, not as conventional support and resistance. Price moving within it means the model can continue to hold. Movement beyond it contributes evidence for a new leg, but it is not, by itself, a guaranteed breakout or trade entry.
🔸 COLOR, GLOW & CONVICTION
IQ Trender communicates direction and commitment through one coordinated visual system:
Rising color - active upward leg.
Falling color - active downward leg.
Holding color - neutral, flat state.
Glow intensity - visual emphasis derived from the current conviction reading.
Conviction measures how strongly the estimated slope differs from zero relative to the model's uncertainty. It is a statistical strength reading, not the probability that a trade will win.
The palette is generated in the Oklab perceptual color space. Hue, lightness, and vibrancy can be adjusted as a coordinated system, while out-of-gamut colors are compressed toward neutral instead of clipping harshly.
Accessibility controls include deuteranopia, protanopia, and tritanopia modes, plus automatic contrast correction against the chart background. A selectable contrast target helps keep the rail and directional Radar accents legible across light and dark themes.
🔹 TRENDER RADAR
The Trender Radar is the live scorecard in the corner of the chart. It reports:
State - HOLDING, RISING, or FALLING.
Conviction - normalized trend commitment from 0-100%.
Slope - the rail's current rate of change per bar.
Hold Band - the current full width of the adaptive range corridor.
Behavior - the active Speed and Pursuit combination.
With Log Geometry enabled, slope is displayed as a percentage per bar and band width is expressed as a percentage of the rail. With linear geometry, both are shown in price units.
The Radar can be moved to any chart corner or disabled entirely.
🔸 GHOST FORECAST
The Ghost Forecast is a translucent forward projection of the rail's current slope.
Its centerline extends the rail's recent trajectory. The surrounding cone widens with distance to communicate increasing uncertainty, then fades away toward the horizon. Two growth modes are available:
√h - tighter near the live bar, then gradually widening like a random-walk spread.
Linear - uncertainty expands at a constant rate.
The forecast is rebuilt only at the live edge and never painted into historical bars. It can also be displayed while the rail is holding, where its centerline remains flat.
This feature is a trajectory read, not a price target. It answers, Where is the rail currently heading if its present slope persists? It does not answer, Where will price trade?
🔹 FLIP MARKERS & ALERTS
Optional markers identify confirmed changes in rail state:
▲ - committed to a rising leg.
▼ - committed to a falling leg.
◇ - flattened back into a hold, when hold markers are enabled.
Markers are created only on confirmed bars. Once printed, they do not move.
Matching alert conditions are included for:
Trender committed to a rising trend.
Trender committed to a falling trend.
Trender flattened into a hold.
These alerts report state changes in the model. They are not automated trade recommendations and should be interpreted in the context of the symbol, timeframe, market structure, and the user's own risk process.
🔸 SPEED - THE OVERALL TEMPO
Speed changes the rail's pursuit rate and the width of its hold zone together:
Glacier - calm, structural behavior for slower or higher-timeframe reading.
Slow - patient swing behavior with a wider hold zone.
Balanced - the recommended reference setting, balancing hold and tracking.
Fast - more reactive behavior for shorter intraday movement.
Scalp - the tightest and quickest micro follower.
Slower settings generally require more displacement and move the rail more gradually. Faster settings use a tighter band and pursue price more aggressively. A faster preset is not automatically better: responsiveness and noise rejection are opposing trade-offs.
🔸 PURSUIT - HOW A COMMITTED LEG MOVES
Pursuit changes the shape of an active leg without changing the underlying trend evidence:
Steady - a constant-speed ramp established when the leg begins.
Eased - pursuit speed scales with conviction and feathers toward the estimated center.
Snap - the most decisive pursuit, with a higher movement rate and faster conviction scaling.
On slower Speed presets, Snap can appear more step-like. Steady produces the cleanest constant ramps, while Eased creates a softer approach.
🔹 HOW TO READ IQ TRENDER
Start with state
Flat rail means the model is holding. Rising or falling rail means it has committed directionally. This gives the chart an immediate range-versus-trend read before any number is considered.
⬞
Weigh the leg
Use conviction, glow, and slope together. A bright rail with firm slope represents stronger model commitment. Fading conviction says the trend estimate is becoming less distinct from noise; it does not guarantee an immediate reversal.
⬞
Watch the sequence
One useful continuation framework is:
Rising rail.
Flat hold during consolidation or pullback.
New rising marker and renewed upward rail.
The bearish sequence is the inverse. This is a way to organize market context, not a complete entry system.
⬞
Keep the forecast in its proper role
Use the Ghost Forecast to visualize current trajectory and uncertainty. Do not treat the cone edge or centerline as a promised future level.
⬞
Confirm with your own process
IQ Trender can be combined with price structure, volume, liquidity, momentum, or a trader's existing risk framework. No single state, marker, or Radar value should replace position sizing and independent confirmation.
🔸 INPUTS
Behavior
Speed
Pursuit
Source & Geometry
Price Source
Use Log Geometry
Close with Log Geometry enabled is the recommended general-purpose setup for ordinary positive price series. Log mode keeps slope and band behavior proportional across different price levels.
Rail, Band & Glow
Hold Band on/off
Band transparency
Rail Glow on/off
Glow intensity
Glow spread
Rail line width
Colors
Rising, Falling, and Holding anchors
Global hue rotation
Lightness adjustment
Vibrancy adjustment
Conviction Color response
Accessibility
Color-Blind Mode
Auto Contrast
Contrast Ratio
State Readout
Show Trender Radar
Radar location
Forecast
Ghost Forecast on/off
Horizon in bars
√h or Linear cone growth
Show While Holding
Markers
Flip Markers on/off
Optional hold markers
Marker size
🔹 NON-REPAINTING BEHAVIOR
IQ Trender is calculated causally with no future-bar lookahead.
Confirmed historical rail values and confirmed flip markers remain where they were calculated. The current, still-open bar can update as new price arrives, as any live indicator can. The Ghost Forecast is intentionally rebuilt at the live edge because it represents the rail's current slope and uncertainty; it does not rewrite historical bars.
What was confirmed in history stays confirmed. What is still live remains live.
🔸 LIMITATIONS & HONEST NOTES
IQ Trender is an indicator, not a validated trading strategy. It makes no performance, win-rate, profit, or edge claim.
Kalman filtering is still a causal estimation process. It reduces noise but cannot remove lag, uncertainty, or false transitions.
Faster settings react sooner but can respond to more noise. Slower settings filter more movement but can confirm later.
A Holding state identifies insufficient directional commitment in this model; it does not guarantee that price will remain inside a range or that a breakout is imminent.
Conviction measures the strength of the estimated slope relative to uncertainty. It is not a probability of future direction or trade success.
The Ghost Forecast extrapolates the rail, not price. It is a visual scenario if the current trajectory persists, not a target or prediction.
Alerts and markers identify model state transitions only. They should not be treated as standalone entries or exits.
Results depend on symbol behavior, timeframe, data quality, and the selected Speed/Pursuit combination.
IQ Trender is built to make one difficult market question easier to see:
Is the market still ranging, or has a trend actually committed?
One rail. Three states. No hindsight redraws.
Индикатор

Advanced Realized Volatility (Crypto Stocks Indices Forex)**Advanced Realized Volatility — Detailed Guide**
### What This Indicator Does
Advanced Realized Volatility (Crypto) measures the actual historical price fluctuation of an asset over a user-defined calendar-day window and expresses it as an annualized percentage. Unlike simple standard-deviation tools, it offers six statistically grounded estimators (Close-to-Close, Parkinson, Garman-Klass, Yang-Zhang, Rogers-Satchell, and EWMA), automatically converts a calendar-day lookback into the correct number of bars for any timeframe, and applies the proper annualization factor (√365 for crypto by default, √252 for traditional assets).
The indicator places the current volatility reading in historical context through percentile rank, classifies the market into four regimes (Low / Normal / High / Extreme), calculates Expected Moves for 1-, 7-, and 30-day horizons, and allows direct visual comparison with up to three other symbols. All key metrics appear in a compact on-chart table.
### Core Concepts Explained Simply
- **Realized Volatility (RV)** shows how much the asset has actually moved in the recent past, scaled to a one-year basis. Higher RV means larger typical price swings.
- **Percentile Rank** answers the question: “Is the current volatility high or low relative to its own history?” A reading of 15 means the present volatility is lower than 85 % of the readings in the chosen historical window.
- **Volatility regimes** translate the percentile into actionable categories:
- Low (compression) — percentile below 20
- Normal — 20 to 80
- High — above 80
- Extreme — above 95
- **Expected Move** converts the current annualized RV into an approximate price range the market is statistically likely to traverse over the next 1, 7, or 30 days.
- **Relative Volatility** and multi-asset lines show whether the current instrument is quieter or more turbulent than its peers or its own longer-term average.
### How to Set Up and Read the Indicator
1. Apply the script to any chart (crypto, stocks, indices, and forex work correctly).
2. Choose the volatility method. Yang-Zhang is the recommended default because it efficiently incorporates overnight gaps, open-to-close drift, and the high-low range.
3. Select a lookback in calendar days (30 days is a balanced starting point; shorter windows react faster, longer windows are smoother).
4. Leave annualization on Auto unless you have a specific reason to force 365 or 252.
5. Optionally enable one to three comparison symbols (e.g., BTC vs ETH, SOL, or QQQ) using the same method and period.
6. Turn on background regime coloring and the information table for at-a-glance context.
7. Observe three primary visual elements:
- The main RV line and any comparison lines
- Horizontal reference levels (mean, 20th and 80th percentiles)
- Background color that changes with the regime
The table always displays the current annualized RV, percentile rank with regime label, relative volatility, Expected Moves, and the values of any enabled comparison assets.
### Practical Trading Applications and Patterns
**1. Volatility Compression → Expansion (Breakout Preparation)**
When the percentile rank falls below 20 and the background turns to the Low-volatility color, the market is in a compressed state. Historically, prolonged low-volatility periods are frequently followed by a sharp expansion in range. Traders watch for price to break a well-defined consolidation, range, or chart pattern while RV is still low or just beginning to rise. The Expected Move values help set realistic profit targets once the expansion starts.
**2. High / Extreme Volatility Regime (Risk Management & Mean-Reversion Bias)**
A percentile above 80 (especially above 95) signals elevated or extreme turbulence. In these conditions:
- Position sizes are typically reduced.
- Stops are widened or switched to volatility-based (ATR or Expected Move multiples).
- Mean-reversion or fade strategies become more attractive after a climax move, because extreme readings often revert toward the mean.
- Trend-following systems may stay in the market but with tighter risk controls.
**3. Regime Shifts as Timing Filters**
A cross of the RV line above its longer-term mean or a move of the percentile from Low into Normal/High can confirm that a new directional move has volatility support. Conversely, a drop back into the Low regime after an expansion often marks the end of a volatile phase and the start of a quieter consolidation.
**4. Cross-Asset Relative Volatility**
When the main asset’s RV line sits significantly above or below the comparison lines, relative volatility strength or weakness appears. Example patterns:
- BTC RV rising while ETH RV stays flat or declines → possible BTC leadership or capital rotation into Bitcoin.
- An altcoin showing persistently higher RV than BTC → higher-risk, higher-reward environment that may require stricter position sizing.
- Equity index (QQQ or SPX) RV rising together with crypto → broader risk-off or risk-on regime alignment.
**5. Expected Move for Targets and Option Structures**
The 1-day, 7-day, and 30-day Expected Move figures provide statistically derived price ranges. Common uses:
- Setting take-profit levels at approximately 1× or 1.5× the Expected Move.
- Judging whether an options premium is rich or cheap relative to recent realized movement.
- Sizing positions so that a 1–2 Expected Move adverse excursion remains within acceptable risk.
**6. Volatility of Volatility (VoV)**
When enabled, VoV highlights periods when volatility itself is unstable. Rising VoV often accompanies regime transitions and can serve as an early warning that the current quiet or elevated state is about to change.
### Typical Workflow for Discretionary Traders
1. Note the current regime and percentile rank.
2. Check whether RV is rising or falling and how it compares with the chosen benchmark assets.
3. Read the Expected Move numbers to gauge the probable size of the next swing.
4. Align the volatility picture with classical price action (breakouts from compression, exhaustion after extreme readings, relative strength between assets).
5. Adjust position size, stop distance, and profit targets accordingly.
6. Use the built-in alerts for regime changes, RV crosses of its mean, or sharp expansions so that monitoring can be partly automated.
### Recommended Starting Settings
- Method: Yang-Zhang
- Lookback: 30 calendar days
- Annualization: Auto
- Percentile lookback: 365 days
- Background coloring and table: enabled
- One or two comparison symbols relevant to the traded asset
These settings provide a balanced, responsive view on most crypto pairs while remaining stable enough for higher-timeframe analysis.
The indicator does not generate buy or sell signals by itself. It supplies a quantitative volatility context that improves timing, risk management, and cross-market comparison. When combined with price structure, volume, and a clear trading plan, the regimes, percentile extremes, and Expected Moves become reliable filters for identifying high-probability compression-to-expansion setups, managing risk during turbulent periods, and comparing the relative “temperature” of different assets.
⚠️ Disclaimer
This indicator is for *educational and informational purposes only*. It does not constitute financial advice. Always do your own research before making investment decisions.
*Indicator by:* iCD_creator
*Version:* 1.0
*Pine Script™ Version:* 6
---
Updates & Support
For questions, suggestions, or bug reports, please comment below or message the author.
*Like this indicator? Leave a 👍 and share your feedback!* Индикатор

Индикатор

AlphaVault - Regime FilterTwo long-term trend filters and one rule: price above both is a bull regime, below both is
a bear regime, anything in between is neutral. It plots the filters, tints the background
by state, marks each change, and shows how long the current state has held.
NO REPAINTING. Both filters are read from the previous COMPLETED daily and weekly bar
(lookahead_off plus a one-bar offset), so the regime shown for a closed bar never changes
afterwards. This is worth verifying yourself on any indicator you did not write: scroll
back, note the state on an old bar, reload the chart, and check it is the same.
What it is for: deciding whether to be doing anything at all. Most trend systems lose the
majority of their money trying to trade against a long-term downtrend, and a neutral state
is genuinely common — roughly a fifth of all bars on BTC since 2018. Treating "no clear
regime" as a valid answer rather than a gap to be filled is most of the value here.
What it is not: an entry signal. It tells you which direction is permitted, not when to
act, and it will keep you out of some large moves that begin before the filters confirm.
It is deliberately slow. On BTC it changes state a handful of times a year.
Defaults are a 200-period SMA on daily closes and a 20-period EMA on weekly closes. Both
lengths are configurable, though the defaults are the ones worth arguing about — a filter
you re-tune until it looks good on the chart in front of you has stopped being a filter.
Alerts fire on a turn to bull, a turn to bear, or any change. Regime changes are rare by
construction; an alert that fires constantly is one you learn to ignore.
Open source. Read it, change it, take it apart. Индикатор

Индикатор

PING - Regime & Style Fit [Technical-Trades]Every chart timeframe implies a trading style — sub-5-minute charts are scalping territory, 5m–1h is intraday, roughly 2h–daily is swing, weekly and above is position trading — and every market phase treats those styles differently. Many losing streaks are not bad entries; they are a style/conditions mismatch: scalping chop, swing-trading a dead base, fading a tape that is trending.
PING answers one question about whatever chart you have open: do current conditions fit the style this timeframe belongs to?
WHAT THE HUD SHOWS
- Timeframe · style band — which of the four style bands your chart timeframe belongs to (SCALP under 5m · DAY 5m–1h · SWING ~2h–1D · POSITION 1W and above; in-between timeframes round to the nearest class).
- Regime — one of four coarse market characters on this chart timeframe: TREND ↑, TREND ↓, RANGE, or VOL CHOP.
- Character — the two raw measurements behind the call: the Aroon oscillator (−100…+100) and how wide the recent high-low span is versus its own baseline (×).
- Fit — ● FAVORABLE, ◐ MIXED / STAND-BY, or ○ CAUTION for this timeframe's style, plus a one-line read explaining why. A quiet range with an unusually narrow span is additionally tagged coiled — compression that often precedes expansion.
An optional background tint and bar coloring paint the regime directly on the chart.
HOW IT WORKS (THE WHOLE ENGINE, NOTHING HIDDEN)
Two commodity measurements, both read from nothing but the rolling price extremes, computed on the chart timeframe only:
1. Trend + side — the Aroon oscillator (length 25, the indicator's original default, lightly smoothed with a 3-bar average): how recently the 25-bar high was made versus the 25-bar low, on a −100…+100 scale. Fresh highs with stale lows read strongly positive (uptrend); the reverse reads strongly negative. At or above ±70 — the conventional strong-trend line — the tape is called directional, and the sign picks the side.
2. Volatility — the high-low span of the last 40 bars as a percent of price, compared to its own 150-bar average, so "wide" and "narrow" are always relative to this market on this timeframe.
Regime resolution: oscillator magnitude at or above the threshold = trending. Not trending with the span at or above 1.6× its baseline = VOL CHOP (large, directionless swings). Everything else = RANGE, tagged coiled when the span sits at or below 0.5× — half its normal width, compression that often precedes expansion. All thresholds are inputs.
WHAT PING DELIBERATELY DOES NOT DO
No entries, no exits, no levels, no arrows, and no higher-timeframe requests — there is not a single request.security() call in the code. It diagnoses conditions; what you do with that is your process.
HONEST LIMITATIONS
The engine has no hysteresis and no state memory beyond the 3-bar smooth, so bars near a threshold can flip the read back and forth — the cost of keeping the math this simple and fully inspectable. Early chart history defaults to RANGE until the 150-bar span baseline warms up; that is expected, not a bug. The HUD updates on the developing bar like any indicator.
ALERTS (recommend "Once per bar close"; conditions are additionally gated to confirmed bars in code)
- Regime changed
- Fit turned FAVORABLE
- Fit turned CAUTION
Works on any symbol and any timeframe. Educational tool — not financial advice and not a signal service. Индикатор

Quant Regime Oscillator [JOAT]════════════════════════════════
QUANT REGIME OSCILLATOR
════════════════════════════════
A separate-pane composite oscillator that fuses two classic quant signals — how stretched price is from its own mean, and how strong its momentum is relative to recent volatility — into a single bounded line from -100 to +100 . A Kaufman Efficiency Ratio regime filter then decides whether the market is Trending , Mean-Reverting , or Random , so signals only fire when conditions actually support them.
▎ WHAT IT DOES
It condenses mean-deviation and normalized momentum into one clean, smoothed oscillator, classifies the current market regime, and prints sparing BUY / SELL labels only at stretched extremes that align with a trend. A dashboard summarizes every moving part at a glance.
▎ HOW IT WORKS
• Z-Score component — price is measured against its moving mean and standard deviation, then clamped at ±3σ and rescaled to ±100. This captures how far price has deviated from equilibrium.
• Momentum component — rate-of-change is normalized by its own standard deviation (volatility-adjusted), clamped at ±3σ and rescaled to ±100. This measures thrust independent of raw price size.
• Composite blend — the two components are combined using your chosen weights, EMA-smoothed, and clamped into a single -100..+100 oscillator , with an EMA signal line layered on top.
• Regime filter — a Kaufman Efficiency Ratio (directional change ÷ total path) scores 0..1. High values = trending; low values = mean-reverting; in-between = random. Direction is read from price versus its mean.
• Signal gate — a raw BUY needs the oscillator to cross up over its signal, to have recently visited oversold , and to sit inside a trending-up regime. SELL is the mirror. A cooldown enforces a minimum bar gap so labels stay few and never stack.
• Divergence — pivot highs/lows on the oscillator are compared to price pivots to flag regular bullish and bearish divergences.
▎ HOW TO USE IT
• Read the oscillator like a bounded momentum gauge — blue above zero, magenta below. Pushes into the dotted ±80 extreme bands mark exhaustion zones.
• BUY pills appear at oversold turns inside up-trends; SELL pills at overbought turns inside down-trends. Treat them as context-filtered setups, not standalone triggers.
• Use the regime as your playbook: in Trending , favor pullback continuation; in Mean-Rev , fade the band extremes; in Random , stand aside or size down.
• The subtle pane background tint mirrors the regime — blue for trending-up, magenta for trending-down, grey for mean-reverting.
• Divergence dots on the oscillator hint at weakening thrust; combine with your own structure and risk levels.
▎ KEY SETTINGS
• Engine — Z-Score length, Momentum (ROC) length, per-component weights, oscillator smoothing, and signal-line length.
• Regime — Efficiency Ratio window plus the Trending and Mean-Revert thresholds that split the three regimes.
• Signals — Overbought / Oversold levels, OB/OS recall window, minimum bars between signals (cooldown), and divergence pivot length.
• Visuals — toggle the gradient fill, oscillator line, signal line, regime background, and signal markers.
• Dashboard — show/hide, position, and text size.
▎ DASHBOARD
A compact blue/magenta panel reporting: the current bias (Long / Short / Flat), the composite score, raw Z-Score in σ, the momentum value, the active regime with a strength percentage, the OB/OS state , any live divergence , and the current signal status.
▎ ALERTS
• QRO — Long — oscillator crossed up from oversold in a trending-up regime.
• QRO — Short — oscillator crossed down from overbought in a trending-down regime.
• QRO — Any Signal — fires on either a long or short signal.
▎ NOTES
• Works on all timeframes and all assets — the oscillator is self-normalizing, so it adapts to the instrument automatically.
• Every visual layer is toggleable for a clean chart; the cooldown keeps markers sparse on any timeframe.
• Signals confirm on the closed bar and are non-repainting once the bar completes; divergence markers reference confirmed pivots offset back by the pivot length.
For research and education only. This is not financial advice. No indicator can predict the future, and past behavior does not guarantee future results. Always do your own analysis and manage your own risk.
Made with passion by JackOfAllTrades ⚡
Индикатор

Regime Quadrant Map [XWiseTrade]Most "regime" indicators sort the market into two boxes: trending or ranging. But that single axis hides the variable that actually decides whether a trend is tradeable - volatility. A market drifting up in dead-calm conditions and a market ripping up in violent conditions are both "trending," yet they demand opposite tactics. Collapsing them into one label is why so many trend filters fail exactly when you lean on them. This indicator separates the two questions that a one-dimensional filter fuses together, and maps the result onto four regimes instead of two.
WHY VOLATILITY IS MEASURED AS AN ATR Z-SCORE, NOT RAW ATR
Raw ATR tells you nothing on its own - an ATR of 15 is enormous on one instrument and trivial on another, and huge in one era and small in the next. What matters is whether volatility is unusually high or low relative to this market's own recent behaviour. So ATR here is ranked against its own distribution over a lookback window and expressed as a Z-score: how many standard deviations above or below its own norm current volatility sits. That makes the reading self-referential and comparable across any symbol or timeframe, instead of an absolute number you'd have to re-learn for every chart.
WHY TREND IS MEASURED WITH EFFICIENCY RATIO, NOT A MOVING-AVERAGE SLOPE
A rising moving average tells you price is higher than it was - it does not tell you how price got there. Efficiency Ratio does: it divides the net directional move by the total distance price actually travelled to make it. A value near 1 means a clean, purposeful move; near 0 means price thrashed back and forth to end up in nearly the same place. Two charts with an identical slope can have completely different efficiency, and that difference - not the slope - is what separates a trend you can ride from a trap. Slope measures result; Efficiency Ratio measures quality.
THE FOUR QUADRANTS
Crossing the two axes gives four regimes, each with a distinct character:
- GRIND (trending + low volatility) - a steady, efficient directional move; the kind you can lean into.
- EXPANSION (trending + high volatility) - a violent directional move; momentum conditions, wider risk.
- COIL (ranging + low volatility) - compression; energy building, often ahead of a breakout.
- CHOP (ranging + high volatility) - whipsaw with no follow-through; the regime most accounts quietly bleed in.
HOW TO USE IT
Watch the regime label and background tint for the current quadrant, or read the two plotted lines directly against their dashed thresholds - the ATR Z-score line for the volatility axis, the Efficiency Ratio line for the trend axis. Both thresholds and both lookbacks are adjustable, so you can set what counts as "high volatility" or "trending" for your own instrument and timeframe. An alert fires whenever the market crosses into a new quadrant, so you don't have to watch it to know the regime shifted.
WHAT MAKES IT DIFFERENT
Standard regime tools reduce the market to a single trend-versus-range line and treat volatility as an afterthought. This one builds regime from two independent axes, measures volatility as a self-referential Z-score rather than an absolute number, measures trend by path efficiency rather than slope, and resolves the market into four actionable states instead of two - because "trending" alone was never enough to decide how to trade it.
These are descriptive regime classifications for discretionary use, not buy/sell signals. Индикатор

NeuPortal Market Compass - Empirical Bands, Regime & IndicesNeuPortal Market Compass is a single overlay that instruments any symbol on any timeframe with three layers of context plus a readout dashboard, so you get the useful curves, the envelope, a forward band and the key indices from one indicator instead of stacking five.
WHAT IT DRAWS
1) Trend curves. EMA fast / mid / slow (20 / 50 / 200 by default) and an optional VWAP. The classic structure read at a glance.
2) Volatility envelope. A standard Bollinger band (20, 2 by default) for immediate context on how stretched price is right now.
3) Empirical forecast band. This is the part that is different. Instead of a sigma*sqrt(t) projection, it reads the distribution of the chart's OWN realised H-bar moves over the history window and takes quantiles from it: a core 50% zone (25th to 75th percentile), a wide 80% zone (10th to 90th) and the median, all projected forward H bars into empty space to the right of the last candle.
Why empirical rather than parametric: real markets have fat tails and volatility clustering, so a normal, independent-returns assumption misprices the interval - and it does so in different directions at different horizons. Reading the quantiles straight from history avoids that assumption entirely. The band is only as trustworthy as the sample behind it, so the dashboard prints the number of INDEPENDENT windows (history window / horizon), not the inflated overlapping count.
DASHBOARD (top-right, movable)
- Regime: trend direction from the EMAs, with strength gated by ADX
- RSI, ADX, ATR% - momentum, trend strength and volatility at a glance
- Median, Core 50% and Wide 80% band edges for the chosen horizon
- Band width as a percent of price - how much the market itself says it can move
- Independent windows behind the band - the honest sample size
HOW TO USE
Set the Horizon to how many bars ahead you care about and the History window to how much past data feeds the distribution. Watch coverage over time: across many bars, price should sit inside the 50% core about half the time and inside the 80% band about eighty percent of the time. A band that contains price far more often than that is padded; far less often is overconfident. Both are information.
SETTINGS
Toggle each layer independently (EMAs, VWAP, Bollinger, band, dashboard), set all lengths, recolour the zones, move the dashboard, and optionally tint the background Индикатор

Golden Cross Engine [Quantum Algo]Golden Cross Engine
====================================================
🔶 OVERVIEW
Golden Cross Engine is a complete golden cross and death cross indicator that goes far beyond marking the moving average crossover: it counts down to the next cross before it happens, grades every cross by quality, measures what golden and death crosses have actually done on the current symbol with honest statistics, and lets every cross marker settle into its real outcome so the chart itself shows which crosses worked and which failed.
The golden cross — the fast moving average crossing above the slow, classically the 50 over the 200 — is one of the most watched events in all of trading, and the death cross is its bearish mirror. Every major cross makes financial headlines. This engine turns that famous event from a headline into a measurable, projectable, and auditable object on your chart.
🔶 WHAT ARE THE GOLDEN CROSS AND DEATH CROSS?
A golden cross occurs when a faster moving average (traditionally the 50 period) closes above a slower one (traditionally the 200 period), signaling that intermediate momentum has overtaken the long-term trend — historically read as the start of a bullish regime. A death cross is the opposite: the fast average crossing below the slow, read as the start of a bearish regime. Because both averages move slowly, the cross itself is a lagging event — which is exactly why this engine adds a convergence countdown that shows the cross forming before it prints.
🔶 WHY THIS SCRIPT IS ORIGINAL
1. The convergence countdown. The engine measures the current slope of both averages and projects their geometry forward, drawing the two converging paths and marking where and when they would meet: "Golden Cross ≈ 9 bars" with the projected price level. It is a projection at current slopes — clearly labeled as such, never a forecast — and it makes the most-watched lagging signal in trading visible in advance. An approach alert fires when the countdown first enters your chosen lead window.
2. Markers that settle into their outcome. Every cross prints in neutral gold, then resolves twenty bars later: the bullish or bearish color if the cross delivered, faded gray if it failed. The chart becomes its own audit trail — scroll back and see the honest history of every cross on the symbol.
3. Per-symbol cross statistics. Using shrinkage-adjusted win rates and Wilson confidence bounds, the engine reports how often golden and death crosses were favorable on this exact symbol and timeframe at five, twenty, and sixty bars, with sample counts and average moves — on every marker's tooltip and in the dashboard. It answers "does the golden cross actually work here" with data instead of folklore.
4. Cross quality grading. Every cross is graded A, B, or C from three observable conditions: elevated volume at the cross, slope steepness of the fast average, and momentum confirmation of price relative to it. Grade A crosses are the full-confluence events.
5. A living regime fill. The zone between the averages breathes: the bullish or bearish tint intensifies as the gap widens and pales as a cross approaches, so regime strength and regime fatigue are visible at a glance. Cross bars flash once.
6. Multi-timeframe cross state. The dashboard shows whether the fast average is above or below the slow on the fifteen-minute, one-hour, four-hour, daily, and weekly timeframes simultaneously — full-stack regime alignment in two compact rows.
🔶 HOW IT WORKS
Averages: Selectable simple or exponential averages at configurable lengths, defaulting to the classic 50 and 200.
Countdown: The engine computes each average's recent slope and solves the convergence geometry. When the averages are approaching within the horizon, it draws both projected paths, the meeting diamond with the bar count, and the projected level. When they are separating, the dashboard reads Diverging.
Statistics: Each confirmed cross records what price actually did five, twenty, and sixty bars later, in the cross's direction, into capped first-in-first-out databases. Win rates are pulled toward fifty percent by pseudo-samples so a thin history cannot display fake confidence, and each rate carries a Wilson lower bound. Crosses are rare events by nature, so sample counts are honest and often small — markers read "collecting history" until the minimum is met.
Outcome settlement: Each marker stores its cross price; twenty bars later it recolors by the realized directional outcome and joins the capped history.
Grading: Volume z-score, normalized slope steepness, and price-side confirmation combine into the A, B, C grade shown on the marker tooltip and dashboard.
Non-repainting: Crosses, grades, and statistics are evaluated on closed bars. The countdown updates on the live bar by design — it is a live projection, and it is labeled as one.
🔶 HOW TO USE IT
1. The natural home is the daily chart of major symbols — indices, large-capitalization stocks, cryptocurrency — where the 50 and 200 cross is the famous event. Intraday charts work identically with proportionally more crosses and deeper samples.
2. Watch the countdown as regime alarm: a shrinking bar count with a steepening fast average means the regime change is forming in front of you.
3. Read the settled history before trusting a fresh cross: a chart full of gray markers is telling you crossovers chop on this symbol; a chart of colored ones is telling you they trend.
4. Use the grade as confluence: an A-grade cross with volume, steep slope, and price confirmation is a different event from a flat, quiet drift-through.
5. Check the timeframe rows: a golden cross on your chart while the daily and weekly already sit bullish is alignment; against them, it is a counter-trend event.
6. The statistics rows are context, not commands — favorable rates describe this chart's history, never the next cross.
🔶 SETTINGS
- Average type and both lengths.
- Countdown: projection toggle, horizon, and approach alert lead.
- Statistics: sample cap, minimum samples to grade, shrinkage strength, Wilson z-score, markers to keep.
- Visuals: all colors, gradient fill toggle, cross-bar flash toggle.
- Themeable dashboard: position, four text sizes, title band, background, frame, grid, and three text colors.
🔶 ALERTS
- Golden Cross / Death Cross — the crossover confirmed at bar close.
- Golden Cross Approaching / Death Cross Approaching — the countdown first entered the alert lead window at current slopes.
- Grade A Cross — a cross fired with full quality confluence.
🔶 FREQUENTLY ASKED QUESTIONS
Does the indicator repaint? No. Crosses, grades, statistics, and marker settlement are evaluated on closed bars. The countdown is a live-bar projection and is explicitly presented as one.
Is the countdown a prediction? No. It is where the averages meet if both keep their current slopes. Slopes change; the countdown updates with them. Its value is showing the event forming, not promising the date.
Why are the sample counts small? Because genuine crosses are rare — a daily chart may produce only a handful in years of data. The engine shows honest small numbers with confidence bounds instead of inventing large ones, and lower timeframes build deeper samples.
Why did an old cross marker turn gray? It failed: twenty bars after that cross, price had not moved in the cross's direction. Gray markers are the audit trail working.
Which lengths should I use? The classic 50 and 200 define the famous event. Faster pairs produce more crosses and richer statistics at the cost of more noise.
🔶 CREDITS
The golden cross and death cross are classical moving-average crossover concepts in the public domain of technical analysis, watched across generations of market participants. The Wilson score interval is by Edwin B. Wilson (1927), and shrinkage estimation is standard public statistics. This script gratefully acknowledges that shared lineage. The convergence countdown and projection geometry, the outcome-settling markers, the per-symbol statistical grading, the living regime fill, and all code in this script are original work — no third-party or open-source script code was reused.
🔶 LIMITATIONS
Moving average crossovers are lagging by construction, and the countdown inherits the assumption of stable slopes. Cross samples are naturally small on higher timeframes; statistics mature with history and faster settings. Volume grading is less meaningful on symbols with unreliable volume reporting. Multi-timeframe rows describe state, not signals. No indicator replaces independent analysis.
🔶 DISCLAIMER
This script is provided strictly for educational and informational purposes. It is not financial advice, an investment recommendation, or a solicitation to buy or sell any financial instrument. Past behavior of any cross, projection, or statistic does not guarantee future results. Trading involves substantial risk. Always do your own research and manage risk independently. Индикатор

Pymander's EZ MTF Regime Filter**Pymander’s EZ MTF Regime Filter** is a multi-timeframe trend and market-condition tool designed to help traders see whether several larger timeframes are aligned bullish, bearish, or neutral.
The indicator analyzes five customizable timeframes and combines their readings into one easy-to-understand regime score ranging from **-100 to +100**.
* Scores above zero show bullish alignment.
* Scores below zero show bearish alignment.
* Readings near zero suggest mixed, neutral, or transitioning conditions.
* Readings near +100 or -100 show strong agreement across the selected timeframes.
Traders can choose between two methods for determining the trend on each timeframe:
* **EMA Alignment:** Looks at price position and the relationship between fast and slow moving averages.
* **Supertrend:** Uses volatility-based trend direction to classify each timeframe.
The final score is smoothed into a clear momentum-style wave, making it easier to recognize strengthening trends, weakening alignment, and possible regime changes.
Key features include:
* Five fully customizable timeframes
* Bullish, bearish, and neutral regime scoring
* EMA Alignment or Supertrend-based analysis
* Optional volume confirmation
* Optional local Supertrend confirmation
* Breakout-based BUY and SELL labels
* Bullish and bearish multi-timeframe divergence detection
* Adjustable score smoothing
* Clean area, line, and glow visuals
The BUY and SELL signals are designed to appear only when several conditions agree. The multi-timeframe score must show strong directional alignment, price must break a recent high or low, and the optional volume and Supertrend filters must confirm the move.
What sets EZ MTF Regime Filter apart from a basic trend indicator is its ability to combine several timeframes into one unified market reading. Instead of checking multiple charts individually, traders can quickly see whether short-, medium-, and higher-timeframe conditions are working together or conflicting.
The divergence markers can also help identify moments when price continues making new highs or lows while broader timeframe alignment begins to weaken, potentially warning of fading momentum or an upcoming shift.
Use this tool as a directional filter, confirmation layer, or market-regime guide alongside proper risk management, price structure, and a tested trading plan.
Best of luck with your trading. Stay disciplined, remain patient, and always protect your capital.
— **Pymander**
Индикатор

Pymander's EZ Trend Alignment**Pymander’s EZ Trend Alignment** is a clean and easy-to-read trend-following indicator designed to help traders quickly identify bullish and bearish market direction.
The tool combines the Commodity Channel Index with an ATR-based trailing trend line. In simple terms, the CCI measures whether momentum favors buyers or sellers, while the ATR calculation adjusts the trend line to current market volatility.
When bullish momentum is present, the line trails beneath price and displays green. When bearish momentum takes control, the line moves above price and displays red. The trailing logic helps traders follow established trends while recognizing possible shifts in direction.
The indicator includes two coloring styles:
* **Original Coloring:** Changes color based directly on bullish or bearish CCI momentum.
* **Trend Coloring:** Changes color based on whether the trailing line is rising or falling.
Pymander’s EZ Trend Alignment may be used to confirm market direction, filter long and short setups, identify possible trend changes, follow directional moves, and avoid trading against established momentum.
Its strength is simplicity. Rather than cluttering the chart with unnecessary signals, it provides a clear visual guide to help traders determine whether price, momentum, and volatility are aligned.
As with any indicator, use it alongside proper risk management, market structure, and a tested trading plan. No indicator can guarantee profitable results.
Best of luck in the markets, traders. Stay patient, remain disciplined, and protect your capital.
— **Pymander**
Индикатор

Adaptive Confluence Oscillator [ForexCracked]🔵 OVERVIEW
The Adaptive Confluence Oscillator scores four independent read-outs of the market on a continuous scale, weights them according to the current market regime, and plots the result as a single 0 to 100 line. Instead of asking "do my indicators agree, yes or no," it asks "how strongly does each one agree, and which of them should I be listening to right now."
It has no fixed overbought or oversold levels. The bands are calculated from the oscillator's own recent behaviour, so they widen when the market gets volatile and tighten when it goes quiet.
Signals confirm on candle close and do not repaint.
🔵 WHY THIS IS BUILT THE WAY IT IS
Most multi-indicator tools take a vote. RSI is oversold or it is not. That throws away most of the information: an RSI of 29 and an RSI of 12 are not the same signal, but a vote counts them identically. It also treats every indicator as equally relevant at all times, which is plainly false. Stochastic exhaustion means one thing in a strong trend and the opposite thing in a range.
This oscillator fixes both problems. Every component returns a continuous score, and the market regime decides how much each score is worth.
🔵 THE FOUR COMPONENTS (each scored from -1 to +1)
• Trend: how far price sits from its baseline EMA, measured in ATR units rather than in price. Distance matters, not just which side of the line you are on. Because it is measured in ATR, it reads the same on gold as it does on EURUSD.
• Momentum: RSI recentred around 50, so it contributes proportionally instead of flipping at a threshold.
• Impulse: the MACD histogram converted to a z-score against its own rolling deviation. This makes MACD comparable across symbols and timeframes without ever re-tuning it, which raw MACD values are not.
• Stretch: the Stochastic, recentred. This is the component that changes behaviour with regime (see below).
🔵 THE REGIME SWITCH (the part that makes it adaptive)
ADX decides whether the market is trending or ranging, and that changes two things.
First, the weights re-balance:
• Trending: Trend 0.35, Momentum 0.25, Impulse 0.30, Stretch 0.10
• Ranging: Trend 0.15, Momentum 0.25, Impulse 0.20, Stretch 0.40
Second, and more importantly, the Stretch component flips sign. In a trend, a stretched Stochastic confirms the move and pushes the score further in that direction. In a range, the same reading argues for a fade and pushes the score the other way. This is the behaviour a discretionary trader applies without thinking about it, and it is what a fixed vote cannot express.
🔵 ADAPTIVE BANDS
There are no 70/30 lines here. The upper and lower bands are the rolling mean of the oscillator plus and minus a multiple of its own standard deviation. A reading of 68 can be an extreme in a quiet market and completely unremarkable in a volatile one, and the bands reflect that.
• BUY: the score crosses above the upper adaptive band
• SELL: the score crosses below the lower adaptive band
🔵 DIVERGENCE
The script finds pivots on the score itself and compares them against price at those same bars. When price makes a higher high but the score makes a lower high, that is marked as a bearish divergence, and the mirror case as bullish. Divergences are labelled and have their own alerts. Because a divergence is anchored to a confirmed pivot, it prints a few bars after that pivot forms and never moves once printed.
🔵 THE DASHBOARD
The panel shows each component's live score, its current weight, the detected regime with the ADX value, and the oscillator against its adaptive bands. You can see exactly which component is driving the reading and why, rather than trusting a black box.
🔵 SETTINGS
• Baseline EMA 34, ATR 14, Trend Span 2.0 x ATR
• RSI 14, MACD 12/26/9, Stochastic 14
• ADX 14, trending above 22
• Band lookback 100, band width 1.0 x standard deviation
🔵 HOW TO USE
• Take signals where the dashboard regime agrees with the direction. A BUY in a trending regime is a continuation. A BUY in a ranging regime is a fade off the bottom of the range.
• Treat a divergence as a warning to tighten or take partials, not as a standalone entry.
• Raise the band width above 1.0 for fewer and stronger signals, lower it for more.
• Widen Trend Span on noisy symbols so ordinary volatility does not read as trend.
⚠️ DISCLAIMER
This is an analysis tool, not a prediction. A confluence score is a measure of agreement, and indicators can agree and still be wrong. Results depend on market conditions, settings, and your own execution and risk management. Shared for educational and research purposes. Not financial advice. Индикатор

Volatility Jump DetectorVolatility Jump Detector
This tool marks structurally significant price moves and tells you what kind of move each one was. It is an event detector, not a signal — it does not predict direction. It answers "did something real just happen here, and what was behind it?"
HOW JUMPS ARE DETECTED
Most "big candle" indicators compare a move to an ordinary volatility estimate, which has a circular flaw: a large jump inflates the very volatility measure used to judge it, so the biggest moves look less exceptional than they are.
This uses bipower variation (Barndorff-Nielsen and Shephard; Lee and Mykland), which builds the local volatility estimate from products of adjacent absolute returns. That construction is insensitive to a single large move, and it is computed excluding the current bar — so a jump cannot inflate its own threshold. A move is flagged when it exceeds a chosen multiple of that robust volatility, and the panel reports the exact sigma reading.
TWO INDEPENDENT CONTEXT AXES
INTENSITY — Is the recent jump rate elevated versus its own long-run baseline? Reported as a multiple with the underlying counts always visible, so you can see the sample behind the verdict. Note on method: a Hawkes branching-ratio estimate was implemented first and dropped. At a 4-sigma threshold real data yields only a handful of jumps per few hundred bars, far too few for count-variance statistics — it returned zero on every timeframe tested. A plain rate comparison is what sparse events can actually support, and below a minimum count the reading honestly says "insufficient" rather than printing a fabricated number.
VOLUME — Was the jump backed by participation, or did it slip through a thin book? A large move on heavy volume and the same move on nothing are different events. Auto-disables on instruments without a volume feed.
Optionally link the Risk & Levels Cockpit's exported levels, and jumps that fire through your invalidation level or at the point of control are flagged.
ON THE CHART
Direction-aware triangles mark each jump, colored by the intensity regime at that moment. The most recent jump is labelled with its sigma reading and volume tag. The background tints when jump intensity is elevated. The panel adapts to your chart theme and colors each row by meaning.
WORKS ON ANY MARKET AND TIMEFRAME
All lookbacks are in bars with no session, expiry, or clock anchors. Non-repainting: the robust volatility estimate excludes the current bar, and everything confirms at close.
LIMITATIONS
Not a signal and not investment advice. This marks events and describes them; it does not forecast what follows. An earlier version classified jumps as "ignition" versus "exhaustion" and measured the forward tendency of each — the measured continuation and reversal rates sat at base rate, so that classification was removed rather than kept as decoration. Jump detection depends on the threshold you choose; a lower threshold marks more moves and dilutes significance. Intensity needs a long baseline window because jumps are rare, and reports "insufficient" when the count is too low. Volume confirmation requires a volume feed.
CREDITS
Original implementation. Barndorff-Nielsen and Shephard bipower variation; Lee and Mykland (2008) jump test; jump-rate intensity comparison. Индикатор

Индикатор

Индикатор

Индикатор

Индикатор

Event Probability Engine [Quantum Algo]Event Probability Engine
====================================================
🔶 OVERVIEW
Event Probability Engine is a statistical probability indicator that answers one question at the close of every bar: based on the measurable conditions active right now, what is the historical probability that price closes higher one, three, and five days from today? Instead of subjective pattern reading, the script builds and maintains a live rolling database of forward returns conditioned on eighteen observable market events — day-of-week seasonality, oversold and overbought readings, volume spikes, streaks, range position, volatility regime, pivot touches, and an optional lunar control — then pools the currently active events into a single composite probability, displayed as a TODAY headline, a full per-event statistics table, and a shaded forecast cone projected on the chart.
It is designed for the daily timeframe. On other timeframes, the one, three, and five day horizons become one, three, and five bars.
🔶 WHAT IS AN EVENT STUDY?
An event study measures what a market historically did after a defined, observable condition occurred — for example, what happened over the next five days every time the Relative Strength Index closed oversold, or every Monday, or every time volume spiked two standard deviations above normal. This indicator runs eighteen such studies continuously, in real time, on the chart's own data, and keeps every study honest with the statistical safeguards described below.
🔶 WHY THIS SCRIPT IS ORIGINAL
1. A live event database in Pine. Each of the eighteen events maintains its own rolling, capped sample of forward returns at three horizons, tagged with the market regime at the moment the event fired — a self-updating event-study framework, not a fixed backtest.
2. Shrinkage estimation. Every win rate is pulled toward fifty percent by a configurable number of pseudo-samples. An event with fifteen samples cannot display an extreme probability, because fifteen samples cannot justify one.
3. Overlap correction. State-based events (for example, an oversold reading persisting for a week) generate autocorrelated, overlapping samples that inflate apparent sample size. The effective sample size is deflated by the horizon length before any confidence calculation.
4. Wilson score bounds. Next to each five-day win rate, the table shows the Wilson confidence lower bound computed on the corrected sample size — the number an event must clear before its edge deserves trust, not its raw point estimate.
5. Regime conditioning with fallback. When enough samples exist in the current regime (bull or bear, defined by the two-hundred period exponential moving average), statistics are computed on regime-matched samples only, marked ® in the table. A bear-market Thursday is not assumed to behave like a bull-market Thursday.
6. Quality-weighted log-odds pooling. Active events are combined by weighted log-odds — a method related to Bayesian evidence combination — rather than naive win-rate averaging, so one strong, well-sampled edge is not diluted by three weak ones.
7. A built-in falsification control. Lunar phase events are included deliberately so the engine can audit a popular claim empirically: if full and new moons carry no edge, their quality scores sit near zero and they contribute nothing to the composite. A probability framework should be able to demonstrate which inputs fail, not only which appear to work.
🔶 HOW IT WORKS
Event detection: On every bar close the script evaluates all eighteen conditions — Monday through Friday, adaptive or fixed oversold and overbought thresholds, volume z-score spikes, up and down streaks, range-low and range-high position, volatility expansion and compression by percentile rank, confirmed pivot support and resistance touches within an Average True Range distance, and the optional lunar events.
Database recording: Whenever an event was active one, three, or five bars ago, the realized forward return is stored in that event's arrays, first-in-first-out at a configurable cap, together with the regime tag from the moment the event fired.
Per-event statistics: The table reports, for every event, the shrinkage-adjusted win rate at each horizon, the Wilson lower bound, sample count, average forward return, profit factor, a zero-to-one-hundred quality score blending edge magnitude, sample sufficiency, and recent consistency, and the resulting directional bias.
Composite probability: Active events passing the minimum-sample filter are pooled by quality-weighted log-odds into the TODAY headline (next-day probability of an up close with a visual meter), the one, three, and five day composite row with expected returns and a strength grade, and a projected forecast path with a shaded plus-and-minus one standard deviation cone drawn from the current close.
Chart layer: Optional regime background tint, the regime line, live pivot support and resistance rails with prices, and historical event markers on the candles so past occurrences of every event can be reviewed directly on the chart.
🔶 HOW TO USE IT
1. Apply it to a daily chart of any liquid symbol — cryptocurrency, stocks, indices, forex, gold, futures. Let it load its history; sample counts grow with available bars.
2. Read the TODAY headline first: the next-day probability, the meter, and the expected one-day return.
3. Scan the table for the highlighted rows — those events are active right now. Judge each by its Wilson lower bound and quality score, not the raw win rate.
4. Use the composite row and forecast cone as context: STRONG requires both a meaningful probability distance from fifty percent and high average quality.
5. Treat readings near fifty percent as exactly what they are: weak evidence. This engine is intentionally built to display small honest numbers rather than large misleading ones.
6. Combine with your own analysis — the engine measures conditional history; it does not know tomorrow's news.
🔶 SETTINGS
- Database: sample cap per event, minimum samples for composite inclusion, minimum regime-matched samples, shrinkage strength.
- Events: oscillator length and thresholds (fixed or adaptive percentile), volume z-score, streak length, range lookback, pivot lookback and touch distance, lunar events on or off.
- Statistics: Wilson z-score (default 1.645, a ninety percent one-sided bound).
- Display: dashboard position and five text sizes, forecast cone, regime tint, regime line, pivot rails, candle markers.
🔶 ALERTS
- Composite Bias Change — fires once per bar close whenever the five-day composite bias flips state, with the current one-day and five-day probabilities in the message.
🔶 FREQUENTLY ASKED QUESTIONS
Does the indicator repaint? Statistics are recorded and evaluated on closed bars, and pivot events use confirmed pivots with their standard confirmation lag. The dashboard and forecast update on the live bar by design, as a dashboard should.
Why do most probabilities sit near fifty percent? Because genuine conditional edges in daily data are small, and the shrinkage and overlap corrections are built to say so. Extreme displayed probabilities on thin samples are the signature of a dishonest tool.
What does the ® mark mean? That event currently has enough regime-matched samples, so its statistics are computed only from the current bull or bear regime rather than the full history.
Why are moon phases in a statistics tool? As a falsification control. The engine should be able to show which inputs carry no edge — and the user can watch it do exactly that.
Can I use it intraday? Yes, but the horizons become bars instead of days, and day-of-week events lose their meaning. The design intent is the daily timeframe.
🔶 CREDITS
This script stands on standard, publicly documented statistical methods, gratefully credited: the Wilson score interval by Edwin B. Wilson (1927), Laplace-style shrinkage estimation, and the event-study methodology long established in quantitative finance. Their combination into a live, regime-conditional, overlap-corrected event database with quality-weighted log-odds composite pooling, implemented entirely in Pine Script with capped arrays and user-defined types, is original work — no third-party or open-source script code was reused.
🔶 LIMITATIONS
Probabilities derived from historical conditioning are estimates, not guarantees, and conditional edges in daily data are typically small. Sample databases need history to mature; young charts produce thin, heavily shrunk statistics by design. Day-of-week events assume a five-day session calendar. Regime conditioning depends on the two-hundred period regime definition. This is a research and confluence tool, not a standalone trading system.
🔶 DISCLAIMER
This script is provided strictly for educational and informational purposes. It is not financial advice, an investment recommendation, or a solicitation to buy or sell any financial instrument. Past statistical behavior does not assure future results. Trading involves substantial risk. Always do your own research and manage risk independently. Индикатор
