UPDATED: COMBO - EMA/LRI/SuperTrend/HMA StrategyOverview
The EMA / LRI / SuperTrend / HMA Execution Suite is a streamlined overlay designed for intraday momentum traders, scalpers, and trend followers. It combines dynamic trend baselines, statistical breakout evaluation, and multi-tier moving average filters into a single, highly performant script.
By focusing purely on high-probability trend structure and dynamic fair value, this indicator keeps your chart visually clean and clutter-free for quick execution.
Key Features & Components:
Core Purpose: An advanced multi-indicator technical suite specifically designed for futures and stock trading.
Moving Averages & Momentum: Integrates a customizable Exponential Moving Average (EMA), a versatile Hull Moving Average (HMA) with both single and 3-HMA crossover modes, and a directionally-colored Linear Regression Index (LRI) for momentum tracking.
Breakout Probability Engine: Features a SuperTrend overlay enhanced with a relative volume Gaussian Kernel Density Estimation (KDE) model to calculate breakout strength and display confidence percentage labels.
Visual Adjustments: Includes fully customizable vertical offsets and connecting lines for the probability bubbles to maintain clear chart readability.
Comprehensive Alerts: Built-in alert conditions for trend flips, high-confidence breakouts, and moving average or price crossovers against the LRI.
Wskaźnik

Supertrend Twincore [MachineSuiteAI]Supertrend Twincore
🟦 OVERVIEW
A fast Supertrend flips too often; a slow one flips too late. This script runs both at once and only signals when they agree — and then shows you, with win rates and sample sizes, how that agreement has actually performed on the chart you have loaded.
A signal only appears where the fast core (timing) and the slow core (structure) first align, and only if it passes a gate: clustered whipsaw flips always suppress, and every other filter blocks signals only where measurement shows it helps on this chart. Passed signals are graded A/B/C and draw an Entry / SL / TP1-3 ladder whose outcomes are tracked per grade. Suppressed candidates stay as grey ghost chips with the reason, and a five-row multi-timeframe strip shows the consensus state across timeframes from completed bars.
The idea throughout: the chart never claims more than the data supports, and anything the script believes is checkable in the panel.
🟦 WHAT IS A SUPERTREND?
Supertrend is a public-domain trailing-stop indicator: it offsets price by a multiple of the Average True Range and trails that stop behind the trend. Price above the stop means uptrend, below means downtrend; a close across it flips the state. This script computes its cores with the built-in ta.supertrend() — fast 2.0 × ATR(10) and slow 4.0 × ATR(20) by default.
Its known weakness is structural: in ranging markets the stop is repeatedly crossed and the indicator whipsaws. Filters are the usual answer; this script measures whether each one actually helps on the loaded symbol and timeframe, and the marks and the gate act only on that evidence.
🟦 WHY THIS SCRIPT IS ORIGINAL
The base calculation is a built-in, and the ingredients — win-rate panels, ADX gates, higher-timeframe confirmation, multi-timeframe dashboards, take-profit ladders, signal grades — are established ideas. What's different is the standard everything must meet: beyond one fixed whipsaw rule, nothing gets drawn, nothing blocks a signal, and nothing drives the engine unless the measurements on the loaded chart back it up.
- Graded ladder odds with the cost attached. Grades are fixed and published — A means structural confirmation plus volume, B one of the two, C neither; no opaque score. Every passed signal's ladder is tracked to resolution; the panel shows per grade: TP1-before-SL and SL-first rates, the median furthest level, the median heat (largest adverse move, in ATR units) and the median bars to TP1, each with its own sample size.
- An adaptive engine that has to beat the fixed one first. Both fast cores — fixed and adaptive — are measured as separate signal streams on the loaded chart, and the adaptive core only drives signals while it beats the fixed core by a set margin with enough samples. The A/B row shows the running comparison; on defaults it reports the adaptive layer as inert.
- Gates held to the same standard. The ✓ volume mark and ⚠ counter-trend warning only print where their split beats the base win rate by a configurable margin here. The ADX gate only blocks candidates where high-ADX candidates have beaten low-ADX candidates by that margin on this chart.
- Per-condition win-rate splits. The base candidate win rate, then the same measurement split by signal class, higher-timeframe agreement, volume confirmation, multi-timeframe alignment and volatility regime — six statistics, each with its own sample size, greyed below a minimum sample.
- Two kinds of signals, measured separately. A candidate exists only on the first bar the cores align and is classified as a structural confirmation (the slow core just flipped in) or a pullback rejoin (the fast core returned to a standing slow trend); a double flip on one bar is labeled same-bar. They are different trades, measured separately.
- Suppression you can audit. A gated-out candidate still prints — a hollow grey ghost chip with the specific reason — and still counts in every statistic, so the base rate is never inflated by counting only the survivors.
- Visual discipline. The band claims a direction only while both cores agree; its saturation drains as price nears the structural stop, so the exit warning arrives before the flip; NEUTRAL keeps a directional tint, so the last trend stays readable while standing aside. The price scale is held to the same rule — it carries the structural stop and the ladder's Entry, SL and TP1-3, each in its own colour, and nothing else; the band and the fast core draw on the chart but claim no axis label. Every visual property maps to something measured.
🟦 HOW IT WORKS
- Cores: two standard Supertrends — the fast core times entries, the slow core defines structure and is the ladder's trailing stop. Presets: Scalp 1.5×ATR(7)/3.0×ATR(14), Intraday 2.0×ATR(10)/4.0×ATR(20), Swing 3.0×ATR(14)/5.0×ATR(28), or Custom.
- Gate and state model: flip-cluster suppression (2+ fast flips in 10 bars, on by default), the measured ADX gate (default "Where it helps (measured)"), and an optional strict higher-timeframe gate (off by default). The band turns grey NEUTRAL on low ADX (default ADX(14) < 20) or flip clustering.
- Higher-timeframe filter: a third Supertrend one regime up (auto-mapped ≤15m→4H, ≤1H→1D, ≤4H→3D, ≤1D→1W, else 1M; or manual), read from the last completed HTF bar.
- Statistics: on confirmed bars, every candidate — passed and suppressed — resolves N bars later (default 10); a win means the close moved in its direction. Splits grey below the minimum sample (default 20). Chip marks need their split to beat the base rate by ≥3 points (configurable); the ADX gate needs the high-ADX split to beat the low-ADX split by the same margin; volume confirmation is volume above 1.5× its 20-bar average.
- Ladder: at a passed signal's close, Entry is the close, SL is the slow-core stop (or the fast core, or a fixed k×ATR cap), TP1/2/3 default to 1/2/3 × ATR. It trails, marks TP touches ✓, freezes ✕ on an SL break, dims when resolved or consensus is lost, and feeds the per-grade LADDER ODDS rows. A live ladder tracks the right edge of the chart; once its stop is hit it stops there, so it stays a bounded record of that trade — targets it never reached are not credited later just because price eventually passed them, and the frozen right edge makes clear the trade was already over. The stop's ray spans only the stretch where that level was actually in force, because a trailing stop is a staircase rather than one line: on a long it starts below the entry and can ratchet above it, locking in profit, and the amber slow core shows the whole path. Each level prints its exact price on the price scale, so the figure for an order ticket reads straight off the axis while the chart labels stay short. The colours carry the geometry: entry green, the targets in the trade's own direction and the stop in the opposite hue, so the level that ends a trade never reads like the levels that pay it — and the slow core keeps its amber, so the stop stays distinguishable from the line it trails.
- Adaptive engine: a per-volatility-regime fast core A/B-measured against the fixed one, as described above; default factors are inert.
- MTF strip: five rows of full consensus state (UP / DOWN / SPLIT / NEUTRAL, with bars-in-state), each read from that timeframe's last completed bar. Auto mode starts at the chart's own timeframe and climbs — 4H gives 4H/D/W/M/3M. Lower timeframes are omitted by default: their consensus flips many times during a single trade taken here, so it says little about an outcome measured over days. Manual mode accepts any five, defaulting to the classic 15m/1H/4H/D/W.
🟦 HOW TO USE IT
- Read the panel first: consensus state, cores, regime, HTF agreement, then the measured rows. An ↑ means that condition has earned its margin on this chart; its absence means it hasn't.
- Chips carry their evidence: grade letter, live per-grade TP1 odds at sufficient sample, ✓ where volume has helped, ⚠ where fighting the higher timeframe has hurt. Ghost chips mean the script stood aside — the reason is on the chip.
- NEUTRAL and SPLIT mean stand aside. The coach line says this in plain language, and notes that a retouch of the entry after TP1 does not invalidate a live ladder — only the SL does.
- Reversal-only signal mode reserves the headline presentation for slow-core reversals; Discipline display mode strips the chart to the band alone (note: TP/SL alerts only fire while the ladder is drawn).
- Defaults are tuned on liquid crypto from 15-minute to weekly charts; the multipliers and ADX threshold are worth reviewing on other asset classes.
🟦 SETTINGS
Grouped as in the inputs dialog: consensus core (presets or custom multipliers) · higher-timeframe filter · state model & signal gate (ADX, flip-cluster, optional HTF gate, ghost chips) · trade ladder (SL geometry, TP multiples) · grade engine (certified or dynamic wiring) · adaptive engine · MTF strip · visuals and display modes · volume multiple (default 1.5×) · signal stats engine (horizon, minimum sample, gating margin) · JSON webhook alerts.
🟦 ALERTS
Consensus long / short · confirmed reversal long / short · Grade A long / short · TP1 / TP2 / TP3 touched · SL break · NEUTRAL started / ended · volatility regime changed · adaptive engagement changed. Create the classic alert conditions with "Once Per Bar Close" — they evaluate on live bars, and an intrabar state can revert before it counts. Optional JSON alert() events via a single "Any alert() function call" alert: signal events carry grade, entry and levels; TP/SL events identify the touched level; all carry symbol, timeframe, regime and state. The JSON events are close-gated and fire for every passed candidate, including rejoins the Reversal-only display mode demotes.
🟦 REPAINT & DATA NOTES
- All bookkeeping runs on confirmed bars; chips, ladders and statistics commit at bar close. Inside a forming bar the panel's consensus, cores, agreement, volume and coach line update live and are therefore PROVISIONAL — they can revert before the bar shuts. Price can also sit beyond a ladder's stop for the rest of a bar without resolving it: in the core SL modes the stop breaks when that core flips, which needs a confirmed close. The coach line says so when it happens.
- Higher-timeframe and strip values come from each timeframe's last completed bar — no repaint; intrabar changes up there show after that bar closes. The design assumes the HTF sits above the chart's timeframe — with Manual selection, keep it there.
- Ladder TP touches — and the Fixed mode's hard-stop touches — are detected from confirmed bars' highs/lows, starting the bar after entry; a bar touching several levels credits TPs before the stop. In the core SL modes the stop is not touch-based: it resolves only when its core flips, which needs a confirmed close — so a wick through the stop does not end a ladder, and the touch-credited TP rates are structurally friendlier than a hard-stop backtest of the same levels. The Fixed k×ATR mode is the geometry closest to a real hard stop.
- Statistics cover the loaded history and reset when the chart reloads with different history; lower timeframes load fewer bars. Greyed rows just mean the sample is too small to trust.
- Only the most recent 250 chips and ghost chips stay on the chart, so a live ladder's own labels can never be pushed off by TradingView's drawing limit; deep history keeps its band and cores but not its markers. Ladder odds count each ladder when it resolves, and in the rare case that more than 30 are open at once the oldest is counted at its current state rather than discarded — the sample is never silently trimmed.
- On a live bar the volume ratio is partial; judge it near the close. Volume features require a feed that supplies volume.
🟦 CREDITS
The Supertrend concept is public domain (popularized by Olivier Seban); ATR, ADX and the DMI are J. Welles Wilder's. The fixed cores use TradingView's built-in ta.supertrend(); the adaptive core re-implements the same algorithm to accept a per-bar factor. The consensus model, candidate classes, statistics engine, gates, grades, measured ladder, ghost chips, strip and band rendering were written from scratch for this script.
🟦 LIMITATIONS
- Supertrend lags by construction, and requiring two cores to agree makes entries later still — fewer, later, more heavily filtered signals is the intended trade-off.
- The NEUTRAL state derives from lagging measures (ADX, flip counts), so the first signals of a new trend can still arrive grey or be suppressed.
- All statistics are direction-only measurements over a fixed horizon; ladder odds are level measurements (TPs credit on a wick touch, core-mode stops resolve only on a confirmed core flip) — no fees, slippage, sizing or equity math. They are not a strategy backtest, they differ per symbol and timeframe, and they do not predict future outcomes.
- Without volume data the volume filter and its split stay inactive, and certified Grade A (confirmation + volume) is out of reach — signals cap at Grade B on volume-less feeds. Sample sizes on higher timeframes are structurally small; expect greyed rows there.
- The same asset on two different venues can show opposite states. A Supertrend flip is a threshold event: when price sits within a fraction of a percent of the band, a normal inter-exchange spread of a few basis points decides whether it crosses, and once one venue flips its stop jumps to the other side of price, so two nearly identical charts diverge sharply. This is inherent to the calculation, not a data error — treat a signal as belonging to the feed it was measured on, and check the panel's sample sizes on the venue you actually trade.
🟦 DISCLAIMER
This is an educational analysis tool, not investment advice. Historical measurements, however carefully computed, do not predict future results. Trading involves substantial risk.
Wskaźnik

