OPEN-SOURCE SCRIPT
Updated Trend Reversal Probability [Algoalpha]

Introducing Trend Reversal Probability by AlgoAlpha – a powerful indicator that estimates the likelihood of trend reversals based on an advanced custom oscillator and duration-based statistics. Designed for traders who want to stay ahead of potential market shifts, this indicator provides actionable insights into trend momentum and reversal probabilities.
Key Features:
How to Use:
How It Works:
The indicator begins by calculating a custom oscillator using short and long simple moving averages (SMA) of the midpoint price. A proprietary RSI-like formula then transforms these values to estimate trend direction and momentum. The duration between trend reversals is tracked and averaged, with standard deviations plotted to provide probabilistic guidance on trend longevity. Additionally, the indicator incorporates a cumulative probability function to estimate the likelihood of a trend reversal, displaying the result in a data table for easy reference. When probability levels cross key thresholds, alerts are triggered, helping traders take timely action.
Key Features:
- 🔧 Custom Oscillator Calculation: Combines a dual SMA strategy with a proprietary RSI-like calculation to detect market direction and strength.
- 📊 Probability Levels & Visualization: Plots average signal durations and their statistical deviations (±1, ±2, ±3 SD) on the chart for clear visual guidance.
- 🎨 Dynamic Color Customization: Choose your preferred colors for upward and downward trends, ensuring a personalized chart view.
- 📈 Signal Duration Metrics: Tracks and displays signal durations with columns representing key percentages (80%, 60%, 40%, and 20%).
- 🔔 Alerts for High Probability Events: Set alerts for significant reversal probabilities (above 84% and 98% or below 14%) to capture key trading moments.
How to Use:
- Add the Indicator: Add Trend Reversal Probability to your favorites by clicking the star icon.
- Market Analysis: Use the plotted probability levels (average duration and ±SD bands) to identify overextended trends and potential reversals. Use the color of the duration counter to identify the current trend.
- Leverage Alerts: Enable alerts to stay informed of high or extreme reversal probabilities without constant chart monitoring.
How It Works:
The indicator begins by calculating a custom oscillator using short and long simple moving averages (SMA) of the midpoint price. A proprietary RSI-like formula then transforms these values to estimate trend direction and momentum. The duration between trend reversals is tracked and averaged, with standard deviations plotted to provide probabilistic guidance on trend longevity. Additionally, the indicator incorporates a cumulative probability function to estimate the likelihood of a trend reversal, displaying the result in a data table for easy reference. When probability levels cross key thresholds, alerts are triggered, helping traders take timely action.
Release Notes
Small ChangesOpen-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.
For quick access on a chart, add this script to your favorites — learn more here.
🔱Get 15% off VIP Bundle!🔱(Ends soon!)
Code: ALPH4
🚨Get premium: algoalpha.io
🛜Get FREE signals: discord.gg/xCmqTVRexz
❓Do you have feedback or indicator ideas? Join our server to tell us about it!
Code: ALPH4
🚨Get premium: algoalpha.io
🛜Get FREE signals: discord.gg/xCmqTVRexz
❓Do you have feedback or indicator ideas? Join our server to tell us about it!
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.
For quick access on a chart, add this script to your favorites — learn more here.
🔱Get 15% off VIP Bundle!🔱(Ends soon!)
Code: ALPH4
🚨Get premium: algoalpha.io
🛜Get FREE signals: discord.gg/xCmqTVRexz
❓Do you have feedback or indicator ideas? Join our server to tell us about it!
Code: ALPH4
🚨Get premium: algoalpha.io
🛜Get FREE signals: discord.gg/xCmqTVRexz
❓Do you have feedback or indicator ideas? Join our server to tell us about it!
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.