Flag Breakout Forecasts
Mar 20, 2026

The Flag Breakout Forecasts indicator identifies converging price channels (flags and symmetric wedges) and provides probabilistic breakout forecasts based on historical distribution and real-time volume data. It uses a zigzag-based pivot detection algorithm to confirm patterns and estimates the likelihood of imminent breakouts, helping traders anticipate market resolutions with statistical backing.
Usage
The Usage section describes how the script can be used to identify potential market moves. It highlights confirmed patterns with solid lines and emerging patterns with dashed lines.
- Pattern Identification: Solid lines represent fully confirmed channels where three collinear pivots have been identified on both sides. Dashed lines indicate that one side is still awaiting a third confirmed pivot, providing an early detection signal.
- Probability Labels: The label above active patterns shows
P(break)(probability of an imminent breakout based on duration), andP(bull)/P(bear)(directional probabilities). AP(break)above 70% suggests the pattern is statistically overdue for a resolution. - Volume Analysis: The net volume gauge and statistics table offer insights into supply and demand balance. A bullish-leaning gauge combined with a high
P(bull)reading reinforces a long bias. - Breakout Signals: Arrow labels appear on the chart when a price break is confirmed, displaying the total volume absorbed and the pattern's duration.
Details
This tool utilizes several advanced concepts to provide objective pattern analysis:
- Collinearity & Convergence: The script measures the deviation of middle pivots from projected trendlines to ensure geometric accuracy. It specifically filters for narrowing gaps between trendlines to distinguish flags from parallel channels.
- Probabilistic Forecasting: Breakout duration probabilities are calculated using a normal CDF approximation (Abramowitz & Stegun) applied to the z-scores of historical breakout data for the specific instrument.
- Volume Integration: The directional probability is adjusted using the Net Volume Ratio, which maps the balance of up-close vs. down-close bars to a -100 to +100 scale.
- Confirmation Logic: Breakouts are validated either by two consecutive closes outside the boundary or by a single high-momentum candle (body size > 3 standard deviations above the 20-bar mean).
Settings
Main Settings
- Zig Zag Length: The time horizon for swing detection; lower values (e.g., 3-7) capture intraday moves, while higher values (10-20) are for swing trading.
- Collinearity Tolerance (%): Determines how strictly pivots must align. Lower values require cleaner lines; higher values allow for more approximate formations.
Appearance
- Show Pattern Volume Table: Toggles the visibility of the volume statistics table.
- Table Size / Position: Customizes the scale and location of the volume data on the chart.
- Bullish / Bearish Color: Sets the color scheme for breakout signals, table cells, and labels.
FAQ
- How do I interpret the P(break) value? It represents the likelihood that the pattern will resolve soon. It increases as the current pattern's duration exceeds the historical average duration of previous breakouts.
- What is the difference between solid and dashed lines? Solid lines mean the trendline is fully confirmed by three pivots. Dashed lines use a "running extreme" as a temporary third point, signaling a potential pattern that hasn't yet met all confirmation criteria.
- How can I access Flag Breakout Forecasts? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Trading & investing are risky and many will lose money in connection with trading and investing activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other investments involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.
Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.
Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.
As a provider of technical analysis tools and strategies, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content, tool, or platform feature we provide.
Charts used on this site are by TradingView in which the majority of our technical indicators are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.com TradingView® has no affiliation with the owner, developer, or provider of the Services described herein.
Market data is provided by CBOE, CME Group, BarChart, Massive, CoinAPI. Select U.S. equities data is provided through Massive. CBOE BZX real-time U.S. equities data is licensed from CBOE and provided through BarChart. Real-time futures data is licensed from CME Group and provided through BarChart. Select cryptocurrency data, including major coins, is provided through CoinAPI. All data is provided “as is” and should be verified independently for trading purposes.
This does not represent our full Disclaimer. Please read our full disclaimer.
© 2026 LuxAlgo Global, LLC.