Liquidity Stress Exhaustion [MarkitTick]💡 A market-microstructure stress detector that flags moments of seller or buyer exhaustion by combining an Amihud-style illiquidity z-score with trend regime, a regression-based fair-value channel, and automated ATR trade levels. Rather than reacting to price alone, this script measures how much price is moving relative to the volume behind it, then cross-references that stress reading against trend direction and candle behavior to identify points where aggressive selling or buying is likely running out of steam.
✨ Originality and Utility
Most exhaustion-based tools on TradingView rely on oscillator extremes (RSI, Stochastic) or candlestick pattern recognition in isolation. This script takes a different route: it borrows a concept from academic market-microstructure literature — price impact per unit of volume, i.e., illiquidity — and turns it into a real-time, standardized stress signal. Instead of asking "is price overextended?", it asks "is price moving too much for the volume that's actually trading?" A large true-range on abnormally low volume is treated as a sign of thin, stressed liquidity, and it is this stress, combined with a counter-trend candle, that defines exhaustion here — not price level alone.
This is not a simple mashup of unrelated indicators bolted together for the sake of a new publication. The illiquidity stress engine, the trend filter, the regression channel, and the correlation/ADX filters are all working toward a single, coherent question: is the current directional move statistically and structurally likely to reverse or stall? The z-scored stress reading identifies unusual conditions, the EMA trend filter and candle-close direction confirm which side is under pressure, and the optional Pearson-R and ADX filters exist specifically to suppress signals when the broader price action lacks the statistical structure (trending correlation, directional strength) needed to make the exhaustion reading meaningful. Each component narrows the false-positive rate of the others; removing any one of them would meaningfully change what the tool measures.
The script goes further than a plain signal generator by translating each exhaustion event into a fully computed trade plan — an ATR-derived stop, a dynamically computed R (risk unit), and three R-multiple take-profit targets — visualized directly on the chart and exposed through a structured alert payload designed for automation.
🔬 Methodology and Concepts
• Illiquidity Stress Engine
The core of the script computes a proxy for market illiquidity on every bar: true range divided by volume (with a safe fallback when volume is zero or unavailable), then compressed with a natural-log transform to tame outliers. This raw illiquidity series is then standardized into a z-score using a rolling mean and standard deviation over the "Stats Lookback" period. A z-score above your chosen "Stress Threshold (σ)" marks the bar as being in a state of high stress — meaning price moved an unusually large amount for the volume that supported it, a hallmark of thin liquidity and potential exhaustion of the prevailing move.
• Trend Regime Filter
Direction is established by comparing price (optionally pre-smoothed by an adaptive filter, see below) against an EMA of configurable length. Price below the EMA defines a downtrend; price above defines an uptrend. Exhaustion signals are only valid when they occur against the backdrop of an established trend in the opposite direction — a seller exhaustion signal requires the prior bar to have closed in a downtrend on a red candle, while buyer exhaustion requires an uptrend and a green candle.
• Adaptive Price Filters (Optional)
Two optional smoothing methods can replace raw closing price throughout the trend calculation:
Kalman Filter: a lightweight recursive estimator that continuously balances trust between the incoming price and its own prior estimate, adapting its responsiveness based on a fixed process/measurement noise ratio derived from your chosen length.
LLAMA (Linear-Lag Adjusted Moving Average): a hybrid that takes a simple moving average and adjusts it by half the recent linear slope, aiming to reduce the lag inherent in plain moving averages.
These exist to give the trend filter a smoother, less noise-reactive input than raw closing price when desired.
• Regression Fair-Value Channel
On the most recent bar, the script performs a least-squares linear regression over a lookback window (either a fixed length, or a dynamic length measured from the most recent qualifying pivot, capped by "Max Lookback Cap") using hlc3 as the source. From this it derives the regression line itself, its standard deviation, and the Pearson correlation coefficient (R), which measures how well price actually fits a straight line over that window. Inner and outer channel bands are plotted at user-defined standard-deviation multiples above and below the regression line, giving a visual statistical envelope for the recent price trend.
• Correlation and ADX Filters
Two independent filters can suppress exhaustion signals when the broader trend lacks structural conviction:
Pearson R Filter: when the absolute value of the regression's correlation coefficient falls below your threshold, the trend is considered statistically weak/directionless, and the channel is recolored neutral to flag this — though note this filter affects only the visual channel coloring, not signal firing.
ADX Filter: when enabled, exhaustion signals are only permitted when ADX is at or above your threshold, filtering out exhaustion calls during periods of weak directional movement.
• Pivot Detection
Standard confirmed pivot highs and lows (requiring the specified number of bars on each side) are tracked internally to support the optional Dynamic Pivot Mode, which — when enabled — sizes the regression lookback to the distance since the most recent confirmed pivot rather than using a fixed length.
• ATR Trade Level Construction
When a qualifying exhaustion signal fires and is confirmed, the script computes a full trade plan: the entry is the closing price of the confirmed exhaustion bar, the stop-loss is placed one ATR-multiple away (your "ATR SL Multiplier" times ATR over "ATR Length"), and the resulting stop distance defines one Risk unit ("R"). Three take-profit levels are then placed at your chosen R-multiples (default 1R, 2R, 3R) from entry. This entire trade plan updates and redraws only when a new, unlocked exhaustion signal fires.
• Lock Signal
Enabling "Lock Signal" freezes the currently displayed trade plan on the chart, preventing new exhaustion events from overwriting the active levels — useful for manually tracking a single trade through to its conclusion without the visual being replaced mid-trade.
🎨 Visual Guide
● Exhaustion Labels
"SE" label below a bar (bullish color by default) marks a confirmed Seller Exhaustion event — sellers pushed price down under stress conditions, and the setup favors a potential upside reaction.
"BE" label above a bar (bearish color by default) marks a confirmed Buyer Exhaustion event — buyers pushed price up under stress conditions, and the setup favors a potential downside reaction.
● Regression Channel
The dashed center line is the linear regression fair-value line over the active lookback window.
The two dotted inner lines mark the "Inner Deviation" band (default 1.0σ).
The two solid outer lines mark the "Outer Deviation" band (default 2.0σ).
The shaded fill between the inner bands is colored by trend direction — bullish or bearish color when the trend is statistically valid, neutral gray when the Pearson R Filter flags the trend as too weak/uncorrelated to trust.
An optional floating "STATS" label above the current bar displays the regression length, Pearson R value, and current stress z-score (σ) numerically, when "Show Metrics Label" is enabled.
● Trade Level Lines
Plotted only after a qualifying exhaustion event, extending toward the current bar:
Red solid line and "✕ SL" label: the calculated stop-loss.
Blue dashed line and "▶ Entry" label: the entry price (signal bar's close).
Three teal dashed lines of increasing opacity/solidity, with "◆ TP1", "✦ TP2", "◆ TP3" labels: the three R-multiple take-profit targets.
A red-tinted fill between the stop and entry lines visualizes the risk zone.
A teal-tinted fill between the entry and TP3 lines visualizes the reward zone.
● Dashboard (Table)
A compact panel, positioned per your "Dashboard Position" setting, reporting in real time: Lock status, current Trend Regime (Bullish/Bearish), Seller Status and Buyer Status (Exhausted/Normal), a visual Channel Width bar-meter (color-graded green/amber/red by relative width), a visual Pearson R bar-meter (same color grading by correlation strength), and — when an exhaustion signal is currently active — the live Entry, Stop Loss, and TP1 price levels. ADX value and Adaptive Filter type are appended as additional rows only when those features are enabled in the inputs.
📖 How to Use
Watch for an "SE" (Seller Exhaustion) label — this suggests a downtrend that produced an unusually large price move for its volume, on a down candle, potentially signaling sellers are running out of conviction and a bounce could follow.
Watch for a "BE" (Buyer Exhaustion) label — the mirror case in an uptrend, potentially signaling an approaching pullback or reversal.
Use the dashboard's Pearson R and Channel Width meters as a quick sanity check on trend quality before acting on a signal — a low R reading (channel shown in neutral gray) suggests the recent price action lacks a clean directional structure.
If ADX filtering is enabled, only signals occurring during sufficiently strong directional movement (per your threshold) will fire, which can help avoid exhaustion calls inside choppy, low-ADX conditions.
Once a signal fires, the plotted SL/Entry/TP1-3 lines and the dashboard's live level readout offer a pre-built framework for position sizing and target-setting — always cross-check these levels against your own risk tolerance before acting on them.
Enable "Lock Signal" if you want to study a single active trade plan without it being replaced by a new signal appearing on a later bar.
All signals, dashboard values, and trade levels are calculated strictly on confirmed, closed bar data — nothing on this chart is repainted or recalculated retroactively into the past.
⚙️ Inputs and Settings
● Core Settings
Trend Length: EMA period used for the directional trend filter. Longer values smooth out the trend classification; shorter values make it more reactive.
Stats Lookback: rolling window for the illiquidity mean/standard deviation used to compute the stress z-score.
Stress Threshold (σ): the z-score level that must be exceeded for a bar to be classified as "high stress." Raising this makes exhaustion signals rarer but more extreme.
Dynamic Pivot Mode: when enabled, the regression channel's lookback length is derived from the distance to the most recent confirmed pivot instead of a fixed value.
Fixed Length: the regression lookback used when Dynamic Pivot Mode is off.
Pivot Left / Pivot Right: bars required on each side to confirm a swing high/low for Dynamic Pivot Mode.
Max Lookback Cap: hard ceiling on the regression window length, regardless of pivot distance, to control computation and keep the channel visually relevant.
Inner/Outer Deviation: standard-deviation multiples defining the two channel bands around the regression line.
● Filters
Filter Weak Correlations / Pearson R Threshold: controls the channel's neutral-color flagging when regression fit quality is below this threshold.
Use ADX Filter / ADX Threshold / ADX Length: optional directional-strength gate that must be satisfied for exhaustion signals to fire.
Adaptive Filter (None / Kalman Filter / LLAMA) and its Length: optional pre-smoothing applied to price before the trend/EMA calculation.
● Trade Tools
Lock Signal: freezes the current trade plan against being overwritten by new signals.
ATR SL Multiplier / ATR Length: controls stop-loss distance as a multiple of ATR.
TP1/TP2/TP3 (R Multiple): sets each take-profit target as a multiple of the initial risk (R).
● Visuals
Show Metrics Label: toggles the floating STATS label showing regression length, R, and z-score.
High/Low Volatility Width %: reference thresholds used to color-grade the dashboard's Channel Width meter.
Line Extension: controls whether regression channel lines extend left, right, both, or not at all.
● Dashboard
Dashboard Position: places the summary table in any of the four chart corners.
● Alerts
Six customizable action-tag fields (Seller/Buyer Exhaustion, TP1/TP2/TP3 Hit, SL Hit) let you rename the "action" field inside each alert's JSON payload to match your own automation or webhook naming scheme.
● Colors
Full palette control over bullish/bearish/neutral coloring, text and background colors, dashboard styling, and all trade-level line/fill colors.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
● Illiquidity as a Price-Impact Proxy
The stress engine's core calculation — true range divided by volume — is a simplified, bar-by-bar adaptation of the price-impact style illiquidity measures used in market microstructure research, most notably the Amihud illiquidity ratio, which relates absolute returns to trading volume as a proxy for how much a given amount of volume "costs" in terms of price movement. The underlying academic intuition is that in illiquid or stressed conditions, smaller volumes produce disproportionately larger price swings; the log transform compresses the resulting distribution to reduce the influence of extreme outlier bars before standardization.
● Z-Score Standardization and Statistical Anomaly Detection
Converting the raw illiquidity reading into a z-score against its own rolling mean and standard deviation is a direct application of statistical process control / anomaly-detection theory: rather than using a fixed, market-agnostic threshold, the script defines "abnormal" relative to each instrument's and timeframe's own recent behavior. This adaptive standardization is a common approach in quantitative finance for regime and outlier detection, since raw price-impact values are not comparable across instruments, timeframes, or volatility regimes without normalization.
● Ordinary Least Squares Regression and Goodness-of-Fit
The fair-value channel is constructed using closed-form ordinary least-squares (OLS) regression formulas computed directly from the summary statistics of the price series (sums of x, y, x², xy, y²) rather than an iterative solver — a standard, numerically efficient approach for simple linear regression. The accompanying Pearson correlation coefficient is the classical goodness-of-fit statistic for this regression: it quantifies how well a straight line explains the price action over the lookback window, providing a principled, quantitative basis (rather than visual judgment) for deciding whether "trend" is a statistically meaningful description of recent price behavior.
● Recursive State Estimation (Kalman Filtering)
The optional Kalman Filter smoothing option is a simplified, single-dimension implementation of the classical Kalman filter from control theory and signal processing — a recursive Bayesian estimator that maintains a running estimate of a system's true state (here, price) and continuously updates it by weighting new observations against the model's own uncertainty. This provides a theoretically grounded alternative to fixed-window moving averages for noise reduction.
● Trend-Following Directional Strength (ADX/DMI)
The optional ADX filter draws on Welles Wilder's Directional Movement System, a long-established technical framework for separating trend strength from trend direction. Using it as a gate rather than a signal generator reflects its intended academic role: ADX does not indicate direction, only the strength of whatever directional move is present, making it a natural confluence filter for suppressing signals during structurally weak, low-conviction price action.
⚠️ 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. Wskaźnik

EMA 25/68 BIST30 Futures# EMA 25/68 BIST30 Futures
I developed this strategy to test a straightforward and easy-to-understand moving average system on the 15-minute chart of the BIST30 futures contract.
The system monitors crossovers between EMA 25 and EMA 68. A crossover alone is not sufficient to open a position. For a long setup, the highest price of the crossover candle is recorded. For a short setup, the lowest price of the crossover candle is recorded. The signal is confirmed only if price breaks this level within the following four bars. If confirmation does not occur within four bars, the setup is cancelled.
EMA 160 is used solely as a directional filter. Long positions are opened above EMA 160, while short positions are opened below EMA 160. The purpose of this filter is to avoid taking short- and medium-term moving average crossovers against the broader market trend.
If a position has not been stopped out before the end of the session, it is closed at the close of the 17:45 bar, which corresponds to the 18:00 session price. A new position, including one in the opposite direction, cannot be opened on the same bar in which an existing position is closed.
The strategy has been designed so that different parameter settings can be tested for educational and research purposes. Users can change the EMA lengths, the number of confirmation bars, the directional filter and the trailing stop percentage to examine how these variables affect the number of trades, win rate, profit factor and maximum drawdown.
When evaluating parameter changes, users should not focus solely on the highest net profit. It is also important to examine whether neighbouring parameter values produce similar results and whether performance remains consistent across different market periods.
The code avoids calculation methods that could introduce look-ahead bias. The entire entry bar is not treated as price movement that occurred after the position was opened. The trailing stop is calculated using data from a completed bar and becomes active no earlier than the following bar.
Commission and tax on commission are displayed as separate settings. By default, the strategy assumes a commission rate of 0.020% per order leg and a 5% tax applied to the commission. Together, these produce an effective cost of 0.021% per order leg.
If the commission or tax settings are changed, the effective cost per order leg displayed in the table at the top-right corner of the chart must also be entered under Strategy Settings → Properties → Commission.
The strategy was developed for the XU030D1! symbol on a 15-minute chart. Similar results should not be expected on different markets or timeframes. The data source, continuous contract settings, commission, slippage and Bar Magnifier preferences may all affect backtest results.
This strategy is shared for educational and research purposes only. Past performance does not guarantee similar results in the future and should not be used as the sole basis for making investment decisions.
EMA 25/68 BİST30 VADELİ
Bu stratejiyi BIST30 vadeli kontratın 15 dakikalık grafiğinde, mümkün olduğunca sade ve anlaşılır bir hareketli ortalama sistemi denemek için hazırladım.
Sistem EMA 25 ile EMA 68’in kesişmesini takip ediyor. Kesişim tek başına işlem açmak için yeterli değil. Long tarafta cross mumunun en yüksek, short tarafta ise en düşük fiyatı kaydediliyor. Fiyatın bu seviyeyi sonraki dört bar içinde geçmesi halinde sinyal teyit edilmiş sayılıyor. Dört bar içinde teyit gelmezse aday iptal ediliyor.
EMA 160 yalnızca yön filtresi olarak kullanılıyor. Long işlemler EMA 160’ın üzerinde, short işlemler EMA 160’ın altında açılıyor. Amaç, kısa ve orta vadeli ortalama kesişimlerini daha geniş trendin tersine kullanmamak.
Pozisyon seans sonuna kadar stop olmadıysa 17:45 barının kapanışında, yani 18:00 seans fiyatında kapatılır. Pozisyonun kapandığı bar içinde ters yönde yeni pozisyon açılmaz.
Strateji, eğitim ve araştırma amacıyla farklı parametrelerin sonuçlar üzerindeki etkisini incelemeye uygun olacak şekilde ayarlanabilir hazırlanmıştır. EMA uzunlukları, teyit barı sayısı, yön filtresi ve trailing stop oranı değiştirilerek işlem sayısı, kazanma oranı, kâr faktörü ve maksimum düşüş gibi ölçümlerin nasıl değiştiği karşılaştırılabilir. Parametreler değerlendirilirken yalnızca en yüksek net kâra odaklanmak yerine, komşu değerlerde de benzer sonuçların oluşup oluşmadığı ve farklı dönemlerde performansın korunup korunmadığı ayrıca incelenmelidir.
Kodda geleceği görmeye yol açabilecek hesaplama seçenekleri kullanılmadı. Giriş barının tamamı, pozisyon açıldıktan sonra oluşmuş bir fiyat hareketi gibi kabul edilmez. Trail seviyesi tamamlanan barın verileriyle hesaplanır ve en erken sonraki barda çalışır.
Komisyon ve komisyon vergisi ayarlarda ayrı ayrı gösterilir. Varsayılan olarak bacak başına yüzde 0,020 komisyon ve komisyon üzerinden yüzde 5 vergi kabul edilmiştir. Bu ikisinin efektif bacak maliyeti yüzde 0,021’dir. TradingView’in yerleşik komisyon alanı Pine kodunda dinamik bir inputa bağlanamadığı için bu değer değiştirildiğinde, Strateji Ayarları > Özellikler bölümündeki komisyon oranının da tabloda gösterilen efektif oranla aynı yapılması gerekir.
Strateji XU030D1! üzerinde 15 dakikalık grafik için hazırlanmıştır. Farklı piyasalarda veya zaman aralıklarında aynı sonucu vermesi beklenmemelidir. Bar Magnifier kullanımı, veri kaynağı, sürekli vade ayarları, komisyon ve kayma tercihleri backtest sonuçlarını değiştirebilir.
Bu çalışma eğitim ve araştırma amacıyla paylaşılmıştır. Geçmiş performans gelecekte aynı sonucun alınacağını göstermez ve tek başına yatırım kararı için kullanılmamalıdır.
Strategia

Volume Regression Channel [BOSWaves]Volume Regression Channel - Regression-Anchored Volume Flow Visualization with Inward Pressure Bars, Edge Flares, and Cumulative End Profile
Overview
Volume Regression Channel is a regression-anchored volume flow analysis system that fits a polynomial or linear curve to recent price history and maps buy and sell volume pressure inward from the channel boundaries toward the centerline on every bar, where bar height, coloring, edge flare intensity, and end profile distribution are all driven by actual volume participation and close-position-derived directional weighting rather than fixed histogram positions or arbitrary price levels.
Instead of displaying volume as a separate panel histogram detached from price context, this system integrates volume directly into the regression channel structure. Each bar's volume is split into buy and sell components based on where close sat within the bar's range, and those components are rendered as inward-pointing bars anchored to the upper and lower channel edges, with bar height proportional to normalized volume and coloring distinguishing above-average from below-average participation. The result is a channel where the volume activity on every bar is visible in spatial relationship to the channel boundaries that define the structural context.
This creates a complete price and volume framework within a single overlay. The regression curve defines the trend's expected path. The gradient channel fills communicate the statistical distance from the centerline. The inward volume bars reveal participation intensity and directional split at each bar. The flow-colored centerline segments expose directional pressure evolution across the window. Edge flares highlight exceptional volume events occurring near the channel boundaries. Bound diamond markers identify the first bar of each new boundary touch. And the cumulative end profile extending from the current bar provides a full buy-sell volume distribution summary across the channel's price range for the entire regression window.
Price is therefore evaluated not just for its position within the regression channel but for the volume participation and directional flow composition supporting its location at every bar across the full lookback window.
Conceptual Framework
Volume Regression Channel is founded on the principle that a regression channel becomes significantly more analytically powerful when volume participation is integrated directly into its structure rather than displayed separately, allowing the trader to simultaneously assess where price sits relative to the statistical trend expectation and how much and what type of volume supported each bar's position within that channel.
Standard regression channel tools provide structural price context through the curve and its standard deviation bounds but offer no volume intelligence, leaving traders to consult a separate panel to understand participation dynamics. This framework eliminates that separation by embedding volume directly into the channel geometry, with inward bars, edge flares, centerline flow coloring, and the end profile all deriving from the same volume and price data that defines the channel itself.
Three core principles guide the design:
Volume should be displayed in direct spatial relationship to the channel structure it relates to, with inward bars anchored to the boundaries and sized proportionally to participation intensity so that high-volume bars are immediately identifiable within their structural context.
Buy and sell volume should be separated using close position within the bar range, rendering the directional split of each bar's participation as distinct inward segments that reveal whether volume at each price location was predominantly absorbed by buyers or sellers.
A cumulative end profile should summarize the full window's volume distribution at the current channel position, providing a reference for where participation has been most concentrated across the regression window without requiring a separate profile indicator.
This shifts regression channel analysis from structural price context alone into an integrated price-volume framework where participation intensity, directional flow composition, and cumulative distribution are all visible within the channel geometry itself.
Theoretical Foundation
The indicator combines matrix ordinary least squares regression fitting to HL2 price data, standard deviation channel construction, close-position buy-sell volume splitting, volume SMA normalization for significance classification, three-layer gradient polyline fill construction, inward volume bar rendering with dynamic width scaling, flow-weighted centerline segment coloring, edge flare detection combining volume and boundary proximity conditions, and an overlap-weighted cumulative buy-sell profile with smoothing applied across the channel rows.
The regression is computed using the same OLS matrix approach as conventional polynomial regression, producing a prediction array covering all bars in the lookback window for both linear and quadratic modes. The channel width is scaled by the rolling standard deviation of HL2, ensuring channel boundaries adapt to the instrument's actual price variability. Volume splitting uses close position within the high-low range as the proxy for directional commitment, with bars closing near the high allocating more volume to buying and bars closing near the low allocating more to selling. The end profile smooths each row's accumulated buy and sell volume with a three-point weighted average before normalizing and rendering.
Four internal systems operate in tandem:
Regression Channel Engine : Computes OLS curve fitting in linear or polynomial mode, derives the standard deviation channel width, and constructs all polyline geometry for the gradient fills, glow boundary lines, and centerline using chart.point arrays that follow the regression curve.
Inward Volume Bar System : For each bar in the recent display window, normalizes volume against the window maximum, splits the normalized height into buy and sell components by close position, and renders inward lines from the channel edges with dynamic width scaling and above-average volume coloring.
Edge Flare and Bound Marker System : Monitors each recent bar for the combination of above-threshold volume and boundary zone proximity, rendering bright glowing line segments on the channel edge when qualifying conditions are met, and places diamond markers at the first bar of each new boundary touch.
Centerline Flow and End Profile Engine : Divides the centerline into sixty flow segments and computes volume-weighted directional bias for each, coloring segments by flow direction and strength. Simultaneously accumulates overlap-weighted buy and sell volume into channel rows across the full window, smooths the distribution, and renders horizontal profile bars extending from the current bar edge.
This design ensures volume participation is embedded into every layer of the channel visualization while the end profile provides a complete cumulative distribution summary that updates with each new bar.
How It Works
Volume Regression Channel evaluates price through a sequence of regression-aware and volume-integrated processes:
Regression Curve Fitting : On the last bar, the OLS matrix computation produces a prediction array covering all bars in the configured lookback window using either a linear or polynomial fit to HL2, providing the baseline curve that all channel geometry and volume positioning follows.
Channel Width Calculation : The standard deviation of HL2 over the regression window multiplied by the SD multiplier defines the channel half-width, establishing the upper and lower boundary distances from the curve at each bar position.
Gradient Fill Construction : Three polyline polygon regions are constructed for each of the upper and lower channel halves at proportional fractions of the standard deviation width, filled with progressively increasing opacity from inner to outer to produce a smooth visual gradient across the channel depth.
Boundary Glow Rendering : Triple polylines at the upper and lower channel boundaries create a glow effect using wide low-opacity outer lines and a narrow full-opacity core line, providing visually prominent boundary markers that follow the regression curve.
Volume Normalization and Splitting : For each bar in the volume display window, raw volume is normalized against the window maximum to produce a proportional height score. Close position within the high-low range splits this height into buy and sell components, with the buy portion anchored to the lower boundary and the sell portion anchored to the upper boundary pointing inward.
Inward Bar Rendering : Buy and sell component heights are rendered as inward-pointing lines from the respective channel edges with dynamic width scaling based on relative volume and opacity intensifying for above-average participation bars.
Edge Flare Detection : Each recent bar is tested for the combination of volume exceeding the flare multiplier threshold and price high or low reaching within the configured edge zone percentage of the channel boundary. Qualifying bars receive bright dual-layer line segments on the boundary edge with width scaling by relative volume strength.
Bound Diamond Placement : Each bar is tested for initial channel boundary contact, with a diamond marker placed at the first bar of each new upper or lower boundary touch to mark where price newly reached the statistical extremes.
Centerline Flow Coloring : The centerline is divided into sixty equal segments and each segment's volume-weighted close position bias is computed across its constituent bars. Segments are colored green, red, or neutral based on the directional flow value and intensity with line width scaling to strength.
End Profile Construction : All bars in the regression window contribute their volume to the profile rows based on price overlap between the bar range and each row boundary, with the contribution split into buy and sell portions by close position. The accumulated distribution is smoothed and normalized before rendering as horizontal buy and sell bars extending from the current bar.
Together, these elements form a continuously updating integrated price-volume framework where the regression structure, volume participation, flow direction, and cumulative distribution are all rendered within the same channel geometry on each bar update.
Interpretation
Volume Regression Channel should be interpreted as a regression-anchored structural framework with embedded volume participation intelligence at every level:
Regression Curve : The fitted centerline represents the trend's statistical best-fit path through the lookback window, with the flow-colored segments revealing whether volume-weighted directional bias above or below the curve was predominantly bullish or bearish across each portion of the window.
Channel Boundaries : The upper boundary with its red glow represents the upper standard deviation limit where price is statistically extended above the regression expectation. The lower boundary with its green glow represents the lower limit where price is statistically extended below.
Gradient Fill Depth : The three-layer gradient within each channel half provides visual depth cues, with the innermost near-transparent fill representing mild deviation and the outermost fully opaque fill representing maximum channel boundary proximity.
Inward Buy Bars (Green) : Lines extending upward from the lower channel boundary reflect the buy-attributed volume portion of each bar. Taller bars indicate greater buying participation. Brighter coloring indicates above-average total volume on that bar.
Inward Sell Bars (Red) : Lines extending downward from the upper channel boundary reflect the sell-attributed volume portion of each bar. Taller bars indicate greater selling participation. Brighter coloring indicates above-average total volume.
Neutral Volume Bars (Gray) : Below-average volume bars render in neutral gray regardless of direction, identifying periods of low participation where the directional split carries reduced analytical significance.
Edge Flares : Bright glowing line segments on the channel boundary mark bars where significant volume occurred close to the boundary edge, identifying high-participation boundary interaction events that frequently precede reversals or continuations from the statistical extremes.
Bound Diamonds : Small colored diamonds at boundary touch initiation bars mark where price first reached the channel edge after a period of interior activity, identifying the onset of boundary interaction sequences.
End Profile : The horizontal bar chart extending from the right edge shows the cumulative volume distribution across the channel's price range for the full regression window, with green segments showing buy-attributed volume and red segments showing sell-attributed volume at each price row. The longest bars identify the price levels with the greatest total participation concentration.
Colored Candles : Optional candle coloring reflects whether price is above or below the regression centerline, providing a continuous directional bias reference directly on the price chart.
Boundary proximity, inward bar height and direction, edge flare frequency, centerline flow coloring, and end profile distribution collectively provide more analytical depth than any element in isolation.
Signal Logic & Visual Cues
Volume Regression Channel does not generate discrete buy or sell signals but provides continuous structural and volume participation reference through several interaction cues:
Edge Flare Events : High-volume boundary proximity bars highlighted by bright edge flares identify exceptional participation at the statistical extremes, marking the bars most likely to precede structural reactions from channel boundaries.
Bound Diamond Initiation : Diamond markers at the first bar of new boundary touches identify where price has newly entered channel extreme territory, providing early warning of boundary interaction sequences before their outcome is determined.
Centerline flow segment coloring provides ongoing directional pressure context across the full window, with color and width encoding whether the volume-weighted bias at each point in the regression history was bullish, bearish, or neutral.
Strategy Integration
Volume Regression Channel fits within regression-informed structural and volume-participation-based analytical approaches:
Boundary Interaction Trading : Use channel boundary touches combined with edge flare presence as elevated-significance interaction events. High-volume flares at the boundary suggest meaningful participation at the statistical extreme that frequently precedes a reaction back toward the centerline or a volume-supported continuation beyond it.
End Profile Acceptance Reading : Use the end profile distribution to identify the price rows with the greatest cumulative participation concentration. Price returning to high-volume profile rows encounters levels where the greatest historical participation occurred within the regression window, making them structurally significant references for support, resistance, or reversion.
Inward Bar Volume Divergence : Monitor situations where price is approaching a boundary but inward bar height from the opposing direction is increasing, indicating growing participation against the directional move and potentially signaling that the boundary interaction will result in rejection rather than continuation.
Centerline Flow Direction : Use centerline flow coloring as a mid-channel directional bias indicator. Sustained green flow segments suggest dominant buying pressure within the regression window. Sustained red segments suggest dominant selling. Neutral gray segments indicate a contested equilibrium without clear directional participation weight.
Regression Mode Selection : Use Polynomial mode for markets with visible curvature in their trend structure where the quadratic bend produces a more accurate fit. Use Linear mode for markets trending in a straight consistent direction where the polynomial's additional degree of freedom would overfit noise.
Profile Distribution Skew Analysis : Compare the buy and sell distribution balance in the end profile to assess whether the window's participation was predominantly concentrated above or below the centerline, providing a volume-based directional bias reading that complements the price-based trend assessment.
Technical Implementation Details
Regression Engine : Matrix OLS with design matrix construction, normal equation formation, matrix inversion, and prediction array application for linear or polynomial curve fitting to HL2
Channel Construction : Standard deviation-scaled channel width with three-layer gradient polyline fills and triple-line glow boundaries following the regression curve
Inward Volume System : Window-maximum normalization with close-position buy-sell splitting, dynamic width scaling by relative volume, and above-average volume color intensification
Edge Flare System : Volume multiplier threshold combined with boundary zone percentage proximity testing with dual-layer glow line rendering and width scaling by relative volume
Centerline Flow : Sixty-segment volume-weighted close-position bias computation with directional color and width encoding
End Profile : Overlap-weighted row accumulation across the full regression window with three-point smoothing, normalization, and horizontal buy-sell bar rendering with curved outline polyline
Performance Profile : All rendering triggered on last bar with full object cleanup and rebuild each cycle, configurable regression length capped at 490 bars for object management
Optimal Application Parameters
Timeframe Guidance:
1 - 5 min : Intraday regression flow tracking with shorter length and tighter SD multiplier for fast-adapting channel that captures intraday trend structure with responsive volume distribution
15 - 60 min : Session-level structural volume analysis with balanced regression length and moderate SD multiplier for meaningful channel geometry across typical session directional moves
4H - Daily : Swing-level regression channel profiling with longer lookback and polynomial mode for a curve-following channel spanning multi-session trend structures
Suggested Baseline Configuration:
Regression Length : 236
SD Multiplier : 1.75
Mode : Polynomial
Volume SMA : 15
Bar Height (ATR×) : 2.1
Show Edge Flares : Enabled
Show Bound Diamonds : Enabled
Show Centerline : Enabled
Show End Profile : Enabled
Color Candles : Enabled (requires disabling original chart candles in chart settings)
These suggested parameters should be used as a baseline; their effectiveness depends on the instrument's volatility characteristics, volume behavior, and preferred channel sensitivity, so fine-tuning is expected for optimal performance.
Parameter Calibration Notes
Use the following adjustments to refine behavior without altering the core logic:
Channel too wide or narrow : Adjust SD Multiplier to expand or contract the channel width relative to the instrument's typical deviation from the regression curve, calibrating boundary distance to realistic price excursion ranges.
Curve fits too loosely to recent price : Decrease Regression Length to shorten the lookback window, producing a tighter curve that adapts more quickly to recent structural changes. Switch to Polynomial mode if visible trend curvature is present.
Inward bars too tall or short : Adjust Bar Height (ATR×) to scale the maximum inward bar height, making volume bars more prominent during high-participation sessions or more subtle on instruments with lower volume variance.
Too many or too few edge flares : Increase Flare Volume Multiplier to restrict flares to only exceptional volume events, or adjust Flare Edge Zone % to control how close to the boundary price must be before a flare qualifies.
End profile too wide or compact : Adjust Profile Width to control the maximum horizontal extent of the end profile bars, calibrating the profile size to the available chart space at the current zoom level.
Profile rows too coarse or granular : Adjust Profile Rows to increase or decrease vertical resolution, with higher values providing finer detail across the channel's price range and lower values producing broader, more readable rows.
Too many bound diamonds cluttering the chart : The diamond system marks only first-bar boundary touches. On instruments with frequent boundary contact the marker density may be high. Disable Show Bound Diamonds and rely on edge flares alone for boundary interaction identification.
Adjustments should be incremental and evaluated across multiple session types rather than isolated market conditions.
Performance Characteristics
High Effectiveness:
Trending markets where the regression curve provides an accurate fit to the directional price path and the channel boundaries represent meaningful statistical extremes with genuine participation significance
Liquid instruments with consistent volume where the buy-sell splitting produces reliable directional participation readings and the end profile accumulates a statistically meaningful distribution across the regression window
Boundary interaction strategies where edge flares and bound diamond markers identify high-participation channel extreme events that frequently precede structural reactions
Distribution analysis workflows where the end profile provides a regression-relative volume profile summary that replaces or complements standalone volume profile indicators
Reduced Effectiveness:
Choppy, directionless markets where the regression curve has no clear shape and channel boundaries are penetrated frequently without the sustained trend structure required for meaningful boundary interaction analysis
Low-liquidity instruments where thin volume produces unreliable buy-sell splits and end profile distributions that reflect random participation patterns rather than genuine directional flow
Markets with frequent gaps where the HL2 series used for regression produces curves distorted by discontinuous price events that shift the channel relative to actual price structure
Very short regression windows where insufficient bars per channel row produce end profiles dominated by noise rather than statistically meaningful participation concentration
Consolidation environments where price oscillates near the regression centerline without reaching channel boundaries, reducing the analytical value of edge flares and bound diamonds while producing uniformly short inward bars
Integration Guidelines
Confluence : Combine with BOSWaves momentum tools, order block analysis, or structural indicators to validate channel boundary interactions and edge flare events with broader analytical context
End Profile Reference : Use the end profile distribution as a volume-based reference layer for price levels visited by price within the regression window. High-volume rows in the profile identify price levels with the greatest historical participation concentration, making them structurally significant references for future interaction.
Inward Bar Divergence Monitoring : Monitor inward bar height on opposing sides as price approaches boundaries. Growing opposing-side bars during boundary approach suggest increasing counter-directional participation that may oppose the boundary continuation.
Regression Mode Consistency : Maintain a consistent regression mode when using the channel as an ongoing structural reference. Switching between Linear and Polynomial shifts the curve and redistributes the channel geometry, making successive comparisons of profile distribution and boundary levels unreliable.
Centerline Cross Awareness : Treat price crossing the regression centerline as a potential flow transition event. Combined with a centerline flow segment color change from one direction to the other, centerline crossings with above-average volume suggest genuine directional repositioning within the channel structure.
Disclaimer
Volume Regression Channel is a professional-grade regression-anchored volume flow analysis tool. It uses OLS curve fitting with close-position volume splitting and cumulative profile construction but does not predict future price movements. Results depend on market conditions, instrument volume characteristics, parameter selection, and disciplined execution. BOSWaves recommends deploying this indicator within a broader analytical framework that incorporates momentum context, order flow analysis, and comprehensive risk management. Wskaźnik

Adaptive SuperTrend AI - Regime-Tuned [Dots3Red]📈 ADAPTIVE SUPERTREND AI — REGIME-TUNED
Classic SuperTrend uses one fixed ATR multiplier forever. That single number is a compromise: tight enough to track trends closely, it whipsaws during ranges; wide enough to survive ranges, it lags badly once a real trend starts. This script replaces the fixed multiplier with one that changes based on what kind of market is actually happening, using the same regime-detection engine shared across the Dots3Red catalog.
🧠 THE REGIME ENGINE
Every bar is classified into one of four states using ADX and the Choppiness Index together:
• 📈 TRENDING — ADX confirms directional strength and Choppiness confirms low chop
• 🔁 RANGING — the opposite: weak directional strength, high chop
• ⚡ VOLATILE — current ATR has expanded well beyond its baseline, regardless of direction or chop
• ❔ UNCERTAIN — none of the above conditions are clearly met
The raw regime reading is smoothed by taking the most frequent classification over a short lookback window, so a single noisy bar can't flip the regime label back and forth.
🤔 WHY RANGING GETS THE WIDEST BAND, NOT TRENDING
This is the part that looks backwards at first glance, so it's worth explaining directly. A ranging market chops back and forth around a mean — if the band were narrow here, ordinary noise would cross it constantly, causing false flips. So RANGING gets the widest multiplier (default 3.5×), letting normal chop stay inside the band. A TRENDING market is moving with genuine conviction, so a moderate multiplier (default 2.5×) tracks the move closely without giving back excessive profit before flipping on an actual reversal. VOLATILE conditions get the widest multiplier of all (default 4.5×) as a purely defensive setting, since sudden expansion is unpredictable by nature.
When the regime changes, the active multiplier doesn't jump to its new value instantly — it glides toward it over a configurable number of bars. This prevents the band from visibly teleporting on a regime transition, which would otherwise look jarring and could itself trigger a false flip right at the transition point.
The underlying band mechanics — the ratcheting upper/lower band logic, and a flip only when price closes beyond the active band — are the same as classic SuperTrend. Only the multiplier driving the band width is dynamic.
✅ THE CONFIDENCE LAYER
A SuperTrend flip is a single binary event: price crossed the band, direction changed. This script adds a secondary read on how convincing that flip actually is, using 8 independent checks against the new direction:
1. Close vs. a trend moving average
2. MACD histogram sign
3. Recent higher-high / lower-low structure
4. Close vs. the SuperTrend's own midline (hl2)
5. RSI side of 50
6. +DI vs. -DI dominance
7. Volume above its moving average on a trend-direction bar
8. Whether the regime is currently TRENDING
Every confirmed flip shows this count directly on its label — "▲ 6/8" means 6 of the 8 checks currently agree with the new uptrend. A flip with 7/8 agreement and one with 3/8 are treated identically by the raw band mechanics, but this layer gives a way to distinguish a well-supported flip from a marginal one at a glance.
🎯 FLIP WIN-RATE TRACKING
Each flip is graded once the following flip occurs: did price actually finish above the flip price (for an up-flip) or below it (for a down-flip) by the time direction changed again? This produces a running win rate — for example "58% (n=34)" — shown in the dashboard. It is a simple, honest measure of how the flips on this specific chart have actually played out, not a backtest or a promise about future flips.
🔒 NON-REPAINTING
Flips, confidence readings, and labels are all evaluated only on confirmed (closed) bars. A flip that appears on the chart will not later disappear or move to a different bar as new price data arrives.
🎨 VISUALS AND CUSTOMIZATION
The SuperTrend line and gradient fill are colored by current direction. Flip labels appear directly on confirmed flip bars with their confidence count. An optional background tint can shade the chart by current regime. All four core colors (bullish, bearish, volatile/warning, and uncertain/neutral) are fully customizable in settings, independent of the script's default palette.
The dashboard (position configurable) shows: current direction, current regime, the active ATR multiplier, the confidence count with a progress bar, the running flip win rate, and the raw ADX, Choppiness, and ATR ratio readings behind the regime classification.
🧭 HOW TO USE
👀 Reading the line and fill — the colored line and gradient fill show current direction at a glance. This is the same information classic SuperTrend gives you; the difference here is in how the band width behind that line was chosen.
🧠 Check the regime before trusting the band width — the dashboard's Regime row tells you why the band is currently as wide (or narrow) as it is. A band that looks unusually wide isn't a bug — it likely means the engine has classified the market as RANGING or VOLATILE and widened defensively. Knowing the current regime helps set expectations for how the band will behave if conditions stay the same.
✅ Use the confidence count to gauge flip quality, not to filter flips — every flip is real and non-repainting regardless of its confidence count. The count is a lens for judging how broadly supported a given flip is, not a gate that decides whether one occurs. A "▲ 7/8" flip and a "▲ 3/8" flip both mean the band was crossed; the number tells you how much independent agreement existed at that moment, which is useful context when deciding how much weight to put on that particular signal versus your own analysis.
🎯 Watch the flip win rate as a running self-check on this chart — because it only starts once flips have accumulated and been graded, treat an early or low-sample win rate as inconclusive rather than a verdict. It becomes more informative the longer the script runs on a given symbol and timeframe.
🔔 Regime changes are themselves informative — the alert for a regime change fires independently of any flip. A shift from RANGING to TRENDING, for example, can be useful context on its own, since it signals the band is about to glide toward a different multiplier even before any flip occurs.
🚫 This script describes band behavior, not entries or exits — it does not tell you when to open or close a position. Use it as one input alongside price action, structure, and whatever other analysis you already rely on.
⚙️ SETTINGS
📈 SuperTrend Core
• ATR Length
• Factor — Trending / Ranging / Volatile / Uncertain — the four regime-driven multipliers
• Factor Transition (bars) — how gradually the multiplier glides between regimes
🧠 Regime Engine
• ADX Length, Choppiness Length, ATR Baseline Period
• Trending / Ranging Thresholds — where the combined ADX+Choppiness score is classified
• Volatile ATR Multiple — how far above baseline ATR counts as volatility expansion
• Regime Smoothing — lookback window for the majority-vote smoothing
✅ Confidence Layer
• Trend MA Length, RSI Length, Structure Lookback — parameters for the 8 confidence checks
🎨 Visualization
• Gradient Fill, Flip Labels, Regime Background Tint — each toggleable independently
• Full color customization for all four regime/direction colors
🖥️ Dashboard
• Show/hide, position
📝 NOTES
The regime engine needs a short warm-up period before its smoothing window is fully populated; early bars on a fresh chart may show less stable regime labels than bars further along. The flip win rate starts empty and only becomes meaningful after several flips have occurred and been graded.
⚠️ DISCLAIMER
This is an analytical and visualization tool. It does not generate trade signals and does not constitute financial advice. Historical flip win rate does not guarantee future performance. Wskaźnik

Volume Forge█ OVERVIEW
Volume Forge is a modular volume flow analysis panel designed to assess the quality and direction of market activity by combining several complementary volume analysis methods.
Most volume tools answer only one question. Delta shows buying and selling pressure. RVOL indicates whether volume is above average. CMF measures capital flow. Weis Wave determines the direction of the dominant wave, while volume efficiency analysis helps detect absorption. Each of these tools is valuable, but when analyzed separately they present only a fragment of the market picture.
Volume Forge was designed as a modular system because a single volume indicator does not allow the market to be evaluated from a broader perspective. High volume does not yet mean buyer dominance. Positive delta does not necessarily mean capital inflow. Strong money flow does not always translate into an efficient price move. Only the mutual agreement of several independent methods makes it possible to determine whether the observed impulse is truly supported by volume.
Each module analyzes a different aspect of the same phenomenon, while the central element of the indicator is Flow Confluence – a weighted scoring system that compares the results of all components and evaluates the degree of their agreement. Instead of manually analyzing several separate indicators, the user receives one coherent panel that shows both the details of individual metrics and their final assessment.
The result is a tool that allows multidimensional volume analysis – from short-term buying and selling pressure, through relative market activity strength and capital flow, to the evaluation of signal agreement and the detection of potential signs of trend exhaustion.
█ CONCEPTS
Delta Oscillator
Delta Oscillator is the main module of the indicator and is responsible for assessing the direction of buying and selling pressure. Instead of using real delta from the futures market, it uses approximate directional volume calculated from the relationship between the candle's open and close, scaled by the candle's total range. The values are then accumulated and smoothed, creating an oscillator that shows the dominance of one side of the market.
Delta primarily answers the question:
Is buying or selling pressure currently dominant?
Relative Volume (RVOL)
RVOL compares current volume with its historical average, showing whether market activity is average, elevated or extreme.
The direction of a price move alone says little without information about the strength of market participation. RVOL allows impulses supported by high activity to be distinguished from moves that occur on low volume.
RVOL answers the question:
Is the current move taking place on sufficiently high volume?
Chaikin Money Flow (CMF)
CMF analyzes capital flow by taking into account both volume and the position of the close within the candle’s range.
Unlike Delta, which measures short-term directional pressure, CMF shows whether capital is actually flowing into or out of the instrument. This allows it to confirm or challenge signals generated by the other modules.
CMF answers the question:
Is money actually flowing into the market?
Volume Efficiency / Climax
High volume does not always lead to a large price move. Sometimes the market generates very high activity while the price remains almost motionless.
The Volume Efficiency module identifies exactly these situations by comparing the size of the price move with volume and filtering them relative to ATR. High volume with low efficiency may indicate absorption or the final phase of an impulse.
This is an informational module that provides additional context but does not affect the final Flow Confluence score.
Weis Wave
Weis Wave presents the direction of the dominant market wave instead of analyzing individual candles.
The module uses ATR-based volatility to determine moments of direction change and displays a subtle background that shows the currently dominant wave.
It answers the question:
What is the broader direction of market movement?
Flow Confluence
Flow Confluence is the most important element of the entire indicator.
It is not another oscillator, but analyzes the agreement of all the remaining modules. Delta, Delta direction, RVOL, CMF level, CMF direction and Weis Wave cast votes for the buying or selling side. Each component has its own weight, so the user can decide which elements should have the greatest importance.
The Flow Confluence table shows both the number of agreeing modules and the final point score. Signals appear only when the obtained score exceeds the defined threshold.
Flow Confluence answers the question:
Do all volume analysis methods point in the same direction?
Divergence Detection
The final layer is the analysis of divergences between price and the Delta oscillator.
If price makes a new extreme while Delta does not confirm the move, this may indicate weakening pressure from one side of the market and increase the probability of a correction or trend reversal.
Divergences serve a warning function and provide additional context when interpreting the other modules.
Why combine multiple volume tools?
Each method analyzes a different aspect of volume flow:
• Delta → Who currently dominates – buyers or sellers?
• RVOL → Is market activity high enough?
• CMF → Is capital actually flowing in or out?
• Volume Efficiency → Does volume translate into price movement, or is it being absorbed?
• Weis Wave → What is the dominant direction of the broader wave?
• Flow Confluence → Do all modules confirm the same scenario?
• Divergences → Is price starting to diverge from volume?
█ FEATURES
Oscillator Settings
• Show Delta Oscillator – displays the main Delta oscillator together with gradient fill. Hiding the oscillator does not disable its calculations – the module continues to participate in the Flow Confluence scoring.
• Cumulative Delta Length – number of bars used to calculate cumulative directional volume.
• Smoothing Length (EMA) – length of the EMA that smooths the Delta oscillator. Higher values produce a smoother but slower-reacting oscillator.
• Delta Area Gradient Transparency – sets the transparency of the fill between the Delta oscillator and the zero level.
RVOL Settings
• Show RVOL Histogram – displays the Relative Volume histogram. Hiding the histogram does not disable calculations – RVOL continues to feed the Climax and Flow Confluence modules.
• RVOL Average Length – number of bars used to calculate the average reference volume.
• Threshold – Weak – level above which volume is considered slightly elevated.
• Threshold – Medium – medium-high volume level. It is also used by the Flow Confluence scoring.
• Threshold – Strong – defines the strong Relative Volume level.
• Threshold – Extreme – defines the exceptionally high volume level used for the strongest histogram highlighting.
CMF Settings
• Show CMF – displays the Chaikin Money Flow wave above the overbought level and below the oversold level.
• CMF Period – number of bars used for Chaikin Money Flow calculations.
• CMF Gradient Transparency – sets the transparency of the CMF wave gradient fill.
Volume Efficiency
• Show Climax / Absorption Markers – displays markers on candles where very high volume did not translate into a correspondingly large price move, which may indicate absorption or culmination of activity.
• Efficiency Normalization Period – number of bars used to normalize volume efficiency.
• RVOL Threshold for Climax / Absorption – minimum Relative Volume required to classify a candle as potential absorption.
• Max Normalized Efficiency – maximum allowed price move efficiency. Lower values result in more selective absorption detection.
• Max Candle Range relative to ATR – prevents large impulsive candles from being marked as absorption by limiting their maximum range relative to ATR.
Weis Wave – Oscillator Background
• Highlight background by Weis Wave direction – colors the pane background according to the direction of the current Weis Wave.
• ATR Length – ATR period used to determine the minimum move required to change wave direction.
• ATR Multiplier – determines how large a price move is required to reverse the Weis Wave direction.
• Highlight Transparency – transparency of the Weis Wave background.
• Highlight Height – height of the highlighted area above the overbought level or below the oversold level.
Divergence Settings
• Enable Divergence Detection – activates detection of divergences between price and the Delta oscillator.
• Pivot Length (Left / Right) – number of bars required to confirm local pivots used when searching for divergences.
Threshold Levels
• Overbought Threshold – defines the Delta oscillator level considered market overbought.
• Oversold Threshold – defines the Delta oscillator level considered market oversold.
• OB/OS Line Width – thickness of the overbought and oversold level lines.
• OB/OS Gradient Transparency – Close to Level – sets line visibility when the oscillator is near the level.
• OB/OS Gradient Transparency – Far From Level – sets line visibility when the oscillator is far from the level.
Flow Confluence
• Show Flow Confluence Table – displays the table summarizing all modules participating in the scoring.
• Table Position – sets the position of the table on the chart.
• Table Text Size – sets the font size.
Flow Confluence – Weights
Each module can receive its own weight that determines its influence on the final point score.
• Weight: Delta Oscillator – points awarded for the oscillator position relative to the zero level.
• Weight: Delta Direction – points awarded for the rise or fall of the Delta oscillator.
• Weight: RVOL – points awarded when Relative Volume exceeds the medium threshold in line with candle direction.
• Weight: CMF Level – points awarded for confirmation of positive or negative capital flow.
• Weight: CMF Direction – points awarded for accelerating or weakening capital flow.
• Weight: Weis Wave – points awarded for agreement with the direction of the current Weis Wave.
Flow Confluence – Signals
• Enable Flow Confluence Signal – displays BUY and SELL diamonds after the score exceeds the defined threshold.
Signals appear while the candle is still forming, but due to price fluctuations they may also disappear during that time. The signal becomes permanent and does not disappear only after the candle closes.
• Minimum score for a signal – minimum number of points required to generate a signal.
• Signal only on first occurrence – prevents multiple signals from being displayed while the same condition remains active.
• Buy Signal Color – color of the bullish diamonds.
• Sell Signal Color – color of the bearish diamonds.
Colors
• Zero Line – color of the Delta oscillator zero level.
• Bullish Color – main color used by all positive elements of the indicator.
• Bearish Color – main color used by all negative elements of the indicator.
█ APPLICATIONS
Assessing the quality of market moves
The primary use of the indicator is to evaluate whether the current price move is truly supported by volume. By analyzing several independent metrics the user receives a much more complete picture than when using a single volume indicator.
Filtering weak impulses
Not every dynamic price move is backed by adequate volume. Volume Forge helps distinguish impulses supported by real market activity from moves that occur with weak volume confirmation.
Detecting volume absorption
The Climax module identifies situations in which very high volume does not translate into a correspondingly large price move. This may indicate order absorption by larger market participants, profit-taking or gradual exhaustion of the impulse.
Confirming trend direction
Simultaneous analysis of Delta, CMF and Weis Wave makes it possible to determine whether the dominant market direction is confirmed by different aspects of volume flow.
Detecting potential reversals
Divergences between price and the Delta oscillator can signal weakening buying or selling pressure even before a clear trend change appears.
Building a custom volume analysis model
Thanks to the ability to individually weight each module, the user can create their own market assessment model. For example, one trader may place greater emphasis on Delta and RVOL, while another may consider CMF and Weis Wave more important elements of their strategy.
█ NOTES
• Hiding a given module affects only its display. Calculations continue to run in the background and remain available to the Flow Confluence system.
• The Climax / Absorption module is purely informational and does not participate in the final scoring.
• Divergences indicate a discrepancy between price and the Delta oscillator and should be treated as a warning signal, not an automatic reversal signal.
• Flow Confluence signals are best used as a confirming element of market analysis together with structure, price action, support and resistance zones, momentum or other technical analysis tools.
• All module weights are fully configurable, allowing the user to adapt the volume assessment model to their own trading style while retaining the same multi-layered volume flow analysis logic. Wskaźnik

Strategia

Razor Fractal MirrorHistorical analog projection and market-state intelligence
Razor Fractal Mirror scans the recent history of the current chart for past price structures that resemble what's happening right now, then projects how those historical structures resolved forward in time — as a probabilistic scenario, not a prediction.
What It Does
1. Structure Matching
The indicator normalizes the last Pattern Length bars (log-return or percent-change shape, user's choice) and compares that shape against thousands of historical windows going back up to the configured Historical Search Depth. Each candidate is scored on three components:
• Shape correlation — how closely the normalized price path matches
• Normalized error — RMSE between the current and candidate paths
• Regime compatibility (optional) — whether the candidate occurred in a similar trend/volatility regime, measured via EMA distance and ATR-normalized volatility
These three scores combine into a single composite similarity score, weighted by user-configurable inputs.
2. Analog Selection
The engine keeps the three strongest, non-overlapping matches — minimum spacing is enforced so it isn't just picking adjacent bars of the same move — that clear the minimum similarity threshold.
3. Forward Projection
For each matched analog, the indicator replays what price actually did in the bars after that historical structure, rescaled proportionally to the current price. These are blended into a similarity-weighted consensus path, with the individual analog paths shown as secondary "mirror" lines and a confidence cloud representing the spread between them.
4. Mirror Quality Scoring
A composite 0–100 score (graded A+ through D) built from average similarity, regime match, path stability (agreement between analogs plus cloud compactness), and outcome reliability (historical reward-to-risk and target-hit rates from those same analogs).
5. Decision Layer
Combines Mirror Quality, analog agreement, projected move size (in ATR), and optional multi-timeframe bias fusion (four configurable timeframes) into a state: ACTIONABLE, WATCH, or AVOID. Includes early and confirmation checkpoints plus a calculated invalidation level.
6. Live Lifecycle Tracking
Once a mirror is locked, the indicator tracks price adherence to the projected path bar-by-bar, flags drift or invalidation in real time, and records the eventual outcome into a rolling forecast library. That library feeds an adaptive "analog reputation" score that adjusts future decision scoring based on how this specific setup's projections have actually performed — and reports whether the model is trending IMPROVING, STABLE, or DEGRADING.
7. Projection Anchoring
Three modes control how projections behave once drawn: Locked Snapshot (freezes the projection at capture so it doesn't repaint as price moves), Hybrid (controlled refresh), and Live Projection (recalculates continuously).
Why It's Useful
Most "pattern matching" tools just eyeball similar-looking chart shapes. This engine quantifies similarity mathematically (correlation, error, and regime fit), requires multiple independent historical analogs to agree before calling a setup actionable, and — critically — tracks its own projections against real subsequent price action so traders can see adherence, drift, and invalidation as they happen rather than only in hindsight.
Why It's Unique
• Analog selection uses a three-factor composite score, not simple pattern-shape correlation alone.
• Self-tracking forecasts: locked projections are graded against real outcomes and feed an adaptive reputation score — the tool has a memory of its own track record.
• Snapshot anchoring prevents repainting of the displayed projection, addressing a common criticism of analog and projection-style indicators.
• Multi-timeframe fusion cross-checks the projected direction against bias and confidence readings from four additional timeframes before flagging a setup actionable.
Important Notes
Historical similarity does not guarantee a repeated outcome. Projections are analytical scenarios derived from historical analog behavior, not financial advice or a guarantee of future price action. Always combine with proper risk management and a trade plan.
Wskaźnik

TF: VCMA Trend (VCT)TradingFlow: VCMA Trend (VCT)
TradingFlow: VCMA Trend (VCT) is a trend-visualization indicator built on the Vector Coherence Moving Average (VCMA). It changes speed according to the directional consistency of recent price movement, then adds a confirmed low-coherence state, two display modes, and optional low-coherence visuals. The default Dual VCMA Lines mode shows separate Fast and Slow averages, while VCMA Trend Line mode presents one adaptive line with slope colors.
The purpose of VCMA Trend is to make the adaptive line easier to use as trend context without giving every price shock the same importance as a sustained move. When recent vectors point in a consistent direction and several price changes contribute to that result, the VCMA core becomes more responsive. When the path is irregular, oscillatory, or dominated by too little supporting movement, it slows down. A final WMA softens residual movement before the trend visuals are applied.
How the VCMA Core Is Calculated
1. Delay-Coordinate Price Path
VCMA begins with the bar-to-bar change in the selected Source:
d(t) = Source(t) - Source(t-1)
It then represents price as a point on a two-dimensional delay-coordinate path:
X(t) =
Moving from X(t-1) to X(t) creates the lag vector:
z(t) = X(t) - X(t-1) =
Magnitude(t) = sqrt
This representation contains information about both the current price increment and the immediately preceding increment. Persistent movement tends to produce vectors pointing in a similar direction. Back-and-forth movement produces vectors whose directions disagree and cancel when added together.
2. Vector Coherence
Over the selected Coherence Length, VCMA compares the straight-line displacement of this path with the total distance it traveled. Equivalently, it compares the length of the summed vector with the sum of all individual vector lengths:
Sum Vector =
Vector Coherence (rho) = Length of Sum Vector / Sum Magnitude(t)
In expanded form:
rho = sqrt / Sum sqrt
In this form, rho is a two-dimensional path-efficiency, or straightness, ratio.
The triangle inequality keeps rho between 0 and 1. A reading near 1 means the lag vectors are strongly aligned. A reading near 0 means their directions largely cancel. Because both parts of the ratio scale with price movement, the measurement is scale-free and can be used across instruments with different price levels.
3. Effective-Move Support
A coherence ratio alone can become high after one isolated jump because a single large vector has nothing opposing it. VCMA addresses this with an effective-move calculation based on vector magnitudes:
Effective Moves = (Sum Magnitude)^2 / Sum Magnitude^2
This is an effective sample-size measure, not a literal count of bars. It is low when one move dominates the window and increases when several moves make meaningful contributions.
Support = Clamp
The Effective Moves for Full Speed setting controls the target. With the default value of 3, one dominant move receives little support, while a direction backed by several contributing moves can use the full coherence signal. This reduces the tendency to jump immediately to maximum speed after an isolated gap or wick.
4. Coherence-Adaptive Smoothing
The Fast and Slow periods define VCMA's fastest and slowest available EMA-style responses. If the inputs are reversed, the script automatically treats the shorter period as Fast and the longer period as Slow:
Fast Alpha = 2 / (Fast Period + 1)
Slow Alpha = 2 / (Slow Period + 1)
Speed Gate = rho^Coherence Power x Support
Adaptive Alpha = Slow Alpha + (Fast Alpha - Slow Alpha) x Speed Gate
Raw VCMA = Previous Raw VCMA + Adaptive Alpha x (Source - Previous Raw VCMA)
When vector coherence and support are high, Adaptive Alpha moves toward Fast Alpha. When either component is weak, it remains closer to Slow Alpha. Coherence Power controls how demanding this transition is. Higher values reserve fast responses for stronger coherence.
5. Final Output Smoothing
VCMA applies a weighted moving average to the raw adaptive line:
VCMA = WMA(Raw VCMA, Output WMA Length)
The default 3-period WMA gives more weight to recent values and removes small residual turns with modest added lag. Set Output WMA Length to 1 to use the unsmoothed adaptive output.
6. Low-Coherence State
The chart state uses a supported coherence score:
Coherence Score = rho x Support
The main VCMA enters its low-coherence state when this score falls below the Low-Coherence Threshold. It leaves only after the score rises above Threshold x Exit Multiplier. This hysteresis reduces rapid switching near the boundary. State changes occur on confirmed bars.
This state is always calculated from the main VCMA coherence score, including when Dual VCMA Lines is selected. It controls the optional gray Trend Line color, the gray fill between the Dual VCMA Lines, and background shading in either mode.
The low-coherence state describes the structure of recent price movement. It does not simply mean that a plotted line has zero slope. When gray coloring is enabled, a gray VCMA can still drift while the underlying vector evidence remains weak.
The Mathematical Idea Behind the VCMA Core
VCMA introduces a distinctive adaptive-moving-average construction that extends one-dimensional price-path efficiency into a two-dimensional delay-coordinate path and adds an effective-move gate to reduce acceleration caused by isolated shocks.
The delayed price points X(t) = form a path whose steps are the vectors . The coherence ratio is the path's net displacement divided by its total traveled distance. It therefore measures how straight and directionally consistent the recent delayed path has been. Unlike a one-dimensional ratio, it can also respond to irregular relationships between adjacent price changes, even when those changes share the same sign.
The second part of the design is the effective-move support gate. Vector alignment answers, "Do the recent moves point together?" Effective-move support asks, "Is that alignment backed by several meaningful moves, or mostly by one event?" Alpha accelerates only when both tests provide support.
This produces a causal and bounded adaptive core. Alpha remains between the selected Slow and Fast values, while the final WMA uses positive weights and does not introduce projection-based overshoot. VCMA is still a moving average and therefore retains lag; the goal is to allocate that lag according to the quality of the observed path.
Why Use VCT?
VCMA Trend is designed for traders who want the VCMA mathematics combined with direct chart interpretation. Its practical characteristics include:
• Scale-free measurement of directional vector alignment
• Adaptive speed bounded by interpretable Fast and Slow periods
• Reduced maximum-speed reactions to isolated price shocks
• Smoother output through a short final WMA
• Confirmed low-coherence states with hysteresis
• VCMA Trend Line and Dual VCMA Lines display modes
• Optional low-coherence line color, dual-line fill, and background shading
How to Read VCT
VCMA Trend Line
This mode displays the main VCMA with colors derived from slope and, optionally, its confirmed low-coherence state.
Green Line - Rising VCT
In VCMA Trend Line mode, green means the smoothed VCMA is rising and is not currently in its low-coherence state. Price holding above a rising green VCMA supports a bullish trend interpretation. Pullbacks toward the line may provide an adaptive reference when price structure remains constructive.
Red Line - Falling VCT
Red means the smoothed VCMA is falling and is not currently in its low-coherence state. Price holding below a falling red VCMA supports a bearish trend interpretation. Rallies toward the line may help frame bearish continuation when market structure agrees.
Gray Line - Low Vector Coherence
When Gray Trend Line in Low-Coherence Regimes is enabled, gray means supported vector coherence is below the active threshold. This commonly appears during sideways movement, irregular transitions, compression, or periods where a recent move lacks broader participation. Gray is a warning that directional evidence is weak; it is not automatically a reversal signal.
Slope, Price Position, and Distance
A steeper VCMA indicates that its adaptive baseline is changing more quickly. A flattening line suggests that directional progress is weakening. Price staying on one side of a consistently sloped VCMA is more informative than a single touch or crossover.
A rapidly widening distance between price and VCMA can reflect strong momentum, but it can also indicate extension from the adaptive baseline. Repeated crossings usually point to unsettled or range-bound conditions.
Price Crossings as Entry and Exit References
During an established trend, a confirmed crossing between price and the VCMA Trend Line, or between price and the Fast VCMA in Dual VCMA Lines mode, can provide a rule-based entry or exit reference. In a rising trend, price reclaiming the line after a pullback can mark an entry or re-entry, while a confirmed cross below it can mark a reduction or exit. In a falling trend, the interpretation is reversed: price falling back below the line after a rally can mark an entry or re-entry, while a confirmed cross above it can mark a reduction or exit.
Dual VCMA Lines
This mode replaces the color-changing Trend Line with two clean reference lines:
• Cyan - Fast VCMA
• Orange - Slow VCMA
Fast VCMA above Slow VCMA indicates that the shorter adaptive structure is leading the longer one. Fast below Slow indicates the opposite. Expanding separation suggests strengthening directional structure; convergence suggests that the difference between short- and longer-horizon estimates is narrowing. Crossovers mark a change in their relative ordering, not a complete trade signal by themselves.
When Fill Between Dual Lines in Low-Coherence Regimes is enabled, a light transparent gray fill appears between the two lines during the confirmed low-coherence state. The fill is based on the main VCMA coherence score, not on a separate low-coherence calculation for the Fast or Slow line.
Data Window Diagnostics
VCMA Trend exposes four values from its underlying VCMA core in TradingView's Data Window:
• VCMA Coherence Score - raw coherence multiplied by effective-move support
• VCMA Raw Vector Coherence - vector alignment before the support gate
• VCMA Effective-Move Support - how broadly recent vector magnitude is distributed
• VCMA Adaptive Alpha - the smoothing coefficient used by the raw VCMA core
These values help explain why the adaptive core is moving quickly, slowly, or entering its low-coherence state. For example, high raw coherence with low support often means that one dominant move has not yet received enough confirmation from other moves.
Understanding the Settings
Mode
Selects Dual VCMA Lines or VCMA Trend Line. The default is Dual VCMA Lines.
Low-Coherence Display Options
• Fill Between Dual Lines in Low-Coherence Regimes - enabled by default and visible only in Dual VCMA Lines mode
• Gray Trend Line in Low-Coherence Regimes - enabled by default and visible only in VCMA Trend Line mode
• Shade Background in Low-Coherence Regimes - disabled by default and available in either mode
All three options use the same confirmed low-coherence state derived from the main VCMA coherence score.
Source
Selects the price series used by all VCMA calculations. The default is Close.
Coherence Length
The Coherence Length under VCMA Trend Line controls the main VCMA and the low-coherence state used by all display options. Shorter values respond more quickly to changes in vector alignment. Longer values evaluate the path over a broader sample and usually change more gradually. Fast VCMA and Slow VCMA have separate Coherence Length settings under Dual VCMA Lines.
Fast Period and Slow Period
Define the fastest and slowest EMA-style responses available to the adaptive core. Shorter Fast values increase maximum responsiveness. Longer Slow values make VCMA more conservative when coherence or support is weak.
Coherence Power
Shapes how raw coherence affects speed. Higher values suppress medium coherence more strongly and require rho to move closer to 1 before alpha accelerates substantially. Lower values create a softer and earlier response.
Effective Moves for Full Speed
Controls how much participation is required before the support gate reaches 1. Higher values demand broader support and reject isolated movement more strongly, but they can delay acceleration at the beginning of a genuine trend.
Output WMA Length
Controls final line smoothing. Higher values create a steadier line with more lag. A value of 1 disables this stage.
Low-Coherence Threshold and Exit Multiplier
The threshold determines when the main VCMA enters its low-coherence state. The multiplier sets the higher level required to leave it. A larger gap between the entry and exit levels produces more stable but slower regime transitions.
Alerts
VCMA Trend Line mode provides confirmed-bar alerts for VCT turning up, turning down, entering low coherence, and leaving low coherence. Dual VCMA Lines mode is intended as a visual fast/slow framework and does not issue those main-line alerts.
Practical Use
VCMA Trend can be used as a directional-bias filter, an adaptive pullback reference, a trend-management baseline, or a way to separate coherent movement from less organized price action. It is most useful when read together with price structure, support and resistance, volatility, volume, and higher-timeframe context.
---
TradingFlow:VCMA Trend (VCT)
TradingFlow:VCMA Trend (VCT) 是以向量一致性移動平均線 ( VCMA ) 為核心的趨勢視覺指標。它會根據近期價格移動的方向一致性調整反應速度,再加入經確認的低一致性狀態、兩種顯示模式,以及可選的低一致性視覺效果。預設的 Dual VCMA Lines 模式會顯示獨立的 Fast 與 Slow 平均線;VCMA Trend Line 模式則以斜率顏色顯示一條自適應線。
VCMA Trend 的用途,是把自適應數學轉化成較容易閱讀的趨勢背景,同時避免把單一價格衝擊誤當成已獲持續支持的走勢。當近期向量方向一致,而且有多個價格變化共同支持該結果時,VCMA 核心會提高反應速度;當路徑反覆、雜亂,或主要由少數變化主導時,它會放慢。最後一層 WMA 先整理細微波動,然後才套用趨勢視覺。
VCMA 核心如何計算
1. 延遲座標價格路徑
VCMA 先計算所選 Source 每根 K 線的價格變化:
d(t) = Source(t) - Source(t-1)
然後把價格表示為二維延遲座標路徑上的一個點:
X(t) =
由 X(t-1) 移動至 X(t) 時,便會形成滯後向量:
z(t) = X(t) - X(t-1) =
Magnitude(t) = sqrt
持續的方向移動通常會產生方向相近的向量。來回震盪時,向量方向互相矛盾,相加後便會抵消。
2. 向量一致性
在 Coherence Length 所設定的週期內,VCMA 比較這條路徑的直線位移與實際行走總距離。等價地說,就是比較「向量總和的長度」與「所有個別向量長度的總和」:
Sum Vector =
Vector Coherence(rho)= Sum Vector 的長度 / Sum Magnitude(t)
完整公式為:
rho = sqrt / Sum sqrt
以這種形式理解,rho 就是二維路徑效率,亦即路徑直線度的比率。
根據三角不等式,rho 會保持在 0 至 1 之間。接近 1 表示滯後向量大致朝向相同方向;接近 0 表示它們大部分互相抵消。分子與分母都會隨價格變化幅度按比例改變,因此這個比率不受商品價格尺度影響。
3. 有效移動支持度
單靠一致性比率仍有一個問題:如果視窗內只有一次孤立的大幅移動,由於沒有其他向量與它抵消,rho 也可能偏高。VCMA 使用向量幅度計算有效移動數,以減少這種情況:
Effective Moves = (Sum Magnitude)^2 / Sum Magnitude^2
這是有效樣本數的概念,不是 K 線數量的直接計數。當一個移動佔據大部分向量幅度時,數值會偏低;當多個移動都有實質貢獻時,數值便會上升。
Support = Clamp
Effective Moves for Full Speed 設定支持度達到 1 所需的目標。預設值為 3,因此單一主導移動只會得到有限支持;當同一方向獲得多個價格變化配合後,完整的一致性訊號才會投入速度計算。這可減少 VCMA 因單一裂口或影線而立即切換至最高速度的情況。
4. 一致性自適應平滑
Fast 與 Slow 週期定義 VCMA 可使用的最快及最慢 EMA 式反應。即使輸入次序相反,程式仍會把較短週期視為 Fast,較長週期視為 Slow:
Fast Alpha = 2 / (Fast Period + 1)
Slow Alpha = 2 / (Slow Period + 1)
Speed Gate = rho^Coherence Power x Support
Adaptive Alpha = Slow Alpha + (Fast Alpha - Slow Alpha) x Speed Gate
Raw VCMA = Previous Raw VCMA + Adaptive Alpha x (Source - Previous Raw VCMA)
當向量一致性與支持度同時偏高,Adaptive Alpha 會接近 Fast Alpha;任何一項偏弱,Alpha 便會靠近 Slow Alpha。Coherence Power 控制速度轉換的要求。數值越高,VCMA 越需要接近完整一致性才會明顯加速。
5. 最終輸出平滑
VCMA 會對原始自適應線套用一層加權移動平均:
VCMA = WMA(Raw VCMA, Output WMA Length)
預設的 3 週期 WMA 對近期數值給予較高權重,可減少細微轉折,同時只增加有限延遲。把 Output WMA Length 設為 1,即可停用這層平滑。
6. 低一致性狀態
圖表狀態使用經支持度調整的一致性分數:
Coherence Score = rho x Support
當分數低於 Low-Coherence Threshold,主 VCMA 會進入低一致性狀態。分數其後必須升穿 Threshold x Exit Multiplier,低一致性狀態才會結束。兩個不同門檻形成遲滯,可減少狀態在邊界附近反覆切換。狀態只會在 K 線確認後更新。
即使選擇 Dual VCMA Lines,這個狀態仍然由主 VCMA 的一致性分數計算。它會控制可選的 Trend Line 灰色顯示、Dual VCMA Lines 之間的灰色填充,以及兩種模式都可使用的背景陰影。
低一致性描述的是近期價格路徑結構,不等於圖表線條的斜率必須為零。啟用灰色顯示後,灰色 VCMA 仍可能緩慢上升或下降,但其背後的向量證據仍然偏弱。
VCMA 核心的數學設計
VCMA 採用一種具辨識度的自適應移動平均線結構:把一維價格路徑效率延伸為二維延遲座標路徑,並加入有效移動閘門,以降低孤立價格衝擊造成的加速。
延遲價格點 X(t) = 形成一條路徑,而 就是路徑上的每一步。向量一致性比率等於路徑的淨位移除以實際行走總距離,因此可衡量近期延遲路徑有多筆直,以及方向有多一致。與一維比率不同,即使價格變化方向相同,若相鄰變化之間的關係反覆而不規則,這個二維比率仍可作出區分。
第二部分是有效移動支持閘門。向量一致性回答「近期移動是否大致朝向同一方向」;有效移動支持度則判斷「這個結果是否有多個具實質幅度的移動支持,還是主要來自單一事件」。只有兩項條件同時成立,Alpha 才會明顯提高。
這個自適應核心只使用當前及過往資料,而且 Alpha 保持在所選的 Slow 與 Fast 範圍內。最後的 WMA 只使用正權重,不會加入價格投射造成的過衝。VCMA 仍然是移動平均線,因此一定存在延遲;它的目標是根據已觀察到的路徑品質分配反應速度。
為何使用 VCT?
VCMA Trend 適合希望把 VCMA 數學與直接圖表判讀結合的交易者。它有以下實用特點:
• 以不受價格尺度影響的比率衡量向量方向一致性
• 反應速度受具體的 Fast 與 Slow 週期限制
• 降低單一價格衝擊觸發最高速度的機會
• 使用短週期 WMA 整理最終輸出
• 以確認 K 線及遲滯機制管理低一致性狀態
• 提供 VCMA Trend Line 與 Dual VCMA Lines 兩種顯示模式
• 可選用低一致性線條顏色、雙線填充及背景陰影
如何閱讀 VCT
VCMA Trend Line
此模式會顯示主 VCMA,線條顏色由斜率及可選的經確認低一致性狀態決定。
綠線 - VCT 上升
在 VCMA Trend Line 模式下,綠色表示平滑後的 VCMA 正在上升,而且目前不處於低一致性狀態。價格維持在上升綠線之上,可支持多頭趨勢判斷。若價格結構仍然穩健,回調至 VCMA 附近可作為觀察趨勢延續的自適應參考。
紅線 - VCT 下跌
紅色表示平滑後的 VCMA 正在下降,而且目前不處於低一致性狀態。價格維持在下降紅線之下,可支持空頭趨勢判斷。若市場結構同樣偏弱,反彈至 VCMA 附近可作為觀察空頭延續的參考。
灰線 - 向量一致性偏低
啟用 Gray Trend Line in Low-Coherence Regimes 後,灰色表示經支持度調整的向量一致性低於有效門檻。這種情況常見於橫行、方向轉換、波幅壓縮,或近期移動尚未得到較廣泛支持的階段。灰色代表方向證據偏弱,並不等於趨勢必然反轉。
斜率、價格位置與距離
VCMA 越陡,表示自適應基準變化越快;線條逐漸走平,則代表方向進展正在減弱。相比一次觸碰或穿越,價格持續位於有明確斜率的 VCMA 同一側更具參考價值。
價格與 VCMA 的距離快速擴大,可能反映動能增強,也可能表示價格已偏離自適應基準。價格反覆穿越 VCMA,通常代表市況仍然反覆或缺乏穩定方向。
價格交叉作為進出場依據
在趨勢已建立時,價格與 VCMA Trend Line 的確認交叉,或在 Dual VCMA Lines 模式下價格與 Fast VCMA 的確認交叉,可作為規則化的進出場依據。在上升趨勢中,價格回調後重新升穿線條,可視為入場或重新入場參考;確認跌穿線條,則可作為減倉或離場依據。在下跌趨勢中,邏輯相反:價格反彈後重新跌穿線條,可作為入場或重新入場參考;確認升穿線條,則可作為減倉或離場依據。
Dual VCMA Lines
此模式會以兩條固定顏色的參考線取代會轉色的 Trend Line:
• 青色 - Fast VCMA
• 橙色 - Slow VCMA
Fast VCMA 位於 Slow VCMA 之上,表示較短期的自適應結構領先較長期結構;Fast 位於 Slow 之下則相反。兩線距離擴大,代表短期與較長期估算的方向差異正在增強;兩線收窄,代表差異正在減少。交叉只表示兩者的相對次序改變,不能單獨視為完整交易訊號。
啟用 Fill Between Dual Lines in Low-Coherence Regimes 後,在經確認的低一致性狀態期間,兩線之間會出現淺灰色半透明填充。填充以主 VCMA 的一致性分數為基礎,不會分別根據 Fast 或 Slow 線計算低一致性狀態。
Data Window 診斷數值
VCMA Trend 在 TradingView 的 Data Window 提供四項底層 VCMA 核心數值:
• VCMA Coherence Score - 原始一致性乘以有效移動支持度
• VCMA Raw Vector Coherence - 未加入支持閘門前的向量一致性
• VCMA Effective-Move Support - 近期向量幅度的分布廣度
• VCMA Adaptive Alpha - 原始 VCMA 核心實際使用的平滑係數
這些數值可解釋自適應核心為何加快、減慢或進入低一致性狀態。例如,Raw Vector Coherence 偏高但 Support 偏低,通常代表一次主導移動尚未獲得其他移動充分配合。
設定說明
Mode
選擇 Dual VCMA Lines 或 VCMA Trend Line。預設為 Dual VCMA Lines。
低一致性顯示選項
• Fill Between Dual Lines in Low-Coherence Regimes - 預設啟用,只會在 Dual VCMA Lines 模式顯示
• Gray Trend Line in Low-Coherence Regimes - 預設啟用,只會在 VCMA Trend Line 模式顯示
• Shade Background in Low-Coherence Regimes - 預設停用,兩種模式都可使用
三個選項均使用主 VCMA 一致性分數所產生的同一個經確認低一致性狀態。
Source
選擇所有 VCMA 計算使用的價格序列,預設為 Close。
Coherence Length
VCMA Trend Line 下的 Coherence Length 會控制主 VCMA,以及所有顯示選項使用的低一致性狀態。較短數值能更快反映向量方向變化;較長數值會在較廣的樣本內評估價格路徑,變化通常較慢。Fast VCMA 與 Slow VCMA 在 Dual VCMA Lines 下各有獨立的 Coherence Length 設定。
Fast Period 與 Slow Period
定義自適應核心可使用的最快及最慢 EMA 式反應。較短的 Fast Period 會提高最大靈敏度;較長的 Slow Period 則會在一致性或支持度偏弱時令 VCMA 更保守。
Coherence Power
控制原始一致性如何影響速度。較高數值會更強地壓低中等一致性的作用,要求 rho 更接近 1 才明顯加速;較低數值則會較早及較平順地提高反應速度。
Effective Moves for Full Speed
控制支持度達到 1 所需的參與程度。較高數值要求更廣泛支持,能更強地抑制孤立移動,但也可能延遲真實趨勢初段的加速。
Output WMA Length
控制最終線條的平滑程度。數值越高,線條越穩定,但延遲亦會增加。設為 1 可停用這一層。
Low-Coherence Threshold 與 Exit Multiplier
Threshold 決定主 VCMA 何時進入低一致性狀態;Multiplier 設定離開該狀態所需的較高門檻。進出門檻距離越大,狀態越穩定,但轉換也會較慢。
警報功能
VCMA Trend Line 模式提供 K 線確認後的警報,包括 VCT 轉為上升、轉為下降、進入低一致性,以及離開低一致性。Dual VCMA Lines 模式主要用作快慢線視覺框架,不會發出上述主線警報。
實際應用
VCMA Trend 可作為方向偏向過濾器、自適應回調參考、趨勢管理基準,亦可協助區分方向一致的走勢與較欠組織的價格行為。使用時可配合價格結構、支撐阻力、波動性、成交量及較高時間週期背景。
Wskaźnik

Wskaźnik

Market Structure Trend [QuantAlgo]🟢 Overview
The Market Structure Trend tracks the dominant directional bias of price by detecting confirmed swing highs and lows and maintaining an active structure level that only flips on a genuine break of that level. Rather than reacting to every minor high or low, it waits for a pivot to lock in after a defined number of bars on either side, then holds the resulting structure until price closes beyond it by an optional confirmation buffer. The result is a clean, non-repainting structure line that stays aligned with the prevailing market structure while filtering out stop hunts and marginal pokes through key levels. This makes the prevailing bias readable at a glance across any instrument or timeframe.
🟢 How It Works
The indicator begins by identifying pivot highs and pivot lows using the selected left and right structure bars. These pivots become the swing points that define market structure:
pivot_high = ta.pivothigh(high, left_bars, right_bars)
pivot_low = ta.pivotlow(low, left_bars, right_bars)
When a new pivot is confirmed, the corresponding swing high or swing low is updated. The active structure range is calculated as the absolute distance between the current swing high and swing low, and a confirmation buffer is derived as a percentage of that range:
structure_range = math.abs(swing_high - swing_low)
confirm_buffer = structure_range * buffer_pct / 100.0
Break levels are then offset by this buffer so that a downside break sits below the swing low and an upside break sits above the swing high. On every confirmed bar the script checks whether the chosen source (or the high or low when Break On Wick is enabled) has crossed the relevant break level. A successful cross reverses structure direction and reassigns the structure level to the opposite swing. If no break occurs, the structure level simply continues to track the swing consistent with the current direction.
Structure direction is seeded on the first ready bar by comparing price to the midpoint of the swing range, establishing an initial bias. From that point forward flips are gated strictly by confirmed breaks, so the state never repaints or changes mid-bar.
The structure level is drawn as a continuous line with a soft glow underneath. When radial layering is enabled, four concentric fills are drawn between the structure level and the bar midpoint, with transparency increasing outward. This produces a stepped radial field that visually maps distance from the active structure boundary rather than a single flat zone.
🟢 Signal Interpretation
▶ Bullish Structure (Structure Line at Swing Low with Bullish Color): When structure direction is bullish the line sits at the most recent confirmed swing low. Price is considered to remain in an uptrend structure as long as it stays above the buffered downside break level. The bullish state holds until a confirmed downside break occurs, at which point the line moves to the swing high and the color transitions.
▶ Bearish Structure (Structure Line at Swing High with Bearish Color): When structure direction is bearish the line sits at the most recent confirmed swing high. Price remains in a downtrend structure until a confirmed upside break flips the state. The bearish state persists through subsequent bars until an upside break is registered.
🟢 Features
▶ Preconfigured Presets: Three parameter sets cover a range of trading styles and timeframes. Default uses the manual Left Structure Bars, Right Structure Bars, and Confirmation Buffer values and is balanced for swing trading on 1-hour and daily charts. Fast Response shortens the structure legs for scalping and intraday use on 1-minute to 1-hour charts, registering minor swings so the structure trend flips earlier. Smooth Trend lengthens the legs for position trading on daily and weekly charts, tracking only major swings and holding through pullbacks with the confirmation buffer.
▶ Built-in Alerts: Three alert conditions support automated monitoring of structure flips. Bullish Structure Shift fires on the first bar that structure direction changes from bearish to bullish. Bearish Structure Shift fires on the opposite transition. Any Structure Shift triggers on either flip for traders who prefer a single unified alert. All messages include the exchange, ticker, and timeframe for immediate context.
▶ Visual Customization: Six color presets (Classic, Aqua, Cosmic, Cyber, Neon, and Custom) supply coordinated bullish and bearish color pairings suited to different chart themes. Selecting Custom unlocks independent color pickers for full manual control. Optional bar coloring tints each candle with the active structure color at a configurable transparency, and optional background coloring extends the same tint across the full chart pane. Radial layering, structure shift markers, and the structure line itself all inherit the active color pair so the entire visual system remains consistent.
Wskaźnik

Trend Continuation Momentum Detector TCMD v3 — Trend Continuation Momentum Detector
Core Concept
TCMD is a weighted multi-factor momentum scoring system built on Heiken Ashi candles. Instead of one signal triggering everything, it blends five independent measurements of "how strong is this move" into a composite Momentum Score (0–100), then layers state logic, filters, and risk levels on top.
The five scoring factors
Body Expansion (30% weight) — Is this candle's body unusually large? Calculated as HA body / 20-bar avg body, scaled to 0–100.
Wick Quality (25% weight) — Is the move "clean" (no rejection)? The wick opposing the candle's direction is measured as a % of body size — a small opposing wick scores high.
Trend Slope (20% weight) — Is the EMA of HA close actually rising/falling with conviction? EMA slope over slopeLookback bars, normalized by ATR, then multiplied by a sensitivity factor.
Volume (15% weight) — Is volume confirming the move? volume / 20-bar avg volume, scaled.
Z-Score / distance from mean (10% weight) — Is price extended from its own EMA in a statistically meaningful (but not extreme) way? (HA close − EMA) / stdev, scored with a bell-shaped curve peaking around 0.5–2.0 SD and decaying past 3 SD (overextended).
These combine into a weighted average (weights auto-normalize even if they don't sum to 100) to produce momentumScore.
Why Heiken Ashi
HA smooths noise so body size/wick logic reflects sustained pressure rather than single-tick noise — important since body expansion and wick quality are core inputs.
Signal Logic — 5-State Machine
Each confirmed bar is classified as:
STRONG BUY — momentumScore > threshold (default 75) AND bullish HA candle AND clean wick AND body > average AND HA close above EMA AND (optional) close above VWAP AND (optional) delta positive
STRONG SELL — mirror conditions to the downside
BUY / SELL (bias) — looser: HA close vs EMA + VWAP direction + momentumScore ≥ 50, no wick/body purity required
NEUTRAL — none of the above
This state drives everything downstream: candle coloring, markers, warnings, and TP/SL.
"One-Shot + EMA Reset" Entry Logic
The key anti-spam mechanism: a Strong Buy/Sell marker fires once per cycle, then locks. It won't fire again until price pulls back and touches the EMA (low touches EMA resets buy-side, high touches EMA resets sell-side). This stops multiple entry signals stacking up during one continuous trending move — you get one entry, then must wait for a retest before the next is valid.
Warning System
Light Warning (diamond) — Strong Buy/Sell degrades to plain Buy/Sell, same direction, losing steam
Heavy Warning (x-cross) — Strong Buy/Sell degrades to Neutral or flips to the opposite bias — reversal risk
These are degradation alerts for managing an existing position, not new directional entries.
VWAP & Delta as Confirmation Filters
VWAP filter — Strong signals optionally require price on the "correct" side of session VWAP. Most meaningful intraday since VWAP resets each session.
Delta filter — pulls real buy/sell volume from a lower timeframe (default 1-min) and requires it to agree with signal direction. Falls back to candle direction (close vs open) when lower-timeframe data isn't available in deep history.
Mean Reversion (MR) Signal — separate counter-trend logic
MR looks for momentum exhaustion at a statistical extreme, the opposite philosophy from the trend signals. It fires when:
Price is ≥ mrSdThreshold VWAP standard deviations away (default 1.8 ≈ near the 2SD band)
Momentum Score is weak (< mrMomentumMax) and optionally fading vs the prior bar
The current HA body is small (neutral) and its real high/low engulfs the previous candle's body — a rejection pattern
Session warm-up (mrMinBars) and minimum VWAP SD width (mrMinSdPct) guards are satisfied so it doesn't fire on noisy early bars
MR has its own optional dotted TP/SL lines and alerts, independent of trend-following TP/SL.
TP / SL Levels
When a fresh Strong Buy/Sell fires, TP1/TP2/SL are calculated from the signal candle's HA range (high−low), drawn from the next bar's real open:
Long: TP1 = entry + 2×range, TP2 = entry + 4×range, SL = entry − 1.5×range
Short: mirrored
An "Active SL" is tracked internally; if close crosses through it, an SL-hit marker/alert fires and clears the level.
How to Use It in Practice
Check the current state first — Strong Buy/Sell, Buy/Sell, or Neutral — as your top-line read.
Strong Buy/Sell circle = entry trigger. TP/SL lines (if enabled) auto-draw on the next bar's open.
Diamond (light warning) = start thinking about trimming/tightening — momentum easing, direction unchanged.
X-cross (heavy warning) = treat as an exit signal for the prior position, not a new entry.
Consecutive strong bars = move is extended, higher risk of a sharp mean-reversion snap — cross-check against MR triangles.
VWAP Z-Score / SD bands — gauge how stretched price is; MR triangles are your explicit counter-trend cue at extremes.
ATR — elevated/high readings mean volatility regime has shifted; sanity-check your TP/SL multiples still fit the current range.
Delta — cross-check real order flow agrees with the HA/EMA-based signal, useful for scalping confirmation beyond price action alone.
One thing worth flagging for your GC/NQ intraday use: the VWAP filter and MR signal are most meaningful on session-based intraday timeframes given the session-reset VWAP — on higher timeframes or across sessions, those two features lose some of their intended meaning. Wskaźnik

Trend Bias TableTrend Bias Table — Indicator Description
Type: Overlay indicator (displays directly on the price chart, top-right corner)
What It Does
Trend Bias Table shows a multi-timeframe directional bias panel — Day, 4 Hour, 1 Hour, and 15 Minute — without using any moving averages. Each timeframe is scored independently as Bullish, Bearish, or Neutral based on pure price action.
How the Bias Is Calculated
For each timeframe, three independent factors are scored:
Market Structure — Detects swing pivot highs/lows (via ta.pivothigh / ta.pivotlow) and compares the two most recent pivots:
Higher High + Higher Low → bullish structure
Lower High + Lower Low → bearish structure
Momentum — A Rate of Change (ROC) calculation measures whether price has moved up or down over a smoothing period, with no lag-inducing moving average involved.
Price vs. Open — Checks whether the current close is trading above or below that timeframe's opening price.
Each factor contributes one point to either a bullish or bearish score. Whichever score is higher determines that timeframe's bias; a tie results in Neutral.
What's Displayed
A clean 2-column, 5-row table pinned to the top-right of the chart:
TIMEFRAME BIAS
Day ▲ BULL / ▼ BEAR / ● NEUT
4 Hour ▲ BULL / ▼ BEAR / ● NEUT
1 Hour ▲ BULL / ▼ BEAR / ● NEUT
15 Min ▲ BULL / ▼ BEAR / ● NEUT
Teal = Bullish
Red = Bearish
Grey = Neutral
Inputs
Swing Pivot Length (default 5) — sensitivity of pivot detection for structure analysis
ROC Smoothing (default 3) — lookback period for the momentum calculation
Use Case
Gives traders a fast, at-a-glance read on trend alignment across timeframes — useful for confirming whether a lower-timeframe setup agrees with the higher-timeframe trend, without cluttering the chart with moving average lines. Wskaźnik

Supertrend + RSI Filter (Advanced TP/SL)OverviewThe Supertrend + RSI Filter (Advanced TP/SL) is a comprehensive trend-following indicator designed for TradingView (Pine Script v5). It combines the trend-detection power of the Supertrend with a dynamic RSI Momentum Filter to eliminate low-probability setups in overbought or oversold conditions.Unlike standard indicators that clear historical lines upon new signals, this script implements a Pine Script v5 Custom Type & Array-based Position Management System. It tracks every trade independently, drawing dynamic Entry, Take Profit (TP), and Stop Loss (SL) lines with centered price labels. Position lines persist on the chart and are ONLY removed when price action officially hits the TP or SL level.
Comprehensive Feature List
Supertrend Trend Detection:
Utilizes Average True Range (ATR) to measure volatility and establish dynamic trailing stop bands for precise trend-direction identification.
RSI Momentum Filtering:
- Buy Filter: Suppresses BUY signals when RSI exceeds the overbought threshold (Default: >70) to prevent buying at local tops.
- Sell Filter: Suppresses SELL signals when RSI drops below the oversold threshold (Default: <30) to prevent selling at local bottoms.
Can be toggled ON/OFF in the settings menu.
Multi-Position Tracking Arrays:
- Employs custom data structures () stored in an to track multiple open trades concurrently. type Position array
- Persistent Lines: Entry (Solid Gray), Take Profit (Dashed Green), and Stop Loss (Dashed Red) lines remain on the chart through opposite trend changes until hit. - Centered Price Labels: Displays label text (, , ) dynamically anchored at the midpoint of each active position line. Entry: XTP: YSL: Z
- Individual Removal: When a specific trade hits its TP or SL target, its corresponding lines and labels are erased immediately without affecting other active trades.
On-Chart Performance Dashboard:
- Displays an updated summary table in the top-left corner of the chart.
- Metrics Included:
Win Rate (%): Percentage of closed trades hitting TP.
Total Trades: Total number of completed historical signals.
Winning & Losing Trades: Count of successful vs. failed setups.
Total Profit (Pips): Cumulative net profit/loss expressed in pips.
RSI Filter Status: Visual indicator showing whether the filter is active ( / ).ONOFF
Dynamic & Multi-Parameter Alert System:
Uses Pine Script’s function to output real-time formatted text messages containing key execution metrics: alert()
Symbol / Ticker
Timeframe
Exact Entry Price
Target Take Profit Price
Target Stop Loss Price
including warnings. alertcondition()
Trading & Exit Logic
1. BUY Setup
Trigger: Supertrend flips from Bearish (Red) to Bullish (Green).
Filter Condition: $\text{RSI} \le \text{Overbought Threshold}$ (or RSI Filter disabled).
Entry: Closing price of the signal bar.
Stop Loss: $\text{Entry} - (\text{ATR} \times \text{SL Multiplier})$
Take Profit: $\text{Entry} + (\text{ATR} \times \text{TP Multiplier})$
2. SELL Setup
Trigger: Supertrend flips from Bullish (Green) to Bearish (Red).
Filter Condition: $\text{RSI} \ge \text{Oversold Threshold}$ (or RSI Filter disabled).
Entry: Closing price of the signal bar.
Stop Loss: $\text{Entry} + (\text{ATR} \times \text{SL Multiplier})$
Take Profit: $\text{Entry} - (\text{ATR} \times \text{TP Multiplier})$
3. Exit & Removal Logic
On every historical and real-time bar, the script checks if or crosses the target levels: High Low
BUY Hit TP: $\text{High} \ge \text{TP Price}$
BUY Hit SL: $\text{Low} \le \text{SL Price}$
SELL Hit TP: $\text{Low} \le \text{TP Price}$
SELL Hit SL: $\text{High} \ge \text{SL Price}$
Upon trigger, the specific position is logged into the performance table, and its lines/labels are deleted.
Settings & Inputs
How to Set Up Dynamic Alerts
Apply the indicator to your desired chart.
Click the Alerts icon (Clock) on TradingView $\rightarrow$ Create Alert.
Under Condition, select: .Supertrend + RSI Filter (Advanced TP/SL)
Select Any alert() function call in the dropdown menu.
Set the frequency to Once Per Bar Close.
Click Create. You will receive detailed alerts formatted like this:
🚀 BUY SIGNAL
Symbol: BTCUSDT
Timeframe: 15
Entry: 64250.50
TP: 65120.00
SL: 63815.25
Risk Disclosure & Limitations
Choppy / Ranging Markets: As a trend-following tool, Supertrend may produce consecutive false breakouts when the market moves sideways.
Backtest Statistics Notice: The statistics table measures theoretical performance based on bar high/low historical data. It does not account for slippage, spread, overnight funding fees, or broker commissions.
Repainting Disclaimer: Signals and position calculations are confirmed on bar close ( / ) to strictly avoid repainting. barstate. islastfreq_once_per_bar_close
Financial Disclaimer: This script is developed strictly for educational and analytical purposes. It does not constitute financial or investment advice. Always manage your risk responsibly. Wskaźnik

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!* Wskaźnik

Fibonacci Vault [JOAT] JackOfAllTrades presents — Fibonacci Vault
A self-anchoring Fibonacci engine that locks onto the latest impulse leg and keeps the Golden Pocket glowing — no manual drawing.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
◆ WHAT IT IS
Drawing Fibonacci by hand means re-anchoring every time structure changes. Fibonacci Vault does it for you: it identifies the most recent confirmed impulse leg , lays the retracement shelves automatically, and treats the Golden Pocket (0.618–0.65) as a first-class zone rather than a single line. It is a pure confluence tool — it maps levels, it does not print buy/sell signals.
This is 100% original code, written from scratch. It does not reuse any other author's Fibonacci script.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
◆ HOW IT WORKS
1. Leg detection. The tool tracks confirmed swing highs and lows (using your chosen strength) and defines the active leg between the two most recent. Leg direction is inferred from which swing printed first — a low-then-high sequence is an up-impulse, and vice versa.
2. Size filter. A leg is only used if it is large enough — a minimum size expressed in ATR multiples — so the Vault anchors to meaningful impulses and ignores insignificant wiggles. As structure evolves, the anchor re-arms itself automatically.
3. The shelves. From the active leg, the standard retracements are projected: 0.236, 0.382, 0.5, 0.618, 0.65, 0.786, plus the 0 and 1 leg endpoints. Optional extension shelves at 1.272 and 1.618 project continuation targets beyond the leg.
4. The Golden Pocket. The 0.618–0.65 band is rendered as a glowing zone , and price trading inside it can optionally tint the background — the area many traders watch for reactions.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
◆ WHAT YOU SEE
• Auto-anchored retracement shelves with optional price tags
• A glowing Golden Pocket zone and optional 1.272 / 1.618 extensions
• An impulse-leg line marking the anchor
• A resizable dashboard showing the active leg and direction, leg size in ATR, how far price has retraced (with a gauge), the Golden Pocket range and whether price is inside it, the nearest shelf, and the projected extensions
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
◆ HOW TO USE IT
• Use the shelves as confluence for entries, targets and invalidation — not as standalone signals.
• The Golden Pocket is the tool's focal zone; combine a pocket tap with your own trigger for a pullback entry.
• Extensions give objective targets once an impulse resumes.
• The retraced % readout tells you at a glance how deep the current pullback is.
• Works on all symbols and timeframes. Raise swing strength and the minimum leg size to anchor to larger structure only.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
◆ NOTES & LIMITATIONS
Because the leg re-anchors on confirmed swings, the active leg updates as new structure is validated. Fibonacci levels are reference zones, not predictions — the tool is not financial advice and cannot guarantee a reaction at any level. Use it as confluence within your own method and risk plan.
— made with passion by officialjackofalltrade
Wskaźnik

Relative Strength Confluence - vs BenchmarkRS Confluence - Dual Signal vs Benchmark
RS Confluence is a relative strength indicator designed to measure whether the current symbol is outperforming or underperforming a chosen benchmark (default: BTC), using two independent signals on the price ratio between the symbol and the benchmark.
How it works
The indicator calculates a ratio between the current symbol's close and the benchmark's close (Symbol / Benchmark), then evaluates it through two lenses:
Level — RSI applied directly to the ratio. Measures whether the symbol is currently trading strong or weak relative to the benchmark.
Momentum — RSI applied to the Rate-of-Change of the ratio. Measures whether relative performance is accelerating or decelerating.
Both signals are kept on the same 0-100 scale, allowing them to be plotted together and compared directly.
Confluence Scoring
Bullish signal — Level and Momentum both cross above the bullish threshold (default 55) → RS BULLISH 2/2.
Bearish signal — Level and Momentum both cross below the bearish threshold (default 45) → RS BEARISH 2/2.
Partial agreement (1/2) and neutral readings (0/2) are also tracked and displayed in the info table.
Features
- Configurable benchmark symbol (any ticker, default BTC)
- Dual confluence scoring (Level + Momentum)
- Background coloring on full confluence
- Triangle markers on the first bar of a new confluence signal
- Live info table showing ratio, level, momentum and confluence status
- Built-in warning when the chart symbol matches the selected benchmark
- TradingView alert conditions for bullish/bearish confluence and midline crosses
- Non-repainting (uses confirmed values on the current timeframe)
How to Read the Chart
Blue Line (Level) — RSI of the Symbol/Benchmark ratio. Shows whether the symbol is currently stronger or weaker than the benchmark.
Orange Line (Momentum) — RSI of the ratio's Rate-of-Change. Shows whether that relative strength is accelerating or fading.
Dashed Threshold Lines — The upper line is the bullish threshold, the lower line is the bearish threshold. Full confluence requires both Level and Momentum to be on the same side of their respective threshold at the same time.
Red Triangles (top, pointing down) — Mark the first bar of a new RS BEARISH 2/2 signal: both Level and Momentum dropped below the bearish threshold together.
Green Triangles (bottom, pointing up) — Mark the first bar of a new RS BULLISH 2/2 signal: both Level and Momentum rose above the bullish threshold together.
Background Shading — Highlights the full duration of an active confluence signal (not just the trigger bar), making it easy to see how long the symbol stayed in a bullish or bearish RS regime.
Suggested Interpretation
RS Confluence is intended as a context indicator, not a standalone trading signal. A coin can show a strong technical setup on its own chart, but if it is underperforming the benchmark (e.g. BTC), the setup carries less weight — and vice versa. Use this indicator to filter or confirm signals from other tools rather than trading it in isolation.
Important
Do not apply this indicator to a chart where the symbol is the same as (or economically equivalent to) the selected benchmark — the ratio becomes constant or near-constant, making the readings meaningless. The indicator detects an exact ticker match and displays a warning in the info table, but different tickers referencing the same underlying asset (e.g. the same coin on a different exchange or quote currency) are not automatically detected.
This is the third indicator in a related series, designed to work alongside Divergence Confluence 7 and Volume Surge - Dual Period as part of a broader confluence-based analysis approach. Wskaźnik

TF: Trend Phases Ribbon (TPR)TradingFlow: Trend Phases Ribbon (TPR)
Most trend indicators put the market into one of two boxes: bullish or bearish. Price rarely moves that neatly. Bullish trends have pullbacks, bearish trends have rallies, and a change of direction usually passes through an uncertain stage first.
Trend Phases Ribbon keeps those stages visible on the chart. It shows the prevailing direction while also telling you whether the current move is supporting that direction, pushing against it, or moving into transition.
How it works
TPR uses two ALMA-smoothed trend paths. The thicker path responds more quickly to price, while the thinner path follows the broader trend. The model reads their direction and separation in the context of recent price movement, then assigns one of five phases. A separate short-term reading allows a pullback or rally to appear without immediately reversing the broader trend.
A crossover is only one part of the picture and does not decide the phase on its own.
Phase changes and event markers are confirmed when the bar closes. On the open bar, the responsive path can still move with price while the last confirmed phase remains in place.
Reading the colors
Green: Bullish
The broader trend and the shorter-term move are both bullish.
Light green: Bullish Pullback
The broader trend is still bullish, but the shorter-term move is pulling back against it.
Blue-gray: Transition
The previous directional phase has weakened, while a new bullish or bearish phase has not yet been confirmed. Price may continue in the new direction, return to the previous one, or spend some time without a clear bias.
Light pink: Bearish Rally
The broader trend is still bearish, but the shorter-term move is rallying against it.
Red: Bearish
The broader trend and the shorter-term move are both bearish.
Reading the ribbon
The thick line is the responsive trend path; the thin line is the broader trend path. When both slope in the same direction and the ribbon opens up, the move is becoming more clearly separated in that direction. When the ribbon narrows or the paths begin to turn toward each other, the trend is losing alignment and may be approaching a different phase.
Ribbon width shows the distance between the two paths. It is best read together with the color and slope rather than as a strength value on its own.
Markers and settings
A green circle with "U" appears when a bearish phase ends and an upward transition begins. A red circle with "D" marks the opposite change: a bullish phase has ended and a downward transition has started. These are early transition points. The next confirmed regime may appear later, or the market may return to its previous direction.
For a more detailed chart, the Display settings can show diamonds at confirmed bullish or bearish regime starts. Smaller pale circles can also mark the beginning of bullish pullbacks and bearish rallies. Both are hidden by default so the main ribbon stays clean. Alerts are available for these phase events and for any change in state.
Balanced is the general-purpose default. Fast follows shorter swings more closely, while Slow gives more weight to persistent trends. Custom mode is available when a symbol or timeframe needs a different response.
Practical use
Start with the ribbon color to identify the current phase, then look at its slope and width for context. Strong colors show that the broader trend and shorter-term move agree. Pale colors show a temporary move against the prevailing trend. Blue-gray tells you that the old phase has faded and the next one is still being decided.
TPR is designed for standard time-based charts and can be used across different symbols and chart timeframes.
---
TradingFlow: Trend Phases Ribbon (TPR)
很多趨勢指標只把行情分成多頭或空頭,但實際走勢通常不會一次翻面。多頭裡會有回調,空頭裡也會有反彈;真正換方向之前,往往還會先走過一段不明朗的過渡期。
Trend Phases Ribbon 想做的事情很直接:先看目前的大方向,再分辨眼前這一段是在順勢推進、逆勢回檔,還是已經進入轉換。
運作方式
TPR 以兩條經過 ALMA 平滑的趨勢線作為基礎。粗線對價格反應較快,細線則用來觀察較長一段的方向。判斷階段時,模型不只看兩條線有沒有交叉,也會參考線條的方向、距離,以及近期價格的變化,再把行情歸入五種狀態。
短線走勢另有一層判讀,所以多頭中的回調、空頭中的反彈,可以先反映在色帶上,不必因為一小段逆向波動就把主趨勢整個翻面。TPR 的判斷方式也因此和一般快線/慢線交叉指標不同。
階段切換和事件標記都在收 K 後確認。即時 K 線尚未收盤時,反應較快的粗線仍會跟著價格移動,但色帶會保留上一個已確認的階段。
顏色怎麼看
綠色:Bullish
主趨勢向上,短線走勢也在配合多頭方向。
淺綠色:Bullish Pullback
主趨勢仍然向上,但短線正在回調。這時看到的是多頭趨勢裡的逆向段落。
藍灰色:Transition
原本的方向已經轉弱,新的多頭或空頭階段則還沒確認。行情可能繼續換方向,也可能回到原來的趨勢,或者先橫行一段時間。
淺粉紅色:Bearish Rally
主趨勢仍然向下,但短線正在反彈。這是空頭趨勢裡的逆向段落。
紅色:Bearish
主趨勢向下,短線走勢也在配合空頭方向。
色帶怎麼看
粗線是反應較快的趨勢線,細線代表較長一段的方向。兩條線同時往上或往下,而且距離逐漸拉開,通常表示行情正朝該方向展開。色帶開始收窄,或兩條線轉向彼此靠近時,代表原本的配合正在減弱,接下來可能切換到另一個階段。
色帶寬度只是兩條趨勢線之間的距離。閱讀時要連同顏色和斜率一起看,不需要把寬度單獨當成強弱分數。兩線交叉也不會直接決定多空,最後仍以收 K 後確認的色帶階段為準。
標記與設定
綠色圓點和「U」表示空頭階段告一段落,行情開始進入向上的轉換;紅色圓點和「D」則表示多頭階段結束,向下的轉換剛開始。它們是階段交接的早期提示。之後可能確認新的趨勢,也可能繞一圈回到原來的方向。
想看得更細,可以在 Display 裡開啟菱形標記。它會標出多頭或空頭趨勢正式確認的位置。另一組淺色小圓點則用來標示多頭回調和空頭反彈的起點。這兩組標記預設關閉,畫面會比較乾淨;各種階段事件與狀態切換也都可以設定提示。
Balanced 是一般情況下的預設選擇。Fast 比較貼近短線擺動,Slow 偏向保留較持久的趨勢。若個別商品或週期需要不同反應,也可以使用 Custom 自行調整。
實際看盤
先看顏色,知道行情目前在哪一個階段,再看色帶的方向和寬窄。深色代表主趨勢與短線走勢同向;淺色代表價格正在逆著主趨勢走一段;變成藍灰色,則表示上一個階段已經淡出,下一個方向還在形成。
TPR 為標準時間型圖表而設,可套用在不同商品和圖表週期。
Wskaźnik

Continuation Order Block Lite [EmpArchitect] █ OVERVIEW
Continuation Order Block Lite maps bullish and bearish order-block zones that form only after a defined continuation-structure sequence.
Many order-block tools identify an opposing candle and plot a zone without showing the structural sequence that made the zone relevant.
This script separates the sequence from the zone:
• CHoCH establishes a possible change in structural direction
• BUILD BOS advances the continuation sequence
• CONT BOS confirms or extends the selected continuation model
• A qualifying continuation order block is then mapped
• The zone is tracked through interaction, invalidation, expiry, or supersession
It is an analytics-only structure tool. It does not provide entries, stop losses, targets, position sizing, risk/reward, probability scores, performance claims, or trade signals.
█ WHAT IT MAPS
Bullish continuation zone:
A full-candle zone taken from the most recent bearish structure-timeframe candle before a qualifying bullish continuation break.
Bearish continuation zone:
A full-candle zone taken from the most recent bullish structure-timeframe candle before a qualifying bearish continuation break.
The script tracks one current active continuation zone. Older zones may remain visible as inactive historical boxes.
█ CONTINUATION MODELS
Model B — CHoCH + first BOS:
The structural direction changes through CHoCH. The first same-direction BOS completes the continuation sequence.
Model A — CHoCH + two BOS:
The structural direction changes through CHoCH. The first BOS builds the sequence. The second same-direction BOS completes the stricter continuation sequence.
The model changes the number of confirmed structural breaks required before the structure state becomes ready.
█ HOW THE STRUCTURE SEQUENCE WORKS
The script uses confirmed pivots from the selected structure timeframe.
A pivot high or pivot low becomes available only after the selected left-side and right-side confirmation bars have completed.
A close beyond the latest live swing level creates a structural break:
• CHoCH — the break changes the current structural direction
• BUILD BOS — the break continues the new direction but has not yet completed the selected model
• CONT BOS — the break completes or extends the selected continuation sequence
The script uses the most recently confirmed internal pivot. A newer confirmed pivot can replace an older unbroken pivot.
Equal highs and equal lows are not accepted as pivots because the comparison is strict.
█ ORDER-BLOCK ORIGIN
After a qualifying continuation break, the script searches backward through completed structure bars.
For a bullish continuation zone, it selects the most recent bearish candle.
For a bearish continuation zone, it selects the most recent bullish candle.
The complete candle high-to-low range is used. The zone is not reduced to the candle body.
The search is limited by the Origin search window setting.
The zone begins when the continuation condition is confirmed. It is not back-projected as though it had already been known on the original candle.
█ DISPLACEMENT AND FVG QUALIFICATION
A candidate zone must pass the selected displacement / imbalance rule.
Displacement is measured against ATR from the structure timeframe.
Immediate FVG refers to a three-candle imbalance anchored at the selected origin candle.
When “Require both displacement and immediate FVG” is OFF:
• Displacement OR immediate FVG can qualify the zone
When it is ON:
• Displacement AND immediate FVG are both required
The dashboard displays the active rule and ATR multiplier.
█ VISUAL LANGUAGE
The structure sequence uses different line styles so the events are not presented as equivalent.
CHoCH:
• Dashed line
• Muted directional colour
• Context transition only
BUILD BOS:
• Dotted line
• Muted label
• Sequence is still below the selected confirmation threshold
CONT BOS:
• Solid line
• Stronger directional colour
• Thicker line at the break that completes the selected continuation model
Bullish structure and zones use green.
Bearish structure and zones use orange.
Active zones use stronger solid styling.
Inactive historical zones retain their bullish or bearish colour with a faded fill and dotted outline.
█ ZONE LIFECYCLE
The script tracks the zone separately from the structural break that created it.
An active zone can be:
• Fresh
• Touched
• Gap-through
• Structurally invalidated
• Expired by maximum age
• Superseded by a newer same-side continuation zone
First interaction:
A zone is marked as touched when price first reaches the zone and overlaps its range.
Gap-through:
A gap-through event is recorded when the first interaction bar moves completely beyond the zone without overlapping it.
Structure invalidation:
• Bullish zone — a completed structure-timeframe close below the zone bottom
• Bearish zone — a completed structure-timeframe close above the zone top
Age expiry:
The zone becomes inactive after exceeding the selected maximum number of completed structure bars.
Supersession:
A newer qualifying same-side continuation zone replaces the currently active zone.
A touch does not automatically delete the zone.
█ TIMEFRAME MODES
Auto mode:
• Charts up to and including 4H use 4H structure
• Charts above 4H through 1D use 1D structure
• Charts above 1D through 1W use 1W structure
• Charts above 1W use 1M structure
Examples:
• 15m chart → 4H structure
• 1H chart → 4H structure
• 4H chart = 4H structure
• 1D chart = 1D structure
Manual mode:
Select a structure timeframe equal to or higher than the chart timeframe.
Examples:
• 1H chart → 4H structure
• 4H chart → 1D structure
• 1D chart → 1W structure
A structure timeframe below the chart timeframe is rejected.
Same-timeframe mode processes the prior completed chart bar directly.
Higher-timeframe mode processes the prior confirmed structure bar when a new structure bar begins.
█ STATUS PANEL
The panel shows the current continuation state:
• Chart timeframe and structure timeframe
• Auto or Manual mode
• Same-timeframe or higher-timeframe view
• Selected continuation model
• Current sequence progress
• Most recent structural break
• Active bullish-zone state, age, and range
• Active bearish-zone state, age, and range
• Most recent zone lifecycle event
• Current displacement / FVG qualification
• Structure-data readiness
The panel describes the current state. It does not recommend an action.
█ ALERTS
Included structure-context events:
• New bullish or bearish continuation zone
• Bullish or bearish zone interaction
• Bullish or bearish gap-through
• Zone deactivation
Zone-deactivation messages include the reason:
• Structure reversal
• Structure invalidation
• Age
• Superseded
These are structure-event alerts only. They are not trade signals.
█ WORKED EXAMPLE
Example: 1H chart with 4H structure and Model B.
1. A confirmed 4H close breaks the latest opposite-side swing and creates CHoCH.
2. A later confirmed 4H close breaks the next same-direction swing.
3. That break is displayed as CONT BOS because Model B requires CHoCH plus the first BOS.
4. The script searches backward for the most recent opposing 4H candle.
5. The full high-to-low range of that candle becomes the candidate continuation zone.
6. The candidate appears only if the displacement / immediate-FVG rule passes.
7. A touch changes the zone from fresh to touched but does not deactivate it. The zone remains active until structure reversal, structure invalidation, age expiry, or supersession.
The sequence establishes why the zone was mapped. It does not establish that price will return to the zone or that the zone will hold.
█ HOW IT DIFFERS FROM SMC STRUCTURE ENGINE
SMC Structure Engine is a broader chart-structure tool.
It maps general CHoCH and BOS events, multiple order blocks, liquidity sweeps, break strength, zone scoring, touch counts, and broader regime context.
Continuation Order Block Lite is narrower by design.
It focuses on:
• A selected structure timeframe
• A defined CHoCH-to-BOS continuation sequence
• A continuation-specific origin candle
• Displacement / immediate-FVG qualification
• One current active continuation zone, with older zones retained as inactive history
• A compact continuation-zone lifecycle
The two scripts answer different questions.
SMC Structure Engine asks:
What is the broader structure and order-block context on this chart?
Continuation Order Block Lite asks:
Did a defined continuation sequence complete, and what happened to the resulting origin zone?
█ SETTINGS
Model settings:
• Structure timeframe mode
• Manual structure timeframe
• Trend-state model
• Pivot left bars
• Pivot right bars
• Origin search window
• Displacement threshold
• Require both displacement and immediate FVG
• Maximum zone age
Display settings:
• Show zone boxes
• Show continuation sequence
• Show structure swing levels
• Show status panel
█ IMPORTANT LIMITATIONS
• Confirmed pivots introduce delay.
• Structural breaks use completed closes, not intrabar assumptions.
• A valid continuation sequence does not prove that continuation will persist.
• A mapped zone does not imply that price will return.
• A zone interaction does not imply that the zone will hold.
• The script keeps only one current active continuation zone.
• A newer same-side zone supersedes the previous active zone.
• Zones use the full candle range, not the body.
• Equal highs and equal lows are excluded by the strict pivot definition.
• The script does not evaluate volume, liquidity sweeps, session quality, macro events, or market regime outside the defined sequence.
• Results depend on pivot settings, origin lookback, ATR threshold, FVG requirement, market, and timeframe.
• Same-timeframe and higher-timeframe views can show different structural granularity.
• Lower-liquidity or highly irregular markets may produce noisier structure.
█ NOTES
• Pine Script v6
• Public and open-source
• Built by EmpArchitect
• Analytics-only structure tool
• Designed for chart review and structural inspection
• Not a signal service
• No entries, exits, stop losses, targets, or performance claims
█ CORE IDEA
Continuation Order Block Lite does not treat every opposing candle as an order block.
It first requires a defined continuation sequence.
It then maps the origin zone and records what happened to it.
Structure observations, not signals. Wskaźnik

Fib Trend & Legs (BoaBias)█ OVERVIEW
Fib Trend & Legs (BoaBias) draws Fibonacci structure on two nested scales at once: a parent fib across the full market-structure trend cycle (trend-up ↔ trend-down), and child fibs on the BOS / CHoCH swing legs inside that trend. Optional golden / deep zones plus a CT-fade Edge panel (ALMA overheat · MTF EMA overheat · fib-anchored VWAP · golden proximity) with matching overlays. Structural context for discretionary work and alert workflows — not a black-box signal service.
█ WHY UNIQUE
Most Fib tools lock to a single hand-picked or last-swing range. This map keeps parent trend and child legs alive together : the parent tracks the whole structure trend cycle while child legs lock on each confirmed BOS/CHoCH segment (plus an optional forming leg). The Edge panel is a CT-fade confluence over that map: ALMA run overheat and MTF EMA above/below overheat (same lengths as BoaBias public EMA/ALMA), proximity to the parent golden zone, and a VWAP anchored at the parent fib start — so stretch + pullback context sit on one overlay instead of juggling three scripts.
█ HOW TO USE
First use: If the indicator appears in the wrong scale (squashed or fullscreen), right-click the indicator → Pin to scale → Pin to right scale.
Leave Show Parent Fib and Show Child Fibs on; tune Pivot Length so swings match your timeframe (higher length = fewer, larger structure events).
Watch Golden Zone / Deep Zone on the parent for pullback context; enable the same zones on child legs when you trade inside-leg retracements.
Use Pattern Edge (top-right) for parent-fib CT-fade confluence and Child Edge (bottom-left) for the active leg — high when pullback-side ALMA/EMA is stretched into golden near fib VWAP. Not a standalone entry trigger.
Alerts: Chart → Create alert → this indicator → choose a condition (Golden/Deep entry, Strong Edge, Cross Fib VWAP, Break 0%, Full Retrace, Trend Up/Down, BOS, Upsweep/Dnsweep). Prefer Once per bar close for cleaner automation.
█ HOW IT WORKS
Market structure: Pivot highs/lows feed a trend state. Trend flips (and BOS / CHoCH / optional liquidity sweeps) define when ranges update. Algorithm mode: Extreme Points or Adjusted Points.
Parent fib (Trend): Anchored to the full active trend cycle — from the cycle origin to the opposing extreme — with retracements, optional extensions, and zone fills between configurable ratios (defaults emphasize 61.8–78.6 golden and 78.6–88.6 deep).
Child fibs (Legs): Each leg = protective origin (CHoCH / last protect wick) → running extreme ( ms.main wick). Locked on BOS with those bars frozen. L1 = newest locked, L2 = previous, Lf = forming. Optional H/L anchor marks show the two wicks. Parent trend flip clears child history.
Edge layer (CT fade): Two panels — Pattern (parent fib) and Child (active leg). Each scores golden proximity (≤25) + ALMA pullback CT (≤25) + EMA pullback CT (≤25) + fib-start VWAP (≤25). ALMA/EMA CT use the chart timeframe only (panel shows e.g. ALMA 1D). For a bull fib, CT scores short / below-EMA stretch; bear fib scores the opposite. Optional plots: chart-TF ALMA SuperTrend, enabled EMAs, Pattern + Child fib VWAPs.
Sweep markers: Optional “x” markers when structure detects upsweep / dnsweep liquidity grabs (style group for color, size, max count).
█ CTA
More BoaBias public Scripts: TradingView → Goldfinch_song → Scripts .
Ideas that use this stack: profile → Ideas tab.
█ LIMITATIONS
Pivot-based structure lags until pivots confirm; forming parent/child ranges can update until the next structure event.
Fib levels and zones are structural maps , not guaranteed support/resistance or trade signals.
Edge score is a confluence helper on the loaded history — descriptive, not predictive.
Heavy child history + many levels can hit drawing limits — lower Max Completed Child Legs or disable unused levels.
Educational / research overlay. Not financial advice.
Pine Script v6. License: MPL-2.0 . Wskaźnik

OBV+OBV+
OBV+ tracks On Balance Volume against a moving average of itself and turns
that relationship into a directional state, then gates entries behind a
statistical trend test and manages the trade with a chandelier stop that only
ever moves in your favor.
HOW THE STATE WORKS
The indicator plots OBV with a configurable moving average (EMA, SMA, WMA,
RMA, or HMA). The distance between the two is ranked as a percentile against
its own recent history, so a strong OBV move is defined relative to what this
symbol has actually been doing rather than by a fixed number that means
something different on every chart. When that strength clears your threshold,
the state turns bullish or bearish and stays there until a qualifying move
flips it the other way. A minimum bar spacing keeps the state from
oscillating.
HOW ENTRIES WORK
A state flip on its own does not open a trade. The flip arms an entry window,
and within that window a linear regression on price must independently confirm
that a trend exists in the same direction, measured by the t statistic of the
regression slope. If the trend test agrees, the trade opens. If the window
closes without confirmation, the flip expires and prints a small gray circle
so you can see exactly which signals were passed over. The next entry then
waits for a fresh flip.
Price bars are colored by the gate rather than by raw OBV, so bars show green
or red only where both conditions are satisfied and gray everywhere else. You
can see at a glance which parts of the chart the indicator considers
tradeable.
HOW EXITS WORK
The stop arms immediately on the entry bar, placed beyond that bar's range so
a wide entry candle cannot take you out on the next bar. From there it trails
from the highest high reached since entry (or lowest low when short) at a
configurable ATR multiple, and it is hard clamped so it can only tighten. In a
long it never moves down. It tightens as volatility contracts and holds its
ground when volatility expands. The stop line is drawn directly on price
alongside entry triangles and exit crosses.
The trailing stop is the only exit by default. Opposite states are ignored
while a position is open, so a brief counter signal that does not reach your
stop leaves the trade running. If you would rather have state changes close
and reverse the position, there is a switch for it.
INPUTS
MA type and length, strength lookback and minimum percentile, minimum bars
between flips, regression lookback, minimum absolute t statistic, confirmation
window length, ATR length and chandelier multiple, plus a flip reverses
position toggle. Display options cover the fill, the trail, trade markers, and
bar coloring, with configurable bull, bear, and neutral colors. An optional
pane mode swaps OBV for the signed strength percentile with the threshold
lines drawn, which makes it easy to see which moves clear the bar.
ALERTS
Separate alert conditions for long entry, short entry, and exit, plus a single
combined alert carrying the ticker, timeframe, strength percentile, t
statistic, and current stop level.
NOTES
Because the signal is built from volume, results depend on the volume series
your data feed provides, and the same symbol can behave differently across
exchanges. Signals evaluate on bar close. Settings are deliberately open
ended: a low strength percentile with a short regression lookback produces
frequent, permissive signals, while raising the percentile and the t threshold
narrows it toward fewer and more selective ones. This is for informational purposes
only and isn't meant as financial advice. Wskaźnik

Day-Extreme Reversal SignalsReal-time detector for the bar shapes that historically printed SPY's day low and day high. When a new session extreme forms, it tells you the measured probability that THIS bar holds as the day's extreme - and how those odds differ between 5-minute scouts and hourly signals.
OVERVIEW
Every intraday trader eventually asks the same two questions: "was that the low?" and "is this the high?" This indicator answers them with measured frequencies instead of intuition.
It watches for new session extremes in real time. When one prints, it classifies the bar's shape - reversal close, spring, V-confirm at lows; rejection, high-confirm at highs - and labels it with the historical probability that this specific shape, at this event, held as the day's extreme. A decision panel keeps the session context on screen: where the current extremes sit, when they printed, the odds the day's extreme has already happened given the time of day, and the structural rules for acting on lows versus highs.
The stats were built by real-time simulation - walking bar by bar and asking "would this signal have fired here, and did the extreme hold?" - not by locating day extremes in hindsight and describing them afterward.
WHY THIS IS DIFFERENT
TradingView has time-of-day extreme statistics: tools that count in which hour or session window daily highs and lows historically print. Those answer "WHEN does the extreme usually happen?"
This script answers a different question: "is THIS bar the extreme?" The probabilities are conditional on an event (a new session extreme printing) and on the shape of the bar that printed it - not on the clock. To my knowledge no public script does event-conditional extreme classification, and none publishes the two findings that drive this tool's usage rules:
1 - The scout/signal hierarchy. The same shapes carry very different weight by timeframe. A 5-minute reversal close at a new session low held as the day low 28% of the time (versus a 14% baseline for any new session low) - interesting, not tradeable alone. The same shape on an HOURLY bar held 64% of the time (versus a 35% hourly baseline) - nearly two-thirds of occurrences marked the day low. The 5m shapes are scouts that put you on alert; the hourly shapes are the signal.
2 - Lows and highs are structurally different animals. In the data, lows are V-shaped: 55% of day lows were never retested within 30 minutes. Highs are processes: 82% of day highs were retested within 30 minutes. The practical asymmetry is baked into the panel - at lows, waiting for a retest usually means missing the trade; at highs, patience is statistically paid for.
THE SHAPES
All shapes evaluate only at a NEW session extreme (or on the bar immediately following one). At lows:
- RevClose - the bar makes a new session low but closes green and in the top third of its range. Sellers broke the floor and were immediately overwhelmed. Strongest low shape on both timeframes (5m: 28% holds; hourly: 64%).
- Spring - new session low with a long lower wick (more than half the bar) and a close off the floor. The push below found no acceptance (5m: 17%; hourly: 55%).
- V-confirm - the bar AFTER a red new-session-low bar opens and closes green above the prior open. Confirmation that the flush reversed (5m: 27%; hourly: 54%).
At highs:
- Reject - new session high with a long upper wick and a close out of the top third. (5m: 11% vs 9% base - barely above baseline; hourly: 47% vs 28% base.)
- HighConf / Confirm - a red bar immediately after a green new-session-high bar. (5m: 12%; hourly: 33%.)
Note what the high-side numbers say: even the best hourly high shape holds less than half the time. Tops are processes, and the script tells you so rather than pretending otherwise.
THE DECISION PANEL
- Current session low and high with their print times (ET).
- Time-of-day odds that the day's extreme has ALREADY printed, interpolated from the measured distribution (37% of lows are in by 10:00 ET, 60% by 11:30; highs run later - 18% by 10:00, with a heavy skew into the final hour).
- A provisional read of what the current, still-forming hourly bar is shaping into.
- The two structural rules, always on screen: lows are V-shaped, do not wait for the retest; highs retest 82% of the time, exits and fades can be patient.
HOW TO USE IT
Work on a 5-minute chart (any intraday timeframe runs; daily charts are rejected with an error).
- A 5m scout triangle at a new session low means: stop, context check. Alone it is a minority bet.
- The teal background band - an hourly low shape confirming - is the signal. Odds the day low is in jump to roughly fifty-fifty or better. Because lows are V-shaped, the statistically supported action is to act on the signal bar rather than wait for a pullback that usually never comes.
- The orange band at highs is a warning, not a green light to fade aggressively: expect a retest attempt, and use it - the second look at a high is where shorts and exits get their fill.
- The time-of-day odds frame everything: a new low printing at 14:30 ET is a rarer, more reliable event than one at 09:45, simply because most days have already made their low by then.
Alerts are provided for the hourly low signal, the hourly high signal, and the strongest 5m scout.
THE DATA, STATED PLAINLY
- Instrument: SPY. Samples: 60 days of 5-minute bars and 730 days of hourly bars.
- Method: real-time simulation. The detector walked forward bar by bar; every firing was recorded with whether that extreme survived as the day's extreme. No hindsight selection.
- Every probability is shown next to its baseline (the hold rate of ANY new session extreme on that timeframe), so you can see the edge, not just the number.
- The percentages are fixed numbers derived from that study, embedded in the script. They are descriptive statistics of a specific instrument over a specific period - not guarantees, and they will drift as market character changes.
- On symbols other than SPY (and index products that track it closely), the shape logic still runs, but the printed percentages do not apply. Treat them as unknown there.
LIMITATIONS
- Hourly signals use confirmed hourly bars (the standard non-repainting idiom - no future data is accessed), so they appear at the close of the hour, not at its low. The "forming" panel row is explicitly provisional and changes until the hour closes.
- 5m labels print on bar confirmation.
- The session-extreme state resets each calendar session; extended-hours settings on your chart change what counts as the session.
- The 60-day 5-minute sample is modest; the hourly sample (roughly two years) is the sturdier one, which is one more reason the hourly shapes are the signal tier.
- This is a probability tool, not an entry system. It quantifies "was that the extreme?" - stops, targets, and sizing are yours.
NOTES
The time-of-day asymmetry the data surfaced - lows early, highs late, lows violent, highs sticky - echoes the old observation running from George Douglass Taylor through Linda Raschke's day-structure work: down moves complete in the morning and buying builds through the day more often than the reverse. This script did not assume that; the simulation found it independently in modern SPY data.
Educational tool, not financial advice. Wskaźnik
