Probabilistic Breakout Forecaster [LuxAlgo]The Probabilistic Breakout Forecaster indicator calculates the statistical probability of price breaking out of a defined range within a specific future time horizon. Using a log-normal random walk model, it provides traders with a quantitative estimate of whether current price action is likely to exceed local highs or lows.
🔶 USAGE
The indicator is displayed in a separate pane, showing two oscillating probability lines: a bullish breakout probability (positive values) and a bearish breakout probability (negative values).
When the bullish probability line approaches or exceeds the 50% threshold, it indicates a higher statistical likelihood that the price will break above the recent range high within the specified forecast horizon. Conversely, when the bearish probability line (plotted negatively) reaches the -50% threshold, it suggests a high probability of a breakdown below the recent range low.
The tool is particularly useful for:
Identifying potential breakout candidates before the price movement occurs.
Assessing the risk of "fakeouts" by comparing price proximity to the range boundary versus the statistical probability of a sustained move.
Determining if current volatility levels are sufficient to support a trend continuation.
🔹 Dashboard
The real-time dashboard provides a concise summary of the current forecast:
Bullish/Bearish Probabilities: The exact percentage chance of a breakout within the selected horizon.
Squeeze Intensity: A metric indicating how compressed the current volatility is relative to historical averages. High squeeze intensity (above 50%) often precedes significant expansion.
Horizon: The number of bars the current forecast is looking into the future.
🔶 DETAILS
The script utilizes a Log-Normal Random Walk model to forecast price distributions. This approach assumes that price returns follow a normal distribution, allowing the script to calculate the Z-score for the distance between the current price and the range boundaries.
🔹 Breakout Probability
The probability is derived using the Normal Cumulative Distribution Function (CDF). It calculates the area under the bell curve beyond the upper and lower range boundaries, adjusted for the square root of time (Forecast Horizon) and the standard deviation of log returns (Volatility Lookback).
🔹 Volatility Squeeze
The Squeeze Intensity metric compares the current Average True Range (ATR) to its 100-period simple moving average. When the ATR is significantly lower than its historical average, the intensity increases, signaling that the market is in a period of low-volatility consolidation that often leads to a "volatility explosion."
🔶 SETTINGS
🔹 Calculation Settings
Range Length: The lookback period used to determine the highest high and lowest low that act as the breakout boundaries.
Forecast Horizon (Bars): The number of bars into the future the model is predicting. A longer horizon generally increases the probability of hitting a boundary but decreases the precision of the timing.
Volatility Lookback: The period used to calculate the standard deviation of log returns, which informs the "width" of the expected price distribution.
🔹 Visualization
Bullish/Bearish Color: Customizes the colors for the respective probability plots and fills.
Fill Transparency: Adjusts the visibility of the area between the probability lines and the zero baseline.
🔹 Dashboard
Enable Dashboard: Toggles the visibility of the on-screen information table.
Position: Moves the dashboard to different corners of the chart.
Size: Adjusts the scale of the dashboard text and cells.
Pine Script® göstergesi






















