OPEN-SOURCE SCRIPT
Reversal Probability

Reversal · Probability %
*Not every reversal is equal. Now you can see exactly how strong each one is.*
**Overview**
This indicator is built on the proven reversal detection logic by HasanRifat, extended with a real-time multi-factor probability scoring engine. Every signal now shows a percentage directly on the candle — so instead of just knowing a reversal is happening, you know how much confluence is behind it.
A signal with 80% means five independent factors are aligning at the same moment. A signal with 40% means two are. You decide which ones to trade.
---
**How the Original Signal Works**
The core detection engine is unchanged from the original. It identifies a reversal by watching for a candle that closes below the lowest low or above the highest high of the previous lookback period — and then waits for price to confirm by breaking back through the trigger candle's range within your confirmation window. This makes the base signal clean, precise, and reliable on all timeframes.
---
**What the Probability % Adds**
On every signal, five independent factors are checked in real time. Each factor that aligns adds one point. Your final score divided by the maximum possible points gives the probability percentage shown on the label.
🔵 **RSI Extreme** — Is RSI in oversold territory on a bullish signal or overbought on a bearish signal? Reversals from exhausted momentum have higher follow-through.
🔊 **Volume Spike** — Is volume more than 1.5 times the 20-bar average on this candle? Institutional participation at a reversal point is a strong confirmation.
📐 **Premium / Discount Zone** — Is price below the midpoint of the recent range (discount) on a bullish signal, or above it (premium) on a bearish signal? Buying in discount and selling in premium aligns with smart money behaviour.
🕯️ **Wick Rejection** — Does the candle have a strong rejection wick in the opposite direction? A long lower wick on a bullish signal means price was aggressively pushed back up from the lows.
📈 **EMA Alignment** — Is price positioned correctly relative to the EMA for the signal direction? Trend alignment adds weight to the reversal.
---
**Signal Colours**
🟢 **Green** — Bullish reversal signal, standard probability
🔴 **Red** — Bearish reversal signal, standard probability
🟡 **Gold** — Any signal with 75% probability or above — your highest conviction setups
---
**How To Use It**
**Step 1** — Set your minimum probability filter. Default is 40%. If you want only the cleanest setups, raise it to 60% or 70%. The chart will show fewer signals but each one will have strong multi-factor confirmation behind it.
**Step 2** — Watch for gold labels. These are the 75%+ signals where the majority of factors are aligned. These are your A+ setups.
**Step 3** — Check the info panel. It shows the live probability for both directions, the factor score, RSI reading, premium or discount zone, and current volume status — all updated on every bar.
**Step 4** — Use the signal with your existing entry method. This indicator does not give you a stop loss or take profit. It tells you where and how strongly a reversal is forming. Your entry confirmation and risk management remain your own.
---
**Settings Guide**
| Setting | What It Does | Recommended |
|---|---|---|
| Candle Lookback | How many candles back to scan for the extreme | 20 default |
| Confirm Within | How many bars price has to confirm the signal | 3 default |
| Non-Repainting Mode | Signals fire on closed bars only | ON for live trading |
| Show Probability % | Toggle the % label on or off | ON |
| Minimum % to Show | Hide signals below this threshold | 40–60% |
| RSI Factor | Toggle RSI extreme check | ON |
| Volume Factor | Toggle volume spike check | ON |
| Zone Factor | Toggle premium/discount check | ON |
| Wick Factor | Toggle wick rejection check | ON |
| EMA Factor | Toggle EMA alignment check | ON |
---
**Tips**
- **Turn on Non-Repainting Mode for live trading.** This ensures signals only appear once the candle that triggered them has fully closed, eliminating any chance of the signal disappearing mid-bar.
- **Higher timeframes give higher quality signals.** A 75% signal on the 1 hour chart carries more weight than a 75% signal on the 5 minute chart because the factors are based on more significant price action.
- **Combine with a structure indicator.** This indicator tells you when a reversal is forming and how strong it is. A market structure or order block indicator tells you if you are at the right location for that reversal. Together they form a complete entry system.
- **Use the minimum probability filter as your quality gate.** Do not try to trade every signal. The filter exists so you do not have to manually judge each one — set it once and only the signals above your confidence threshold will appear.
- **Gold is your focus.** If you only ever trade the gold labels and ignore everything else, you will trade fewer setups with higher average quality. That is the right trade-off.
---
**Works on all markets and timeframes** — Forex, indices, crypto, commodities, stocks. The probability factors are universal and do not rely on any market-specific parameters.
---
**Credits**
Original reversal detection logic by HasanRifat. Probability scoring engine, label system, info panel, and factor toggles added as an extension of the original work.
---
**Subtitle (for TradingView subtitle field)**
> Multi-factor reversal detection with real-time probability scoring — see exactly how strong each signal is before you trade it.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.