OPEN-SOURCE SCRIPT
Updated Buyer vs Seller Control & Path of Least Resistance (MTF)

Buyer vs Seller Control & Path of Least Resistance (MTF)
WHAT IT DOES
For every timeframe you care about (1 / 2 / 3 / 5 / 15 / 30 / 60 minutes by default) this overlay answers three questions on one comparable scale, right on your price chart:
• WHO is in control — buyers or sellers?
• HOW STRONGLY — a 0-100 strength meter per timeframe.
• Which way is the PATH OF LEAST RESISTANCE across all of them — UP, DOWN, or CHOP?
Your current chart timeframe is highlighted as "YOUR TF", so at a glance you see whether to be hunting longs or shorts on the exact screen you are trading — and the same read for every other timeframe beside it.
THE CONTROL SCORE — FIVE LENSES, ONE NUMBER
Each timeframe's control is a single signed value in [-1, +1] (+ = buyers, − = sellers), fused from five independent lenses so no single measure dominates:
1. ORDER-FLOW DELTA (fast) — a Bulk-Volume-Classification (BVC) buy/sell split. Each bar's volume is divided into buying and selling using the standardized bar return through a normal CDF (Easley / López de Prado / O'Hara), then expressed as a net-over-gross balance ratio. Bounded, so it is comparable across symbols and timeframes.
2. CVD (slow) — the same signed-volume idea over a longer window, capturing persistent accumulation or distribution rather than the latest impulse.
3. VWAP — location of price relative to session VWAP (measured in ATR) plus the slope of VWAP.
4. MA STACK — the interrelation (stacking order) of a fast / mid / slow EMA plus the slope of the fast EMA.
5. VOLUME PRESSURE — close-location-weighted money flow (CMF-style).
Two microstructure adjustments then sharpen conviction:
• EFFORT vs RESULT (absorption) — when control is strong but price has barely progressed, the score is damped: the winning side is being absorbed.
• KYLE-λ IMPACT — a price-impact proxy (correlation of the size of the move with volume). Flow that actually moves price counts for more; volume that moves nothing counts for less.
STRENGTH — SELF-CALIBRATING, COMPARABLE ACROSS TIMEFRAMES
Strength (0-100) is the percentile rank of |control| within each timeframe's OWN recent history. A 1-minute chart and a 1-hour chart are therefore on the same scale: a high % means control is strong RELATIVE to what that timeframe normally does — not an absolute claim. This is what makes the seven rows directly comparable.
PATH OF LEAST RESISTANCE — A CALIBRATED, HONEST FUSION
The headline "PATH" is not a naïve vote count. It is built to avoid the classic multi-timeframe trap where several fast, highly-correlated timeframes all lean the same way and manufacture false confidence:
• LOG-ODDS FUSION — each timeframe's signed control, scaled by its own strength and by a √(timeframe-seconds) horizon weight, is combined as a weighted-mean in log-odds and mapped to a probability P↑ that buyers win the path. Because it is a mean, redundant timeframes form a consensus instead of stacking up.
• CORRELATION DISCOUNT — the average correlation between the timeframe control series is measured live; when the timeframes are merely echoing each other (highly correlated) rather than agreeing independently, the path conviction is shrunk.
• REGIME GATE — a Kaufman efficiency ratio on your chart measures trend vs chop; in a choppy, mean-reverting tape the path is gated toward CHOP so you are not handed a confident direction when the market has none.
The result is reported as ▲ UP / ▼ DOWN / = CHOP with a calibrated conviction %, how many timeframes agree, P↑ (probability up), ρ (inter-TF correlation) and the regime %.
FORWARD-TEST SELF-AUDIT (Pro table)
Turn on the "Pro" detail mode and the table shows a rolling HIT-RATE: how often the path direction from N bars ago was actually followed by price moving that way. It is computed only from confirmed PAST bars — no future leak — so it is an honest, symbol-and-settings-specific audit of the path, not a marketing number. Use it to sanity-check the settings on your instrument before you trust the signal.
REPAINT — READ THIS
• Default (live): higher-timeframe reads update intrabar as each higher-TF bar forms — the normal behaviour of any live multi-timeframe tool.
• "Freeze to last closed bar" (optional): every row shows the last CONFIRMED bar of its timeframe — non-repainting, but one bar behind.
• request.security is called with lookahead OFF (no future data is ever pulled back in time).
• Alerts evaluate on confirmed CHART bars; for fully non-repainting alerts (confirmed higher-TF reads), keep Freeze ON.
HOW TO USE IT
• Add it to any liquid, volume-bearing symbol and intraday timeframe.
• Read YOUR TF first — it is the actionable line for the screen you are on. BUY / SELL / WAIT with a strength meter.
• Then glance up at PATH: trade with the path, be cautious against it, stand aside on CHOP.
• Use AGREE (x/7) and the Pro ρ / regime / hit-rate stats to gauge how much to trust the read.
• Alerts: "Path flips UP", "Path flips DOWN", "Path goes CHOP".
Inputs are grouped: Score, Lenses & microstructure, Timeframes, Path fusion, Repaint, Display (Dark/Light theme, table position, Compact/Pro detail, background tint). All seven timeframes are user-selectable.
ORIGINALITY / WHY IT IS NOT A MASH-UP
The five lenses are deliberately chosen to measure control from independent angles (order flow, longer-horizon flow, value location, trend structure, money-flow pressure) and are fused with an absorption and price-impact overlay so that "loud but ineffective" pressure is discounted. The cross-timeframe path is a probabilistic log-odds consensus with an explicit correlation discount and a regime gate — specifically designed so that a cluster of correlated fast timeframes cannot fake a high-conviction reading, and so that chop is reported as chop. The built-in forward-test lets each user verify the behaviour on their own instrument.
LIMITATIONS / DISCLAIMER
This is an OHLCV-based study. The buy/sell split is a bar-level statistical estimate, not the true tape: it cannot see resting limit orders, the intrabar footprint, or off-book liquidity. Percentile strength is relative to recent history, not an absolute force. Multi-timeframe reads update intrabar unless Freeze is on. Works best on liquid, volume-bearing instruments; illiquid symbols or timeframes with little history may show "—".
This indicator is a decision-support study for context and education. It is NOT financial advice, NOT a signal service, and NOT a guarantee of future results. Markets involve risk; you are responsible for your own decisions and risk management.
WHAT IT DOES
For every timeframe you care about (1 / 2 / 3 / 5 / 15 / 30 / 60 minutes by default) this overlay answers three questions on one comparable scale, right on your price chart:
• WHO is in control — buyers or sellers?
• HOW STRONGLY — a 0-100 strength meter per timeframe.
• Which way is the PATH OF LEAST RESISTANCE across all of them — UP, DOWN, or CHOP?
Your current chart timeframe is highlighted as "YOUR TF", so at a glance you see whether to be hunting longs or shorts on the exact screen you are trading — and the same read for every other timeframe beside it.
THE CONTROL SCORE — FIVE LENSES, ONE NUMBER
Each timeframe's control is a single signed value in [-1, +1] (+ = buyers, − = sellers), fused from five independent lenses so no single measure dominates:
1. ORDER-FLOW DELTA (fast) — a Bulk-Volume-Classification (BVC) buy/sell split. Each bar's volume is divided into buying and selling using the standardized bar return through a normal CDF (Easley / López de Prado / O'Hara), then expressed as a net-over-gross balance ratio. Bounded, so it is comparable across symbols and timeframes.
2. CVD (slow) — the same signed-volume idea over a longer window, capturing persistent accumulation or distribution rather than the latest impulse.
3. VWAP — location of price relative to session VWAP (measured in ATR) plus the slope of VWAP.
4. MA STACK — the interrelation (stacking order) of a fast / mid / slow EMA plus the slope of the fast EMA.
5. VOLUME PRESSURE — close-location-weighted money flow (CMF-style).
Two microstructure adjustments then sharpen conviction:
• EFFORT vs RESULT (absorption) — when control is strong but price has barely progressed, the score is damped: the winning side is being absorbed.
• KYLE-λ IMPACT — a price-impact proxy (correlation of the size of the move with volume). Flow that actually moves price counts for more; volume that moves nothing counts for less.
STRENGTH — SELF-CALIBRATING, COMPARABLE ACROSS TIMEFRAMES
Strength (0-100) is the percentile rank of |control| within each timeframe's OWN recent history. A 1-minute chart and a 1-hour chart are therefore on the same scale: a high % means control is strong RELATIVE to what that timeframe normally does — not an absolute claim. This is what makes the seven rows directly comparable.
PATH OF LEAST RESISTANCE — A CALIBRATED, HONEST FUSION
The headline "PATH" is not a naïve vote count. It is built to avoid the classic multi-timeframe trap where several fast, highly-correlated timeframes all lean the same way and manufacture false confidence:
• LOG-ODDS FUSION — each timeframe's signed control, scaled by its own strength and by a √(timeframe-seconds) horizon weight, is combined as a weighted-mean in log-odds and mapped to a probability P↑ that buyers win the path. Because it is a mean, redundant timeframes form a consensus instead of stacking up.
• CORRELATION DISCOUNT — the average correlation between the timeframe control series is measured live; when the timeframes are merely echoing each other (highly correlated) rather than agreeing independently, the path conviction is shrunk.
• REGIME GATE — a Kaufman efficiency ratio on your chart measures trend vs chop; in a choppy, mean-reverting tape the path is gated toward CHOP so you are not handed a confident direction when the market has none.
The result is reported as ▲ UP / ▼ DOWN / = CHOP with a calibrated conviction %, how many timeframes agree, P↑ (probability up), ρ (inter-TF correlation) and the regime %.
FORWARD-TEST SELF-AUDIT (Pro table)
Turn on the "Pro" detail mode and the table shows a rolling HIT-RATE: how often the path direction from N bars ago was actually followed by price moving that way. It is computed only from confirmed PAST bars — no future leak — so it is an honest, symbol-and-settings-specific audit of the path, not a marketing number. Use it to sanity-check the settings on your instrument before you trust the signal.
REPAINT — READ THIS
• Default (live): higher-timeframe reads update intrabar as each higher-TF bar forms — the normal behaviour of any live multi-timeframe tool.
• "Freeze to last closed bar" (optional): every row shows the last CONFIRMED bar of its timeframe — non-repainting, but one bar behind.
• request.security is called with lookahead OFF (no future data is ever pulled back in time).
• Alerts evaluate on confirmed CHART bars; for fully non-repainting alerts (confirmed higher-TF reads), keep Freeze ON.
HOW TO USE IT
• Add it to any liquid, volume-bearing symbol and intraday timeframe.
• Read YOUR TF first — it is the actionable line for the screen you are on. BUY / SELL / WAIT with a strength meter.
• Then glance up at PATH: trade with the path, be cautious against it, stand aside on CHOP.
• Use AGREE (x/7) and the Pro ρ / regime / hit-rate stats to gauge how much to trust the read.
• Alerts: "Path flips UP", "Path flips DOWN", "Path goes CHOP".
Inputs are grouped: Score, Lenses & microstructure, Timeframes, Path fusion, Repaint, Display (Dark/Light theme, table position, Compact/Pro detail, background tint). All seven timeframes are user-selectable.
ORIGINALITY / WHY IT IS NOT A MASH-UP
The five lenses are deliberately chosen to measure control from independent angles (order flow, longer-horizon flow, value location, trend structure, money-flow pressure) and are fused with an absorption and price-impact overlay so that "loud but ineffective" pressure is discounted. The cross-timeframe path is a probabilistic log-odds consensus with an explicit correlation discount and a regime gate — specifically designed so that a cluster of correlated fast timeframes cannot fake a high-conviction reading, and so that chop is reported as chop. The built-in forward-test lets each user verify the behaviour on their own instrument.
LIMITATIONS / DISCLAIMER
This is an OHLCV-based study. The buy/sell split is a bar-level statistical estimate, not the true tape: it cannot see resting limit orders, the intrabar footprint, or off-book liquidity. Percentile strength is relative to recent history, not an absolute force. Multi-timeframe reads update intrabar unless Freeze is on. Works best on liquid, volume-bearing instruments; illiquid symbols or timeframes with little history may show "—".
This indicator is a decision-support study for context and education. It is NOT financial advice, NOT a signal service, and NOT a guarantee of future results. Markets involve risk; you are responsible for your own decisions and risk management.
Release Notes
v1.1 — Control momentum: is your-timeframe control building or fading? An early warning ahead of the path flip, plus a Data-Window export bus.The original tool tells you who is in control on every timeframe and where the cross-TF path of least resistance points. What it didn't show was the rate of change of control on the timeframe you're actually trading: a BUY verdict at 70% strength that is quietly fading is a very different situation from one that is still building, yet both read the same. This update adds that derivative.
What's new
Control momentum. ctrlAccel is the change in your chart timeframe's fused control score over a short, adjustable window (default 3 bars) — the derivative of the buy/sell balance. Positive = buyers gaining ground; negative = sellers gaining. Because it turns before the verdict or the path does, it is an early read on whether the current control is strengthening or about to give way.
MOMENTUM row on the dashboard (both Compact and Pro): ▲ buyers building / ▼ sellers building / • steady, with the signed value. It sits under the per-timeframe rows so you can read the direction of travel next to the levels.
Flip-risk flag + alert. When your-TF control momentum turns hard against the current path direction (path is UP but control is dropping fast, or vice-versa), the MOMENTUM row shows a ⚠ flip risk flag and the "Control flip risk" alert fires once. This is the caution moment — the path hasn't flipped yet, but the control underneath it is eroding.
Data-Window export bus. New EXP_ outputs — chart control, control momentum, path state, path clarity, P↑, and chart strength — so another script can consume this engine's read.
How to use it
Read momentum as a lead on the verdict. A BUY verdict + ▲ buyers building is control confirming itself; a BUY verdict + ▼ sellers building (and a ⚠ flip-risk flag) is control eroding under the verdict — a reason to tighten or wait rather than add. The path of least resistance still comes from the full cross-TF log-odds fusion exactly as before; momentum tells you whether the timeframe in front of you is reinforcing or fighting it.
What is unchanged. The five-lens fused control score (BVC order-flow delta, CVD, VWAP, MA stack, volume pressure), the absorption and Kyle-λ microstructure damps, the self-calibrating percentile strength, the horizon-weighted log-odds path fusion with its correlation discount and efficiency-ratio regime gate, and the forward-test hit-rate are all byte-for-byte v1.0. Control momentum is a pure read of the chart-TF control the tool already computes; it feeds nothing back into the score or the path.
Still a context study, not a signal service and not a buy/sell system: it shows who controls each timeframe and scales conviction — it does not place trades. OHLCV-based: the buy/sell split is a bar-level estimate, not the true tape, and cannot see resting limit orders. Non-repainting on confirmed bars with "Freeze to last closed bar" on (default). Research/education only — not financial advice.
Release Notes
What's newGraded BUY/SELL signals with strength (0–100), measure-first. A signal fires when your chart-TF control newly aligns with the path. Each is bucketed by strength and forward-resolved (Wilson-floored) — it draws solid and fires its proven alert only once that strength band beats a coin-flip on your symbol; until then it's faint and measure-only. On-chart marks + alerts. (This is a trend-alignment signal — it confirms a move, it does not mark the exact reversal.)
Responsive, selectable consensus. The path now uses a chart-relative nested set — your TF plus the 2 / 3 / 4 / 5 nearest-higher rungs, or All-7 — with Equal or Horizon weighting. Default chart + 2, Equal, so the slow TFs no longer anchor the path and it flips far closer to turns. Members are marked •.
Library re-wire to the house standard. Kyle-λ → fitted impact R² (ml_flow), absorption → validated VSA state (ml_vsa), efficiency ratio → shared ml_calib. The forward-test now shows a Wilson lower bound, edge-vs-null, and a runs-test.
New reads: control–price divergence (forward-tested, with alerts), self-calibrating VPIN toxicity, LTF true-delta validation, per-TF VSA tags and Amihud illiquidity.
Cleaner dashboard & signals (compact/Pro modes, signal cooldown), full in-header legend.
Defaults: stand aside when toxic and LTF validation ship on; neither alters the path fusion.
Dependencies: ml_flow/2, ml_vsa/2, ml_calib/2 (all live).
Educational, OHLCV-based estimates — not financial advice.
Release Notes
What's new — one switch, any asset class.New "Volume source" setting (group 0 · Data). Chart (default) uses the chart's own OHLCV — identical to v2.1 on NIFTY futures and any volume-bearing symbol. External (futures) borrows the whole order-flow read from a matching futures symbol (default NSE:NIFTY1!; e.g. point it at NSE:BANKNIFTY1! under a BANKNIFTY spot chart) and overlays it on your chart.
Why it matters. The engine's direction logic was already instrument-agnostic — every score is normalized to [−1,+1] and ranked by percentile, with no absolute point/tick thresholds. Volume was the only blocker: the BVC delta, CVD, VSA, VPIN, Amihud and the LTF true-delta need a real volume series. This switch supplies one, so the indicator now works on a cash index, spot FX or a thin stock.
What follows the switch: the per-TF control dispatch, the your-TF read, the LTF sub-bar pulls, and the chart VPIN/Amihud flow reads. The price you see on the chart is never changed.
Defaults: every parameter still ships set for NIFTY — nothing differs until you switch assets. A strict superset of v2.1.
Honest scope: in External mode you're reading the future's flow overlaid on your chart; it assumes the future is a faithful proxy. The on-symbol forward-test remains the arbiter.
Dependencies: ml_flow/2, ml_vsa/2, ml_calib/2 (all live).
Educational, OHLCV-based estimates — not financial advice.
Release Notes
Buyer vs Seller Control & Path of Least Resistance (MTF) → v2.4The three features that were waiting on library availability are now wired in — ml_session/2, ml_rs/1, ml_paramscan/1. Everything is additive and measure-first; defaults are unchanged for NIFTY, and the Compact dashboard is still the default.
What's new
Session awareness (ml_session). Time-of-day RVOL — how heavy this bar is for this time of day (e.g. heavy for the 09:20 slot), not versus a flat average — plus the opening-auction Initial Balance (high/low and break state) for NIFTY's 09:15 open. ToD-RVOL can nudge a signal's strength grade (a signal on time-of-day-heavy volume grades higher), IB high/low can be drawn on the chart, and a new SESSION row appears in Pro. IB-break and alerts included.
Intermarket context (ml_rs). Mansfield relative strength, a leadership state and an RS slope of the charted symbol versus a benchmark (default NSE:NIFTY). On a stock chart this is leadership vs the index; on NIFTY futures vs NIFTY spot it reads the basis drift. Leadership can nudge signal strength (a long grades higher when the symbol is leading the benchmark, a short when lagging). New INTERMKT row in Pro, with RS-leadership-flip alerts.
Adaptive fusion gain (ml_paramscan, off by default). Scans five candidate log-odds gains, scores each by a confidence-weighted hit (reward confident-and-right, penalise confident-and-wrong), and picks the stable plateau (mean − λ·std) rather than the single best-scoring value — the overfit-resistant choice. Note the path direction is gain-invariant, so this only tunes how fast clarity/conviction saturates; it is a calibration aid, never a direction change. With it off, the path is identical to v2.3.
Unchanged. The five-lens control, log-odds path fusion, correlation discount, regime/turbulence gating, honest forward-tests (Wilson LB, edge-vs-null, runs-test), the continuation and reversal signals, and all ml_flow/ml_vsa/ml_calib reads behave exactly as in v2.3. Every new behaviour defaults to display or a measure-first strength nudge — direction and firing are untouched.
Defaults. All defaults remain set for NIFTY; spot/futures and other asset classes stay selectable in Settings (Volume source + RS benchmark). Every table keeps the Pro/Compact toggle with Compact as the default.
Educational tool for context and study — not financial advice, not a signal service. Past behaviour does not predict future results.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.