OPEN-SOURCE SCRIPT

Top and Bottom Probability

81



The top and bottom probability oscillator is an educational indicator that estimates the probability of a local top or bottom using four ingredients:

price extension since the last RSI overbought/oversold,
time since that OB/OS event,
RSI divergence strength,
Directional Momentum Velocity (DMV) — a normalized, signed trend velocity.

It plots RSI, two probability histograms (Top %, Bottom %), and an optional 0–100 velocity gauge.

How to read it

RSI & Levels: Standard RSI with OB/OS lines (70/30 by default).

Prob Top (%): Red histogram, 0–100. Higher values suggest increasing risk of a local top after an RSI overbought anchor.

Prob Bottom (%): Green histogram, 0–100. Higher values suggest increasing chance of a local bottom after an RSI oversold anchor.

Velocity (0–100): Optional line. Above 50 = positive/upward DMV; below 50 = negative/downward DMV. DMV pushes Top risk when trending down and Bottom chance when trending up.

These are composite, scale-free scores, not certainties or trade signals.

What the probabilities consider

Price Delta: How far price has moved beyond the last OB (for tops) or below the last OS (for bottoms). More extension → higher probability.

Time Since OB/OS: Longer time since the anchor → higher probability (until capped by the “Time Normalization (bars)” input).

Oscillator Divergence: RSI pulling away from its last OB/OS reading in the opposite direction implies weakening momentum and increases probability.

Directional Momentum Velocity (DMV):

Computes a regression slope of hlc3 vs. bar index, normalized by ATR, then squashed with tanh.

Downward DMV boosts Top probability; upward DMV boosts Bottom probability.

Toggle the velocity plot and adjust its sensitivity with Velocity Lookback, ATR Length, and Velocity Gain.

All four terms are blended with user-set weights. If Normalize Weights is ON, weights are rescaled to sum to 1.

Inputs (most useful)

RSI Length / OB / OS: Core RSI setup.

Time Normalization (bars): Sets how quickly the “time since OB/OS” term ramps from 0→1.

Weights:

Price Delta, Time Since OB/OS, Osc Divergence, Directional Velocity.

Turn Normalize Weights ON to keep the blend consistent when you experiment.

Settings:

Velocity Lookback: Window for slope estimation (shorter = more reactive).

ATR Length: Normalizes slope so symbols/timeframes are comparable.

Velocity Gain: Steepens or softens the tanh curve (higher = punchier extremes).

Show Velocity (0–100): Toggles the DMV display.

Tip: If you prefer momentum measured on RSI rather than price, in the DMV block replace hlc3 with rsi (concept stays identical).

Practical tips

Use Top/Bottom % as context, not triggers. Combine with structure (S/R), trend filters, and risk management.

On strong trends, expect the opposite probability (e.g., Top % during an uptrend) to stay suppressed longer.

Calibrate weights: e.g., raise Osc Divergence on mean-reversion symbols; raise Velocity in trending markets.

For lower noise: lengthen Velocity Lookback and ATR Length, or reduce Velocity Gain.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.