VWAP Choppy Market Detector [TradingFinder] Trend Range🔵 Introduction
Markets are not always clean. Sometimes price moves with a clear bullish or bearish direction, sometimes it stays inside a range, and sometimes it keeps shifting back and forth with no reliable structure. This indicator uses VWAP-based bands to make these market conditions easier to read directly on the chart, showing trend, range, and choppy price action through simple visual zones.
In trending markets, the bands remain more stable and highlight the dominant side of the market. Green zones show bullish pressure, while red zones show bearish pressure. When price moves sideways, the indicator marks the range area with purple zones and shows the Range High and Range Low, making the upper and lower limits of the consolidation easier to follow.
The choppy market signal comes from the behavior of the colors themselves. When the chart keeps changing between bullish, bearish, and range states, it reflects unstable price action, frequent market behavior shifts, and chaotic volatility. This makes the indicator useful for reading when the market has a clean direction, when it is trapped inside a range, and when price movement becomes too noisy or uncertain.
🔵 How to Use
Start by looking at the overall color behavior on the chart. The main purpose of this indicator is to show the current market environment through VWAP-based bands, so the first step is not to look for a single signal, but to understand the condition of the market. When the colors stay stable for a longer period, the market is usually showing a clearer structure. When the colors change repeatedly, the market is shifting between different states and price action is becoming less stable.
Green areas show bullish trend conditions. In this state, price is trading with stronger upward pressure and the market is moving with a clearer bullish bias. Traders can use this condition as a trend filter, a continuation filter, or a confirmation tool before looking for long setups with their own strategy. A stable green zone usually means the market is cleaner for bullish trend-following ideas compared to a market where the color keeps changing.
Red areas show bearish trend conditions. In this state, price is trading with stronger downward pressure and the market is moving with a clearer bearish bias. Traders can use this condition to filter short setups, confirm bearish continuation, or avoid taking long trades against the dominant market behavior. When the red zone remains stable, it shows that the bearish side of the market is more consistent.
Purple areas show range market conditions. In this state, price is moving inside a more limited structure instead of trending strongly in one direction. The upper and lower range boundaries can be used to understand where the market is consolidating. The upper boundary works as the Range High, while the lower boundary works as the Range Low. These levels help traders see the current sideways structure more clearly and follow how price reacts inside the range.
In a range market, traders can use the Range High and Range Low as visual reference levels. Price near the upper boundary may show that the market is testing the top of the range, while price near the lower boundary may show that the market is testing the bottom of the range. This can be useful for range analysis, mean-reversion setups, support and resistance reading, and identifying where price is likely to react inside a consolidation area.
Choppy market behavior is read through frequent color changes. When the chart keeps switching between green, red, and purple, it shows that the market does not have a clean direction. This kind of behavior usually means price is unstable, market bias is changing quickly, and volatility is becoming chaotic. Instead of treating these color changes as random noise, they should be read as the main warning sign of a choppy market.
One of the most useful applications of this indicator is avoiding poor trading conditions. Many strategies perform well in clean trends but struggle when the market becomes choppy. If the colors change too often and price fails to hold a stable condition, traders can use that information to reduce exposure, wait for a clearer structure, avoid overtrading, or be more selective with entries.
The indicator can also be used as a trend-following filter. When the market remains green, traders can focus more on bullish setups. When the market remains red, traders can focus more on bearish setups. This does not mean every green area is a buy signal or every red area is a sell signal. It means the market condition is more aligned with that side, and traders can combine it with their own entry model, price action setup, support and resistance level, or risk management plan.
Another use case is range detection. When the indicator marks a purple range, traders can quickly see that price is no longer moving with strong directional pressure. This helps separate trending conditions from sideways conditions. Range detection can be useful for traders who use consolidation breakouts, range trading, mean reversion, liquidity sweeps, or support and resistance reactions.
The indicator can also help with breakout context. Before a breakout, price often spends time inside a range. By watching the Range High and Range Low, traders can better understand where the range is forming and where a breakout attempt is happening. If price leaves the purple range and the market shifts into a stable green or red condition, traders can use that as extra context that the market behavior has changed from consolidation to directional movement.
For choppy market analysis, the most important thing is the speed and frequency of the color changes. A few normal changes can happen during transitions, but repeated switching shows that the market is unstable. This can help traders recognize fake breakouts, messy pullbacks, weak trend conditions, and periods where price does not respect a clean structure.
The timeframe setting controls the VWAP anchor period. Daily mode is more suitable for short-term and intraday analysis. Weekly mode gives a broader view of the current week’s VWAP structure. Monthly mode provides a higher-timeframe view and can be useful for swing trading or larger market context. Traders can choose the anchor timeframe based on the way they trade and the amount of market structure they want to see.
The Band Multiplier controls the width of the main VWAP bands. A wider band gives a broader market structure, while a smaller band keeps the bands closer to price. This setting affects how the trend and volatility structure is displayed on the chart. Traders can use it to match the indicator with different symbols, sessions, and volatility conditions.
The Range Multiplier controls the sensitivity of the range detector. A lower value makes the range detection more sensitive, so range areas may appear more actively. A higher value makes the range detection more conservative, so the indicator becomes more selective when marking range conditions. This setting is useful because different markets do not move the same way; some symbols are naturally smoother, while others are more volatile and noisy.
The VWAP line can be shown or hidden depending on the trader’s preference. When enabled, it gives a direct view of the VWAP reference line inside the band structure. Some traders may use it as a central fair-value reference, while others may prefer to keep the chart cleaner and focus only on the colored bands and market regime zones.
This indicator can be used by scalpers, intraday traders, swing traders, and market structure traders. Scalpers may use it to avoid fast choppy conditions and focus on cleaner short-term movement. Intraday traders can use it to read the daily or weekly VWAP structure. Swing traders can use weekly or monthly mode to understand broader market behavior. Price action traders can use it as a visual filter for trend, range, and unstable market conditions.
The best way to use the indicator is as a market condition tool, not as a standalone entry system. Its main value is helping traders understand when the market is trending, when it is ranging, and when price action is too choppy to read clearly. Once the market condition is clear, traders can apply their own strategy with better context.
🔵 Settings
TimeFrame : This setting defines the VWAP anchor period used by the indicator. Traders can choose between Daily, Weekly, and Monthly modes. Daily mode follows the current day’s VWAP structure, Weekly mode uses the current week’s VWAP structure, and Monthly mode shows a broader VWAP structure based on the current month.
Band Multiplier : The Band Multiplier controls the width of the main VWAP bands. A higher value makes the bands wider and gives more space around price, while a lower value keeps the bands closer to price. This setting affects how the indicator displays the main trend and volatility structure.
Range Multiplier : The Range Multiplier controls the sensitivity of the range detector. Lower values create High Range Sensitivity, so the indicator detects range conditions more actively. Higher values create Low Range Sensitivity, making range detection more selective and conservative.
Show VWAP Line : This option shows or hides the VWAP line on the chart. When enabled, the VWAP line can be used as the central reference inside the band structure. When disabled, the chart stays cleaner and the focus remains on the colored market condition zones.
🔵 Conclusion
Market conditions can change quickly, and not every move has the same quality. A clean trend, a structured range, and a choppy market need to be read differently. This indicator helps make that difference more visible by using VWAP-based bands and color behavior to show when price is moving with direction, when it is consolidating, and when the market is becoming unstable.
The main strength of the tool is its visual reading of market behavior. Stable green or red zones make trending conditions easier to follow, while purple zones highlight range structures with clear upper and lower boundaries. When the colors start changing frequently, that shift itself becomes an important warning that price action is noisy, unstable, and moving without a clean direction.
Overall, the indicator gives traders a clearer way to read trend, range, and choppy market conditions before making trading decisions. It is best used as a market environment filter, helping traders understand the current price behavior and decide whether the market is clean enough for their strategy or too chaotic to trade confidently.
Indicator

