ABCD Pattern Finder
May 19, 2026

The ABCD Pattern Finder indicator scans price action to identify harmonic-style AB=CD structures, providing automated detection of trend continuations and reversals with integrated trade levels. This tool is designed to filter out market noise and highlight high-probability setups based on price geometry, time ratios, and volatility.
Usage
The Usage section focuses on identifying price patterns consisting of four key points: A, B, C, and D. A bullish setup occurs when the sequence follows a "down-up-down" movement where the second leg (CD) mirrors the first (AB). Conversely, a bearish setup follows an "up-down-up" sequence.
Once point D is confirmed, the indicator plots an entry reference, a stop loss, and three take-profit levels. Users should monitor the Zigzag settings to control sensitivity; higher pivot values will filter out smaller fluctuations to focus on major market swings, while lower values will identify more frequent, short-term patterns.
The quality of the detected patterns is governed by the Pattern settings. By adjusting the Equality Tolerance, you can determine how strictly the CD leg must match the AB leg's price distance. The Time Ratio settings ensure the pattern has a symmetrical appearance by preventing the CD leg from being disproportionately faster or slower than the AB leg.
Details
The script operates using a sequence of swing highs and lows identified through pivot analysis. It calculates the relationship between these swings to ensure they meet specific Fibonacci-inspired retracement and extension rules:
- AB Leg: The initial impulse move.
- BC Leg: The retracement, which must fall within a specific percentage of AB (default 38.2% to 88.6%).
- CD Leg: The final move, which should ideally be equal in price magnitude to AB.
The indicator also incorporates a volatility filter using the Average True Range (ATR). This ensures that the AB leg is significant relative to current market volatility, preventing the script from marking negligible price action. To prevent visual clutter and redundant signals, the "Disallow Pattern Overlap" feature ensures that only one primary pattern is tracked within a specific price range at any given time.
Settings
Zigzag
- Pivot Bars Left: The number of bars to the left required to confirm a swing high or low.
- Pivot Bars Right: The number of bars to the right required to confirm a swing high or low.
Pattern
- Min/Max CD/AB Time Ratio: Controls the duration of the CD leg relative to the AB leg to ensure pattern symmetry.
- AB=CD Equality Tolerance: The allowable percentage difference between the price lengths of the AB and CD legs.
- Min/Max BC Retracement: The required percentage range that the BC pullback must reach relative to the AB move.
- Min AB Size (ATR Multiple): Filters out patterns where the initial move is too small compared to market volatility.
- ATR Length: The lookback period used for ATR-based calculations.
- Disallow Pattern Overlap: When enabled, prevents the detection of new patterns within the boundaries of an existing one.
Trade
- Stop ATR Buffer: Sets the stop loss distance beyond point D based on a multiple of the ATR.
- TP1/TP2/TP3 Fibonacci Level: Defines take-profit targets based on the Fibonacci retracement levels of the total A-to-D range.
Display & Historical
- Show Trade Levels: Toggles the visibility of entry, stop, and target lines.
- Show ABCD Lines/Labels: Toggles the visibility of the geometric pattern lines and point labels.
- Historical Closed Lookback: Sets the number of past patterns to display on the chart for backtesting analysis.
- Closed Trade Lookback: Allows the user to highlight a specific previous trade (0 for the most recent, 1 for the one prior, etc.).
- Show Stats Window: Displays a performance table showing the win rate for each take-profit target.
FAQ
How are the take-profit levels calculated? The take-profit levels are calculated as Fibonacci retracements or extensions of the entire A-to-D price range.
Can I use this for scalping or long-term trading? Yes, by adjusting the Pivot Bars and ATR settings, the indicator can be tuned for various timeframes and trading styles.
How do I get access to the ABCD Pattern Finder? 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.

