OPEN-SOURCE SCRIPT

Price Probability Engine - Volatility & Structure-Based Targets

110
The aim of the indicator is:

To provide adaptive, probability-weighted price target zones that help traders frame where price is most likely to interact next, without predicting when or guaranteeing direction.

Price Probability Engine is a target-projection overlay that blends three independent “next-move” reference methods into a single pair of AVG targets:

AVG Bull = a probabilistic upside objective

AVG Bear = a probabilistic downside objective

It is designed to help you frame the most reasonable near-term price zones using both volatility (ATR) and structure (pivot swings + measured moves) rather than relying on a single indicator.

What you see on the chart

When enabled, the script plots:

AVG Bull line (upper target)

AVG Bear line (lower target)

Optional last-bar labels that print the current target values

The overlay is scale-locked so the plots stay aligned with price when you scroll/zoom the chart.

How it works (conceptual, step-by-step)
1) ATR “reach filter” (probability gating)

All components are first checked against a reach filter:

A target is considered “reachable” only if it is within
Reach Filter × ATR from the current price.

This prevents extremely distant projections from dominating the final average.

2) Three component target engines

The script computes three upside candidates and three downside candidates:

A) ATR Component (volatility projection)

Uses ATR Length and ATR Multiplier

Projects a simple near-term band around price:

atrBull = close + ATR × mult

atrBear = close - ATR × mult

Direction mode:

Candle: compares close to close[1]

Momentum(3): uses close − close[3]

B) AutoFib Component (swing extension)

Detects swing highs/lows using pivot logic (Left/Right bars)

Projects an extension using a selectable Fib level (1.272 / 1.414 / 1.618 / 2.0 / 2.618)

Gives a structure-based target derived from the current swing range

C) Lindsey Component (measured-move target)

Detects a 3-point pivot sequence (P1/P2/P3) and projects a measured move to P4:

Bull: from a low-high-higher-low sequence

Bear: from a high-low-lower-high sequence

Optional P1/P2/P3 markers can be displayed for learning/debugging

3) Dynamic weighting (closer targets matter more)

If Dynamic Weights is enabled, each component’s weight increases as the target gets closer to price (within the reach window).
This means the final AVG tends to favor targets that are both reachable and near-term relevant.

You can control:

Base Weight (Fib / Lindsey / ATR)

Dynamic Power (how aggressively “closer” becomes “heavier”)

4) Outlier trimming (stability)

If Trim Outlier Component is enabled, the script:

computes a simple median reference of the remaining component targets

drops any target that deviates from the median by more than
Outlier Threshold × ATR

This reduces sudden jumps when one method produces an unusually extreme projection.

5) Final output: a weighted average (bull + bear)

The remaining eligible components are combined into:

AVG Bull (weighted average of bull candidates)

AVG Bear (weighted average of bear candidates)

If no components pass the reach filter (or are trimmed), the AVG line can temporarily become unavailable until valid inputs re-appear.

How to use it (practical workflow)

Pick your timeframe, then tune ATR:

Start with ATR Length 14 and ATR Mult 1.0–1.5

Set a reasonable Reach Filter (x ATR):

Smaller = only near targets

Larger = includes more distant projections

Decide how you want it to behave:

Dynamic Weights ON for “closer targets dominate”

Outlier Trim ON for smoother / less erratic averages

Use the AVG lines as planning zones, not certainties:

They are best treated as “where price is most likely to seek next” based on the blend of volatility + structure.

A common use is to monitor how price reacts as it approaches either AVG line (stalling, rejection, acceleration), and then reassess as new pivots/ATR values update.

Settings guide (quick)

ATR Length / Multiplier: controls the volatility envelope

Direction Mode: changes the bias input for ATR projection

Lindsey Left/Right: smaller = more sensitive pivots; larger = fewer, more meaningful pivots

Fib Left/Right + Extension: controls the swing structure target

Reach Filter: controls what qualifies as a realistic near-term target

Dynamic Power: higher = stronger preference for the nearest target

Outlier Threshold: higher = fewer removals; lower = more aggressive trimming

Notes / Transparency

This script does not place trades or guarantee outcomes. It is a visual target framework that adapts as volatility and market structure change. For best clarity, publish charts with this script on a clean layout so the AVG lines and labels are easy to identify.

Penafian

Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.