Indicator

Conformal Reversion Bands Self-Calibrating CoverageConformal Reversion Bands — Self-Calibrating Coverage
What it is
Ordinary bands lie about themselves. A Bollinger "2σ" band or an ATR band asserts a coverage it does not deliver — real price isn't Gaussian, so the band that's supposed to contain 95% of bars might actually contain 88% or 98%, and that fraction drifts as volatility changes. The label and the chart disagree.
Conformal Reversion Bands fix this. You choose the coverage you want (e.g. 90%), and the band's half-width is a nonconformity quantile that is tracked online so the realised coverage actually converges to your target — and self-corrects when it drifts. The indicator then displays target vs realised coverage live, so you can see the guarantee holding instead of taking it on faith. A breach of a calibrated 95% band means something precise: price did what it does under about 5% of the time — a genuine rare excursion, and a mean-reversion (fade) candidate back toward fair value.
How it works (and why this specific method)
Centre — a fair-value line the bands revert to: session VWAP by default (auto-fallback to a robust rolling median on symbols without reliable volume), or EMA / median by choice.
Score — the absolute deviation of price from the centre. Its running quantile is the band half-width.
Online calibration — this uses the quantile tracker ("conformal P control") of Angelopoulos, Candès & Tibshirani (2023), with an optional error integrator ("PI control"). This is deliberately chosen over the older Adaptive Conformal Inference (ACI): ACI adapts the significance level and can occasionally produce infinite or null intervals; tracking the quantile on the scale of the scores cannot degenerate that way, so the bands stay finite and well-behaved on live charts. ACI is in fact a special case of the tracker.
Volatility-normalized scores (locally adaptive) — scores are normalized by a local volatility estimate before calibration (the Papadopoulos–Gammerman–Vovk normalized-nonconformity idea), so the band width breathes with volatility bar-by-bar. This targets conditional coverage — not too wide in calm tape, not too narrow in fast tape — instead of only a global average.
Decaying step size — the learning step shrinks as calibration matures (Angelopoulos–Barber–Bates) for tighter long-run coverage, floored so the bands never stop adapting to new regimes.
Self-check — a trailing window measures realised coverage for both bands and reports how closely it tracks target. That readout is the whole point: it makes the band's core claim verifiable on your own chart. Note the honest theoretical ceiling: exact conditional coverage is impossible distribution-free; normalization gets most of the practical way there at negligible cost.
Everything advances only on confirmed bars: the band shown on a bar is calibrated on scores up to the previous bar, then that bar is tested against it — no hindsight fitting.
How to use it
Add to any liquid symbol/timeframe; set the coverage you want for the inner and outer bands. Defaults suit index futures; change the price/volume sources in Data source for any other market.
Read the dashboard headline first: it states CALIBRATED / ADAPTING / WARMING in plain language, with a colour anyone can read at a glance. When the inner and outer rows show target and realised % matching (✓), the bands are provably doing their job.
Treat an outer-band breach as a statistically rare excursion — a fade-toward-centre candidate (optional close-back-inside confirmation).
Watch COMPRESSION: a low band-width percentile means the bands are unusually tight (a volatility squeeze — expansion often follows); a high percentile means unusually wide.
Divergences (price vs the band's own normalized deviation, or RSI — your choice) are drawn as lines on price for context.
The dashboard and the identity label are separate toggles; the price/volume sources, coverage targets and every window are adjustable. Works as an honest, self-calibrating replacement for Bollinger/Keltner/ATR bands anywhere you use deviation bands.
What makes it original
Almost nothing on PulseWire ships real conformal prediction, and — as far as the author is aware — nothing ships the modern quantile-tracker / PI-control variant with a live coverage readout that proves the band's claim on-chart. The contribution is bringing a 2023-frontier uncertainty-quantification method to price bands in a form a trader can verify at a glance, rather than a σ-multiplier that only pretends to a coverage level. The band-width compression read and the band-native divergence are natural, honest by-products of the same construction — context, not a signal service.
Concept credits
Conformal prediction — V. Vovk, A. Gammerman, G. Shafer. Normalized nonconformity — H. Papadopoulos, A. Gammerman, V. Vovk (2008). Adaptive Conformal Inference — I. Gibbs & E. Candès (2021). Quantile tracker / Conformal PID control — A. Angelopoulos, E. Candès & R. Tibshirani (2023). Decaying step — A. Angelopoulos, R. Barber, S. Bates (2024). VWAP — classical. Implementation and charting design are the author's own.
Important disclaimer
Research and education only. Not financial advice, not a signal service, not a guarantee of future results. Coverage is a statistical property of the band width — it is not a claim that fading breaches is profitable. The readout is descriptive of the past on the current chart, not a forward guarantee. Validate independently, apply realistic costs and slippage, and manage your own risk. Indicator

Grimes KC: MTF Volatility Regimes### 🌐 Overview
**Grimes KC: MTF Volatility Regimes** is an advanced Multi-Timeframe (MTF) Volatility Regime Mapping System. The indicator is built upon the robust foundation of **Adam Grimes' Keltner Channels (KC)** and synthesized with the multi-layered volatility analysis inspired by **Mark Whistler's Wave PM** and **John Carter's TTM Squeeze**.
This indicator is NOT just a tool that paints colors on your background. It is a high-dimensional market map that seamlessly merges **Statistical Price Extremes (Spatial Dimension)** with **MTF Volatility Cycles (Temporal Dimension)** through a two-step framework.
---
### 🔬 The Two-Step Analytical Framework
#### Step 1: Statistical Price Extremes & Tail Events (Spatial Dimension)
The core structure utilizes a dual-layered MTF Keltner Channel. Statistically, the probability of price simultaneously piercing outside the outer bands of **both the Chart Timeframe and the Higher Timeframe at the exact same time is extremely low (a rare tail event)**.
However, this extreme breakthrough presents **two diametrically opposed possibilities**: it could either be the birth of a massive, explosive **"Band-Walk" (institutional trend initiation)**, or a severe **"Mean-Reversion Snapback" (an overextended statistical anomaly ripe for a fade)**. By plotting these multi-layered price boundaries, the indicator visually maps these high-stakes junctions, allowing traders to monitor which of the two opposite paths the market will choose.
#### Step 2: Quantified Volatility Cycle Serialization (Temporal Dimension)
To eliminate raw price noise, the indicator continuously measures the historical percentile (0–100%) of the band widths over a user-defined lookback period. It dynamically normalizes and serializes the MTF volatility cycle (Contraction & Expansion). The interplay between long-term institutional compression and short-term retail momentum is instantly visualized, telling you whether the market is loading energy, expanding in a healthy trend, or reaching statistical exhaustion.
---
### 🎨 The 4 Volatility Regimes & Actionable Strategies
#### 1. 🟦 Double Squeeze (Both Timeframes <= 10%)
* **Market State:** Severe volatility compression across both short-term retail and long-term institutional participants. The market energy is coiled like a tight spring.
* **Strategy:** **Prepare for Breakout.** Do not trade inside this zone. Wait for the background color to turn off and look for a heavy momentum expansion.
#### 2. 🟨 Early Breakout / Volatility Illusion (Chart TF >= 90% / HTF <= 10%)
* **Market State:** Short-term volatility spikes while the macro timeframe remains in a heavy squeeze. According to **Mark Whistler's theory**, this represents a *"Volatility Illusion"* that lacks true institutional liquidity.
* **Strategy:** **Monitor for Fade or Breakout.** This regime presents **two diametrically opposed scenarios**:
1) **The Fade (Mean-Reversion):** The price expansion fails as a "False Breakout," and the price is rapidly snapped back to the center by the gravity of the HTF squeeze. This offers a high-probability short-term counter-trend entry.
2) **The Lead (Trend Initiation):** The short-term momentum is so powerful that it forces the higher timeframe to break its squeeze, dragging the HTF into an expansion and starting a massive **"Band-Walk"**.
Always wait for price action to confirm which scenario unfolds before execution.
#### 3. 🟪 Pullback / Trend Continuation (Chart TF <= 10% / HTF >= 90%)
* **Market State:** The higher timeframe is in a powerful, established trend, while the lower timeframe chart takes a temporary breath (forming tight ranges, flags, or pennants).
* **Strategy:** **High-Probability Pullback Entry.** This is the ideal regime for trend-followers. Look to buy the dips or sell the rallies when the short-term chart expands back out in the alignment direction of the HTF trend.
#### 4. 🟥 Double Expansion (Both Timeframes >= 90%)
* **Market State:** Statistical exhaustion. Both macro and micro trends have reached their theoretical and statistical upper limit over the lookback history.
* **Strategy:** **Take Profit / Do Not Chase.** The market is severely overextended. Tighten trailing stops or secure your profits immediately. Absolutely avoid chasing new positions here.
---
### ⚠️ Crucial Trading Guide
**IMPORTANT:** This indicator is a Volatility Regime Map, NOT a raw buy/sell signal generator. It provides 1-dimensional volatility structure (width) and multi-timeframe regime contexts.
To achieve a complete institutional execution setup, you must combine these background colors with a directional tool, such as the slope of the Moving Average or price action breakout direction, to filter your trades.
---
### ⚙️ Best Practices & Inputs
* **Timeframe Selection (HTF Input):** It is **highly recommended** to set the Higher Timeframe (HTF) to **1-Hour (60) or higher** (e.g., 240 or D) relative to your lower timeframe charts (like 5-min or 15-min). This allows the algorithm to accurately capture macro institutional cycles.
* **Fully Customizable Visuals:** Unlike rigid scripts, you can customize all 4 regime colors, line colors, and background opacities directly from the Input Parameter settings to seamlessly match your Dark or Light chart themes.
---
*Credits: Conceptualized based on the volatility market microstructures of Adam Grimes and Mark Whistler. Developed with the assistance of an AI coding partner.*
Indicator

Strategy

Monotonic Trend Consensus [QuantAlgo]🟢 Overview
Monotonic Trend Consensus is a trend-following oscillator built on rank correlation between price and time rather than moving averages or crossovers. It scores how consistently price is ordered across multiple lookback windows and combines them into a single bounded reading on a -1 to +1 scale, holding the same meaning on any symbol or timeframe so traders can separate a broadly aligned trend from directionless noise and read when a move has stretched to saturation.
🟢 How It Works
The foundation is Spearman rank correlation between price and time, computed over each active window. Closes inside the window are ranked against one another, time forms its own rising sequence of ranks, and the difference between the two collapses to a single coefficient (rho):
float price_rank = less + (eq + 1.0) / 2.0
float time_rank = float(len - i)
float rho = 1.0 - 6.0 * sumd2 / denom
The coefficient reads +1 when each bar closes above the last in unbroken order, 0 when there is no consistent order, and -1 when each bar steps lower. Because it scores ordering rather than smoothing price into a line, it reflects the current window directly rather than trailing behind it, though it still needs a full window of bars to form. Ranking also limits the pull of any single outlier bar, and the bounded output is what lets one threshold hold across markets without rescaling.
A single window describes direction; the tool runs several and averages them into a consensus spanning fast, medium, and slow horizons:
consensus := array.avg(rhos)
Agreement is then measured as the share of windows leaning the same way as the consensus, and this conviction figure must clear a floor before a direction prints, working alongside the strength threshold:
conviction := 100.0 * agree / active
raw_bull = consensus > threshold and conviction >= min_conviction
raw_bear = consensus < -threshold and conviction >= min_conviction
A reading registers only when both clear at once: consensus past the threshold and windows aligned enough to meet the conviction floor. Fail either and the line stays flat. With Show Neutral on, those flat stretches reset to neutral; with it off, the line holds its last direction until the next qualifying move.
🟢 Signal Interpretation
▶ Bullish Consensus (Green): Consensus sits above the upper threshold with enough windows aligned, meaning recent bars are ordered upward across horizons. Trend traders read the turn into green as a possible long or continuation as the score presses toward +1. Mean-reversion traders treat a reading pinned near +1 as a stretched, broadly-agreed advance rather than a buy, and look to fade only once the line rolls back off the extreme, since the score can hold high through a sustained trend.
▶ Bearish Consensus (Red): Consensus sits below the lower threshold with conviction met, with bars ordered downward across horizons. Trend traders read the turn into red as a possible short or continuation as the score presses toward -1. Mean-reversion traders treat a reading pinned near -1 as a saturated decline where a bounce becomes more plausible, and look to fade on the turn back up rather than at the low itself.
▶ Neutral (Gray): With Show Neutral on, the line goes gray whenever no direction qualifies, either because consensus sits inside the threshold or conviction falls short. The zero line acts as the balance point and behaves like support or resistance for the reading itself: a score rejected at zero from above points to bullish order reasserting, a score capped at zero from below points to bearish order holding, and a clean break through leans toward a regime change. Reading this midline behavior against price is where market structure tools pair well, separating a base building above a structural level from a coil forming under overhead supply. Trend traders stand aside until the line commits; mean-reversion traders find less to work with here than at the edges.
▶ Reading the Extremes: The axis caps at +1 and -1, marking maximum agreement across every active window. Trend traders take an extreme as a sign a move is still in force; mean-reversion traders take it as a stretched zone and watch for the score to turn back toward zero as agreement breaks. An extreme that aligns with a known structural level gives a fade a cleaner reference than one in open space, and neither read holds on the extreme alone, since a strong trend can stay saturated before it cools.
🟢 Features
▶ Preconfigured Presets: Three setups map to different holding styles. "Default" suits swing work on 4-hour and daily charts, pairing a mid-range window spread of 8, 13, 21, and 34 with a 0.35 threshold and a 60% conviction floor, so a direction needs both strength and agreement before it flags. "Fast Response" pulls the windows in to 5, 8, 13, and 21 and eases the threshold and conviction floor so the reading keeps pace with quicker intraday swings. "Smooth Trend" stretches the windows out to 21, 34, 55, and 89 and raises both gates for daily and weekly position trading, where a premature flip costs more than a late one. Choosing a preset takes over the manual window, threshold, and conviction fields.
▶ Built-in Alerts: Four conditions track every change in state. "Bullish Trend Signal" triggers when the consensus confirms to the upside. "Bearish Trend Signal" triggers when it confirms to the downside. "Trend Lost / Neutral" triggers when an active direction fades back to flat, which is also the event a mean-reversion trader watches for after an extreme. "Any Trend Change" rolls the two directional events into a single notification for anyone who wants one alert covering both ways.
▶ Visual Customization: Six color schemes (Classic, Aqua, Cosmic, Cyber, Neon, and Custom) carry a matched pair of bullish and bearish colors through the consensus line, its tiered gradient fill down to the zero baseline, and the optional bar and background tints. Marker lines sit at the positive and negative trigger levels to show the zone the consensus has to cross, and each window's own score can be switched on as a faint backing line so you can see which horizons are driving or dragging the combined figure. Bar coloring paints the price candles in the active trend color at an adjustable transparency, while background coloring spreads that tint across the pane.
Indicator

Adaptive Consensus Trail Structure, Regime & SelfAdaptive Consensus Trail — Structure, Regime & Self-Test
A trailing stop that sits on the agreement of several structural references, adapts to the market regime, and forward-tests its own signals so the numbers it shows are measured, not asserted.
What it is
Most trailing stops follow one idea — an ATR band, a SuperTrend, a moving average. This one places the stop where a small committee of independent structural references agree, reads how confident that agreement is, widens or tightens itself according to the market regime, and then continuously audits its own flips and reports the edge it actually produced on your data.
The committee has five members, each locating support/resistance from a different lens:
Anchored VWAP band — fair value for the session/week/month
Session / naked volume Point-of-Control — the price the most volume traded at, carried forward until revisited
Fair-Value-Gap midpoint — unfilled imbalance
Swing pivot — structural memory
Order-flow absorption — where aggressive buying/selling was absorbed (via Bulk Volume Classification)
Why these parts belong in one script (mashup justification)
Each reference alone whipsaws on an index, and each is right in different conditions. They are combined because they correct one another, and the entire value of the script is in that interaction — not in any single line:
A reliability layer scores every reference's historical respect rate with a Wilson lower bound, so a reference that keeps getting ignored loses its vote instead of dragging the stop around.
A consensus layer keeps only the densest agreeing cluster of references, so the stop sits on genuine agreement rather than on an average nobody respects, and far-apart references never force a permanent "no signal."
A regime layer (efficiency ratio + ADX + band-width + a volatility-cluster read + a Hurst persistence estimate) widens the band and tightens the flip confirmation in chop — this is what removes the whipsaw.
A self-test layer forward-scores every flip and recalibrates the confidence number so it means what it says.
Split apart, these are five overlays that each mislead in a range. Wired together, they are one self-correcting, self-auditing trail. That is the reason for combining them.
How it works (six layers)
References are computed on the bar close.
Reliability — rolling-capped respect counts per reference give a Wilson lower-bound "trust." POC is a magnet, so it is judged by forward reaction (did price reject away before breaking through?), not a same-bar close, which keeps its trust honest.
Consensus — the densest agreeing cluster within an ATR band becomes the trail's target; the envelope and confidence are measured on that cluster only.
Adaptive backbone — an efficiency-ratio / regime-adaptive band (Adaptive, Chandelier, or Blend) that widens in chop.
The trail — high confidence pulls the stop toward structure (floored a minimum ATR off price); low confidence rides the wide band, so it flips less in noise.
Self-test — every flip is forward-resolved by triple-barrier first-touch against an unconditional base rate, split by strength tier and by regime, with a walk-forward in-sample→out-of-sample check, a runs test of independence, a Brier score, and a confidence recalibration.
How to use it
Read the top banner for the one-line bias — BULLISH / BEARISH / WAIT — and the READ legend for what to do. The coloured line is your stop: support in an uptrend, resistance in a downtrend. BUY / SELL labels print only on confirmed, sufficiently-confident, higher-timeframe-aligned flips.
The dashboard gives detail top-down: each reference's level and trust, the consensus, raw → calibrated confidence, regime (with Hurst and ADX), the higher-timeframe invalidation stop, and a FULL / HALF / STAND-ASIDE suggestion.
Before sizing, open the Self-Test panel and read the Edge column (hit% − base%), not the raw hit-rate. A ★ means the edge's confidence interval clears the base rate. Prefer signals where the walk-forward change isn't badly negative and the runs test isn't "streaky." Being honest about it: on many indices this tool shows real edge in range and volatile regimes on higher timeframes and little-to-none on very low timeframes or once a trend is already confirmed — the panel makes that transparent so you can pick your spots.
Works on any market
Set the Price source, and for symbols with no native volume set a Borrow-volume proxy (e.g. a futures contract). The panel theme adapts to your chart background automatically. Backbone: Adaptive / Chandelier / Blend. Absorption: order-flow (BVC) or simple. An optional intrabar resolution builds a finer volume profile where available.
Originality
The committee-of-references design, the cluster-not-average consensus, the reliability weighting that lets references lose their vote, the forward-reaction POC respect test, and the confidence self-calibration are the author's own work. The underlying techniques are standard and fully credited below.
Non-repaint
References, regime, consensus and the trail all evaluate on the close of the bar; the live bar is provisional and settles on close. Self-test events are logged and resolved only on confirmed bars and resolve on bars after their trigger at fixed barriers, so hit / base / edge use no look-ahead. The higher-timeframe stop uses a lookahead-off request.
Concept credits
Wilson score interval (E. B. Wilson); efficiency ratio (P. Kaufman); ADX / DMI / ATR / volatility-stop lineage (J. W. Wilder); anchored VWAP (industry standard); volume profile / value area / point-of-control — Market Profile (J. P. Steidlmayer, developed by J. F. Dalton); triple-barrier first-touch labelling (M. López de Prado); runs test of randomness (A. Wald & J. Wolfowitz); rescaled-range / Hurst exponent (H. E. Hurst); Brier score (G. W. Brier); Bulk Volume Classification / VPIN (D. Easley, M. López de Prado & M. O'Hara); reliability-bin (isotonic-style) calibration is standard forecasting practice.
Limitations & disclaimer
"Absorption" is a volume proxy — base data has no true tick order flow, so the buy/sell split is estimated from bar moves, not measured. Confidence is context, not a promise of profit. The self-test is descriptive of past behaviour on the loaded symbol (fixed barriers, no costs or slippage) — a study aid, not a backtest and not a guarantee. A measured edge is what flips did historically here, not a forecast.
This script is for research and education only. It is not financial advice, not a recommendation to buy or sell, and not a guarantee of any outcome. Trading carries risk of loss; your decisions are your own. Test on your own data and use independent risk management before relying on it. Indicator

RichmondHillCM - Liquidity Stress Index V 1.2RichmondHillCM - Liquidity Stress Index V 1.2
The LSI tracks the spread between SOFR (Secured Overnight Financing Rate — the cost of borrowing cash overnight against Treasuries in the repo market) and IORB (Interest on Reserve Balances — the risk-free rate the Fed pays banks on reserves held at the Fed), expressed in basis points.
Why it matters
IORB acts as a soft floor for money-market rates: a bank has little incentive to lend cash below what it can earn risk-free at the Fed. So the position of SOFR relative to IORB is a direct read on how scarce cash is in the funding system.
LSI below 0 (aqua): SOFR trades under the IORB floor. Reserves are abundant, repo plumbing is easy, funding conditions are comfortable.
LSI above 0 (red): SOFR is bid above the floor. Cash is getting scarce, balance-sheet and repo capacity are starting to bind, and reserves are sliding from "abundant" toward "scarce."
Sustained positive prints are a classic early-warning signal of funding stress — the September 2019 repo blow-up being the textbook example. Watching this spread helps anticipate when the Fed's reserve backdrop is tightening enough to force a policy response (standing repo facility usage, balance-sheet adjustments, or an end to QT).
How to read it
Zero line = the IORB floor.
Dashed line = a configurable stress threshold (default 5 bps). When LSI breaks above it, the background shades red to flag an elevated-stress regime.
The further and longer LSI stays positive, the more acute the funding pressure.
Inputs
Smoothing (SMA length): 1 = raw daily spread; raise to filter day-to-day noise.
Stress threshold (bps): the level above which funding stress is flagged.
Notes
SOFR and IORB are sourced from FRED and published daily, with IORB stepping only on FOMC decisions — so on intraday charts the daily values hold flat. The daily timeframe is the honest resolution for this gauge. Each leg is requested separately and differenced in-script for robust alignment rather than relying on a spread symbol.
Original concept credit: @gstoyanov. Released under the Mozilla Public License 2.0. Indicator

Indicator

Compression / Release - Yang-Zhang percentileA volatility-state indicator that shows whether a market is coiled or expanding. It needs no options data and works on any symbol — stocks, futures, FX, crypto.
To be clear about what it is: this measures realized volatility, not implied. It computes Yang-Zhang volatility (which uses the full OHLC bar, so it captures intrabar range and handles overnight gaps and drift — more efficient than a close-only measure) and ranks it against the instrument's own recent history. It describes the present and the past only; it carries no forward-looking or market-expectation information. Some scripts present the same math as a "synthetic IV rank," which is a misleading label — there is no implied volatility here.
What you see:
The yellow line is Compression, a 0–100 percentile. Low means current volatility is narrow relative to its own history (compressed, coiled); high means it is wide (already expanded). It uses ta.percentrank, the IV-percentile flavor that counts every day in the lookback, which is more robust to single-day spikes than range-based IV rank.
The columns are Release, drawn from a zero baseline: the change in the compression percentile over the release window. Green columns up mean volatility is expanding now; red columns down mean it is contracting now. Each bar is single-sided. This measures expansion as it happens — it does not predict it.
The green dot marks a Release start: the bar the compression line climbs back above the compression level, i.e. volatility leaving the squeeze zone.
How to read it together: the line tells you where you are (high or low in the volatility distribution), the columns tell you which way it is moving. The cleanest "loaded" state is the line near 20 with columns flat or turning green; the "already expanded" state is the line pinned near 100.
Inputs: Yang-Zhang window (default 20, ~1 month). Compression percentile lookback (default 252 ≈ 1 year — the standard IV rank/percentile convention; shorter reacts faster to regime shifts but loses the annual frame). Release window (default 10). Compression/expansion levels (20 / 80). Best read on a daily chart.
Limitations, stated plainly: direction is never implied — a release can resolve up or down, so a green column is not a buy signal. It is a measurement of state, not a timing signal; the line can stay near an extreme for a long time during sustained regimes and is not a reversal trigger. Pair it with your own trend tools for direction. Indicator

Indicator

Adaptive Supertrend [ForexCracked]🔷 OVERVIEW
Adaptive Supertrend is a trend-following tool that automatically adjusts its sensitivity to current market volatility. A classic Supertrend uses one fixed factor, which whipsaws in choppy conditions and lags in calm ones. This version measures the live volatility regime and scales the ATR factor between a low and a high setting, so the trail tightens when volatility is low and widens when volatility is high.
🔷 CONCEPTS
Supertrend trails price using an ATR band whose width is set by a "factor." Instead of one fixed factor, this script ranks the current ATR against its own recent range (a 0–100 volatility percentile) and maps that rank onto a factor between your Min and Max settings:
• Low volatility → smaller factor → tighter trail, earlier signals. • High volatility → larger factor → wider trail, fewer false flips.
🔷 HOW TO USE
• Stay with the trend while the line sits below price (up) or above price (down). • A flip of the line marks a potential trend change, shown with a Buy or Sell label. • Read the Info panel for the live trend and the current volatility regime (Low / Medium / High). • Combine it with structure or support and resistance for confirmation, and always use a stop. No single indicator is a complete system.
🔷 SETTINGS
• ATR Length — lookback for the ATR band. • Min Factor / Max Factor — the range the factor adapts between. • Volatility Lookback — bars used to rank the current volatility. • Style — Buy/Sell labels, gradient fill, info panel, bar coloring, and colors.
🔷 ALERTS
• Buy (flip up) and Sell (flip down).
Free and open-source. Educational tool, not financial advice. Indicator

Position Size Calculator - Risk Manager, Risk/Reward & L[LunqFX]Risk Manager is an on-chart position size and risk/reward calculator for PulseWire that turns proper risk management into one click. Set your account size and risk per trade %, and it instantly gives you the exact position size (units / lots / contracts / shares), your risk and reward in dollars, the risk/reward ratio, and the breakeven win rate you need to be profitable — all visualized as clean risk and reward zones right on the chart. It works out of the box with an auto ATR setup (Entry / Stop Loss / Take Profit placed for you), or type your own levels. Built in Pine Script v6, it works on forex, crypto, stocks, indices, futures, gold (XAUUSD) and Bitcoin (BTCUSD), on any timeframe — because it sizes risk, not signals. Keywords: position size, position sizing, risk management, risk reward, risk/reward ratio, lot size calculator, money management, stop loss, take profit, R multiple, risk per trade, breakeven win rate, Kelly criterion, day trading, swing trading, scalping.
◆ WHY THIS MATTERS
Most traders blow accounts not because of bad entries, but because of bad position sizing and inconsistent risk. Professionals risk a fixed small % per trade (commonly 0.5–2%) and know their risk/reward before they click buy. This tool enforces that discipline on every trade — no spreadsheets, no external calculators.
◆ WHAT IT DOES
Exact position size from your account balance and risk %, in units, lots, contracts, shares or coins.
Risk and reward in account currency and as a % of account.
Risk/reward ratio with a clean visual meter.
Breakeven win rate — the minimum win rate needed to be profitable at your current R:R (a metric most calculators skip).
Visual risk zone (red) and reward zone (green) drawn between Entry, Stop and Target.
Optional fractional Kelly suggested risk %.
A modern, colour-coded dashboard.
◆ HOW IT WORKS
Auto mode (default): Entry is set at price, Stop at a chosen ATR distance, and Target at your chosen R multiple — a valid setup appears instantly on any instrument.
Manual mode: turn Auto off and enter your own exact Entry / Stop / Target prices in the settings.
Position size = (account balance × risk %) ÷ (distance from entry to stop). This guarantees that if the stop is hit, you lose exactly your chosen risk %.
Reward = position size × distance to target; R:R = reward ÷ risk.
Breakeven win rate = 100 ÷ (1 + R:R) — e.g., at 2R you only need to win >33% of trades to break even.
Lots/contracts = units ÷ your contract size (100000 for a forex standard lot, 1 for stocks/crypto, your multiplier for futures).
◆ HOW TO USE IT
Set Account balance and Risk per trade % once (e.g., 1%).
Pick Auto direction (Long/Short) or switch to manual and place your real Entry/Stop/Target.
Read the Position size — that is exactly how much to trade so your loss at stop = your set risk.
Check the R:R meter and Breakeven — only take trades whose math fits your strategy’s win rate.
Use the red/green zones to see risk and reward visually before entering.
Adjust Contract size to match your instrument (forex lots, futures multiplier, etc.).
◆ SETTINGS
Trade Setup (auto ATR or manual prices, direction, ATR stop, target R), Account & Risk (balance, risk %, contract size, size label), Kelly (optional), Visuals (box length, neon candles), Panel (text size, position, colours).
◆ ALERTS
Price hit Entry · Price hit Stop · Price hit Target.
◆ ORIGINALITY
This is original work. The auto-ATR setup engine, the account-aware sizing, the visual risk/reward zones, the colour-coded dashboard with the R:R meter and the breakeven-win-rate readout are all my own implementation. No third-party code is used.
◆ LIMITATIONS
This is a planning and sizing tool, not a signal generator — it does not tell you when to buy or sell.
Position size assumes your account currency matches the quote currency; for cross-currency pairs or unusual contracts, set Contract size to match your broker’s lot/units.
The auto ATR setup is a starting template — always adjust Stop and Target to real structure.
Results depend on the inputs you provide (balance, risk %, contract size); double-check them for your broker.
◆ NON-REPAINTING
This is a calculator: it draws from your inputs and the current price and never alters historical bars.
Risk Manager is an educational tool, not financial advice. Trading involves risk of loss. Always do your own research and manage risk responsibly. © LunqFX. Indicator

Indicator

Multi-Indicator Confluence Strategy Automator [MarkitTick]💡 A comprehensive, multi-dimensional technical analysis suite engineered to evaluate market conditions through a rigorous synthesis of trend, momentum, volatility, and cross-asset correlation metrics. Designed for traders who require a systematic approach to market entry and risk management, this script aggregates signals from multiple proven indicators and applies advanced statistical filters to minimize false positives. By unifying foundational technical analysis with advanced mathematical concepts like the Hurst exponent and momentum inflation, this tool provides a highly objective, data-driven environment for evaluating market structure and defining structured trade parameters.
✨ Originality and Utility
Standard trading methodologies often rely on isolated indicators, which can lead to high failure rates in dynamic market environments. The originality of this script lies in its robust confluence engine, which demands simultaneous alignment across multiple independent market dimensions before generating a signal.
Instead of merely stacking moving averages, this suite integrates a strict Boolean gating system that evaluates:
A primary directional baseline derived from a Hull Moving Average combined with an Average True Range volatility buffer.
A directional movement and momentum confirmation matrix utilizing the Average Directional Index and Commodity Channel Index.
Dynamic volume filtering to ensure market participation supports the price action.
Advanced statistical gating mechanisms, including confluence decay, regime detection, and cross-asset correlation analysis.
This utility is exceptionally valuable for systematic traders, as it translates complex, multidimensional market data into a highly legible, unified dashboard while automatically projecting risk-adjusted stop-loss and take-profit levels dynamically based on current market volatility.
🔬 Methodology and Concepts
● The Confluence Engine
The core of this strategy revolves around a scoring system that evaluates bullish or bearish alignment. A valid signal requires a minimum confluence score, calculated by assessing the following core components:
• Baseline Trend
The script utilizes a Hull Moving Average to determine the primary market bias. To eliminate noise, a volatility buffer equivalent to a fraction of the Average True Range is applied, ensuring that only definitive breakouts beyond the baseline are considered valid directional shifts.
• Directional Movement (ADX/DMI)
The first confirmation layer relies on the Average Directional Index alongside the Directional Movement Indicators. A trend is only considered active if the ADX exceeds a user-defined threshold, and the relationship between the positive and negative directional indicators defines the bias.
• Momentum Oscillators (CCI)
The second confirmation layer employs the Commodity Channel Index to measure the current price level relative to an average price level over a given period. Bullish or bearish confirmation requires the CCI to pierce specific upper or lower thresholds.
• Volume Validation
A volume filter ensures that signals are backed by significant market interest. The current period's volume must exceed a rolling exponential moving average of historical volume, multiplied by a strict sensitivity factor.
• Advanced Gating Filters
Confluence Decay: A time-based penalty system that degrades the value of a signal if the confluence state persists for too long without triggering an entry, preventing late entries into exhausted trends.
Hurst Regime Detector: Classifies the market as trending or mean-reverting, gating signals that conflict with the overarching statistical regime.
Momentum Inflation Ratio: Normalizes current price velocity against historical volatility to detect and filter out exhaustion spikes.
Cross-Asset Lead-Lag: Computes the Pearson correlation against a secondary asset to confirm macroeconomic or sector-wide alignment before entry.
🎨 Visual Guide
The script employs a highly intuitive visual hierarchy designed to keep the chart clean while providing maximum data density.
● Chart Elements
• Heatmap Candles
The standard price candles are color-coded based on the baseline trend state. Bullish bars are colored a vibrant teal, bearish bars are marked in a distinct red, and neutral states default to a muted slate blue. This visual heuristic allows traders to instantly recognize the dominant market regime without processing raw numerical data.
• Signal Markers
When all confluence conditions and advanced gates are met, the script plots distinct entry markers: small upward-pointing triangles below the bar for long signals, and downward-pointing triangles above the bar for short signals.
• Risk Management Levels
Upon a confirmed signal, the script dynamically draws horizontal lines representing the trade parameters:
Entry Line: A dashed, neutral-colored line projecting the exact trigger price.
Stop Loss (SL): A dashed, red line projected against the trend based on a multiple of the Average True Range.
Take Profit (TP1, TP2, TP3): Three dotted, green lines representing scaled exit targets, dynamically calculated using expanding volatility multiples.
Each line is accompanied by a precise price label anchored to the right side of the chart.
● The Information Dashboard
A comprehensive table is anchored to the top right of the screen. It displays the real-time status of the Baseline, Confirm 1, Confirm 2, Volume, Exit status, and the aggregate Score. Furthermore, it outputs the exact values for ADX, ATR, Decay Age, Hurst Exponent, Momentum Inflation, Baseline Distance-Integral, and Lead-Lag Correlation, using a color-coded text system (Green for bullish/favorable, Red for bearish/unfavorable, Yellow for warnings).
📌 Note : the best way to resolve visual overlap is to navigate to the Object Tree and drag the indicator above the main chart layer, or simply hide the native candles in your chart settings.
📖 How to Use
● Interpreting Signals
Traders should monitor the chart for the appearance of the signal triangles. Because the script utilizes a strict minimum gap requirement between signals, traders will not be overwhelmed by repetitive alerts during a sustained trend.
● Executing Trades
Once a signal appears, the script automatically projects the optimal Entry, Stop Loss, and three Take Profit levels on the chart. Traders can use these exact price labels to populate their exchange order tickets or algorithmic routing software.
● Managing Positions
The built-in Exit Indicator, driven by a faster CCI calculation, will trigger an alert when counter-trend momentum builds, providing an objective reason to manually close or trail stops on an active position before the hard stop loss is hit.
● Dashboard Monitoring
Use the dashboard table to gauge the overall health of the trend. If the Confluence Score drops or the Confluence Decay percentage reaches high levels, it is highly advisable to tighten stops on existing positions, as the mathematical probability of trend continuation has diminished.
⚙️ Inputs and Settings
● Core Indicator Tuning
Baseline HMA Length: Adjusts the sensitivity of the primary trend filter.
ADX/DMI Length & Threshold: Defines how strong a trend must be to pass the first confirmation gate.
CCI Length & Threshold: Sets the momentum required for the second confirmation gate.
Volume RMA Length & Multiplier: Configures the strictness of the volume participation filter.
● Risk Parameters
ATR Length: The lookback period for volatility measurement.
SL ATR Mult: The multiplier applied to the ATR to define the stop-loss distance.
TP1, TP2, TP3 ATR Mult: The multipliers defining the three scale-out profit targets.
● Advanced Filter Settings
Confluence Decay: Toggles the time penalty system and defines the maximum bars before full decay.
Hurst Regime Detector: Toggles regime filtering and sets the threshold for trending vs. mean-reverting environments.
Momentum Inflation Ratio: Toggles velocity normalization and sets the threshold ratio for exhaustion alerts.
Cross-Asset Lead-Lag: Defines the correlation ticker, correlation lookback window, and minimum Pearson threshold.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
● Rescaled Range Analysis and the Hurst Exponent
This script integrates a specialized implementation of the Hurst Exponent, a statistical measure originally developed in hydrology, to classify financial time series data. It calculates the cumulative deviation of the asset's price from its Simple Moving Average over a defined rolling window. By identifying the maximum and minimum cumulative deviations, the script establishes the range, which is then normalized against the standard deviation of the price series to compute the rescaled range ratio. The final Hurst value is derived logarithmically. A value significantly greater than 0.5 mathematically confirms a persistent, trending regime, while a value below 0.5 indicates an anti-persistent, mean-reverting environment.
● Momentum Inflation via Volatility Normalization
The script tackles the academic problem of momentum illusion, where sheer point movement is mistaken for structural momentum, by normalizing absolute price speed against the Average True Range. It then compares this normalized current velocity against a rolling historical average of normalized velocity. If the resulting ratio exceeds the user-defined threshold, the script identifies the movement as mathematically over-extended, gating further entries to prevent buying the top or selling the bottom of a volatility spike.
● Cross-Asset Correlation Dynamics
To account for macroeconomic interconnectedness, the script employs a rolling Pearson correlation coefficient between the primary asset and a defined leading indicator. By analyzing the covariance of the two assets relative to the product of their standard deviations over a specific window, it mathematically verifies if the broader sector or macroeconomic environment supports the localized signal.
● Distance-Integral Calculations
The Baseline Distance-Integral utilizes a rolling mathematical sum of the spatial delta between the closing price and the moving average. This integral provides a quantifiable area-under-the-curve measurement, offering deeper insight into the cumulative kinetic energy of a trend rather than relying solely on point-in-time cross signals.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. We expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. Indicator

Bollinger Squeeze Breakout + VolumeA volatility contraction often precedes a volatility expansion. When Bollinger Bands narrow significantly, it signals that the market has entered a period of low energy, and low energy rarely lasts. This strategy is built around that principle: it waits for a genuine squeeze, then enters only when price breaks out of the bands with volume confirming that the move has real participation behind it, not just noise.
The logic
A squeeze is identified when the Bollinger Band width (the distance between the upper and lower bands relative to price) falls below its own recent average,meaning volatility is unusually compressed compared to the recent past. Once that condition is met, the strategy watches for price to close outside either band. A long entry triggers when price closes above the upper band during a squeeze, confirmed by volume exceeding its 20-period average. A short entry triggers under the mirrored condition on the lower band. Stops and targets are based on ATR, since the appropriate distance for both should scale with the market's actual movement at the time of entry, not a fixed number.
This approach tends to filter out the false breakouts that occur during already-volatile, choppy conditions, since the entry only fires after a genuine period of compression, which is when breakouts have historically had more follow-through.
Notes on use
The squeeze threshold and lookback length are the two inputs worth tuning per instrument, a 50-period lookback works reasonably well on daily and 4-hour charts, but lower timeframes may benefit from a shorter lookback to react faster to genuine volatility shifts. As with any breakout strategy, backtest across both trending and range-bound periods before drawing conclusions, since this approach is built specifically to perform during regime transitions and may underperform in markets that stay range-bound for extended periods without ever truly compressing.
This is shared for educational and discussion purposes. As always, backtest thoroughly on your own instruments and timeframes, and treat this as a starting framework rather than a finished system. Feedback and variations are welcome in the comments. Strategy

Indicator

Indicator

Advanced Volatility1. Normalized ATR (%) - The Blue Line
What it is: The standard Average True Range (ATR) divided by the current closing price.
Why it matters: It tells you exactly what percentage the asset moves on an average bar. If the nATR is 2.0%, you know the asset swings roughly 2% per candle. This is incredibly useful for setting dynamic stop losses and take profits that scale mathematically with the asset's price, rather than guessing arbitrary dollar amounts.
2. BB Width (%) - The Orange Line
What it is: The distance between the Upper and Lower Bollinger Bands, divided by the Middle Band.
Why it matters: This acts as a highly effective "Squeeze" proxy. Volatility is cyclical; it contracts, then it expands. When you see the Orange line drop to extremely low historical levels, it means the Bollinger Bands are pinching tight. This contraction indicates that energy is building up, and a massive breakout/expansion move is imminent.
3. Historical Volatility (%) - The Fuchsia Line
What it is: A strict statistical calculation heavily used in options pricing (often referred to as HV or Realized Volatility). It calculates the standard deviation of logarithmic returns over a period, and annualizes it (multiplying by √252 trading days).
Why it matters: It gives you the "true" statistical variance of the asset. A rising Fuchsia line means the market is becoming highly chaotic and unpredictable, while a falling line means the market is returning to a stable, directional grind.
By layering all three of these metrics on one panel, you can easily spot when a market has compressed to zero (all lines dropping near the Zero Base) right before a massive trend erupts! Indicator

Indicator

Adaptive Daytrade SignalThis is an adaptive day trading signal that analyzes market conditions using ADX+EMA; in trending markets, it automatically switches to VWAP+EMA to follow the trend on pullbacks, and in ranging markets, it switches to RSI + Bollinger Bands for counter-trend trading.
Recommended timeframes: 3- to 15-minute charts; Instruments: Nikkei 225 futures, S&P 500; for individual stocks, high-volume large-cap stocks; Session restrictions: For individual stocks, it’s effective to wait and see for the first 30 minutes after the open (adjust using “Limit to session”)
The key feature is that it automatically assesses market conditions and switches trading strategies accordingly. The chart background color lets you see the current market phase at a glance (green = uptrend, red = downtrend, gray = range-bound).
In trending phases (trend-following), the system waits for pullbacks or retracements to the EMA9 and enters only when the price is moving in the same direction as the VWAP. This is a classic approach in stock day trading and offers a good balance between win rate and potential profit.
In ranging phases (counter-trend), the system targets rebounds at the outer bands of the Bollinger Bands combined with RSI overbought conditions. Since attempting to follow the trend when there is no clear trend can result in being caught in a round-trip loss, the system automatically switches to this strategy when the ADX is weak.
In line with our opportunity-focused risk management policy, we set stop-losses relatively tight (based on the most recent swing or ATR × 1.0) and use a two-tiered profit-taking strategy: TP1 (1R) as a target for partial profit-taking, and TP2 (2.5R) to let profits run. Stop-loss and profit-taking lines are automatically displayed on the chart.
Since all parameters are adjustable, by adjusting the two settings—ADX trend threshold (trend detection sensitivity) and Volume vs. avg (volume filter)—you can balance the frequency of signals between prioritizing opportunities and prioritizing accuracy.
This indicator is calculated based on closing price candlesticks and does not use `request.security`, so there is no risk of repainting. However, signals are confirmed once the candlestick closes, and labels are displayed after the candlestick closes. Indicator

Indicator

Prior Level Reaction & Retest ProfilerShort description
An evidence-based profiler for first touches, reactions, breakouts, and confirmed retests at previous-day and previous-week highs and lows, with ATR-normalized outcomes and volatility-regime statistics.
Overview
Previous-day and previous-week highs and lows are widely used as support, resistance, breakout references, and liquidity levels. However, drawing these levels does not answer the practical question: how has this symbol historically behaved after first reaching them?
Prior Level Reaction & Retest Profiler converts each first interaction with PDH, PDL, PWH, and PWL into a measurable event. It records whether price moved away from the level, continued through it, produced a false-break reaction, remained unresolved, or formed a confirmed breakout retest. All distances are normalized with the previous completed daily ATR so observations remain comparable across changing volatility conditions.
This is a descriptive research and decision-support tool. It does not issue automatic buy or sell signals, and historical frequencies are not presented as predictions.
What the indicator measures
For every enabled level, the script selects one first-touch observation during that level's valid daily or weekly period. At the moment of contact, it freezes both the level and the previous completed daily ATR.
For a prior high:
Movement below the level is measured as reaction excursion.
Movement above the level is measured as breakout excursion.
For a prior low, those directions are reversed.
The event is then classified as:
Reaction: The configured reaction threshold is reached first.
Breakout: The configured breakout threshold is reached first.
False-break reaction: Price closes through the level but reaches the reaction threshold before the breakout threshold.
Ambiguous: Both thresholds are reached on the same evaluation bar, so their order cannot be determined from OHLC data.
Unresolved: Neither threshold is reached before the evaluation horizon ends or the source level expires.
Reaction and breakout percentages use directionally resolved observations as their denominator. The dashboard also displays the total sample, ambiguous observations, unresolved observations, and average maximum excursions in daily ATR units.
Why evaluation begins after the touch bar
Historical OHLC bars do not reveal whether the high or low occurred first. Counting the touch bar could therefore invent a sequence that is not present in the data. This script begins outcome evaluation on the following bar and explicitly preserves same-bar dual-threshold outcomes as ambiguous rather than guessing.
Breakout retest engine
When completed history favors breakout over reaction for a level, the optional retest engine follows a confirmed close through that level using a transparent state sequence:
Retest pending: A breakout close occurred and the engine is waiting for price to return.
Retest in progress: Price entered the ATR-normalized retest zone but has not yet confirmed.
Retest confirmed: Price touched the zone and produced a confirmed close back in the breakout direction. Users can optionally require a directional confirmation candle.
Target reached or invalidated: After confirmation, the script records whether the configured ATR target was traded before a confirmed close beyond the invalidation boundary.
Only confirmed chart bars change retest states. A confirmation by itself is not counted as a successful retest. Retest success is calculated only from completed post-confirmation target and invalidation outcomes.
Volatility-conditioned evidence
Retests are not assumed to behave identically in every volatility environment. When regime conditioning is enabled, the script stores the volatility regime present when the breakout setup begins and maintains separate target/invalidation histories for:
Low volatility: Previous daily ATR is at or below 0.80 of its 100-day average.
Normal volatility: The ratio is between 0.80 and 1.20.
High volatility: Previous daily ATR is at or above 1.20 of its 100-day average.
The live decision gate uses only the matching regime's completed retests. It does not borrow confidence from unrelated volatility conditions.
Evidence gate
The simple dashboard prevents attractive headline statistics from being mistaken for a tradable edge.
Observe only: The matching volatility regime has fewer completed retests than the configured minimum.
Stand aside: The sample is sufficient, but target-before-invalidation success is below the configured requirement.
Retest pending / in progress: The evidence gate passes, but confirmation is not complete.
Retest confirmed: The evidence gate passes and the required retest close is confirmed.
Target reached / invalidated: The live confirmed setup has completed.
For example, a level can have a high general breakout rate while its low-volatility retests have a poor success rate. In that situation, the dashboard shows Stand Aside rather than promoting the broader breakout statistic.
Display modes
Simple mode is the default. It shows only the current level segments and a plain-language decision card containing:
Setup
Active level
What to do now
Required confirmation
Invalidation condition
Supporting sample and regime evidence
Only the latest confirmed retest marker is displayed by default. Historical markers can be enabled for auditing.
Evidence mode shows the complete PDH, PDL, PWH, and PWL matrix with sample count, reaction rate, breakout rate, false-break rate, ambiguous and unresolved shares, and average excursions.
Main settings
Daily ATR length
Reaction and breakout thresholds in ATR units
Evaluation horizon in chart bars
Previous-day and previous-week level toggles
Retest-zone width and retest window
Optional directional confirmation candle
Minimum completed retest sample
Minimum acceptable retest success rate
Volatility-regime conditioning
Simple or Evidence display mode
Static and dynamic alerts
Changing chart timeframe changes the real duration represented by the bar-based evaluation and retest windows. Statistics should therefore be compared only when symbol, timeframe, and settings are consistent.
Alerts
Named alerts are available for:
First level touch
Reaction or breakout outcome
False-break reaction
Ambiguous outcome
Breakout close with retest pending
Retest confirmation
Retest failure or expiry
Confirmed-retest target reached
Confirmed-retest invalidation
Dynamic messages can be used by enabling the dynamic-alert setting and creating an alert with Any alert() function call.
Repainting and data behavior
Previous-day, previous-week, daily ATR, and ATR-average values are requested with a one-period offset. Only completed higher-timeframe values are used; no future data is accessed.
Retest state changes require confirmed chart bars. Once a historical event or retest outcome is finalized, its classification does not change. Active events can update as new bars close.
Limitations
Designed primarily for intraday charts.
OHLC data does not reveal intrabar high/low order; ambiguous cases are retained explicitly.
Gap openings can cross a level without trading every intervening price.
Available chart history and data-feed differences affect samples.
Regime-filtered samples can be considerably smaller than overall samples.
The reference target uses traded price, while post-confirmation invalidation requires a confirmed close.
Spread, slippage, commissions, liquidity, position sizing, and execution constraints are not modeled.
Historical behavior does not guarantee future results.
This indicator is not financial advice.
Indicator
