Flexible Reversal Detector
Jun 9, 2025

The Flexible Reversal Detector indicator is an advanced analytical tool designed to identify local trend reversal zones based on customizable candlestick formation logic. It helps traders pinpoint potential turning points in the market by analyzing price structure, body size ratios, and preceding trend momentum.
Usage
The Flexible Reversal Detector can be used to spot "U-shaped" bullish reversals and "n-shaped" bearish reversals. A signal is generated when a specific sequence of candles occurs: an initial strong candle, followed by a series of smaller "middle" candles, and concluding with a strong reversal candle.
To use the tool effectively:
- Trend Identification: Look for bullish triangles appearing after a significant price drop or bearish triangles appearing after a price rise.
- Support/Resistance: The indicator plots colored boxes spanning the length of the pattern. These zones can be used to identify potential future support or resistance levels.
- Risk Management: When enabled, the script provides dynamic Take Profit (TP) and Stop Loss (SL) levels for the most recent signal, which can be calculated via ATR multipliers or fixed percentages.
- Volume Confirmation: Use the volume filter to ensure the final reversal candle has sufficient trading activity relative to its moving average.
Details
The script operates on a logic-based pattern detection system:
- Pattern Structure: It searches for an initial candle (the start of the move) and a final candle (the reversal). Between these, it validates that middle candles remain within a certain size threshold relative to the first candle.
- Trend Requirement: Before a "U" pattern is valid, the script checks if there was a preceding drop. Conversely, a "n" pattern requires a preceding rise. This ensures reversals are detected at the end of established local moves.
- Measurement Modes: Users can choose between "ATR" (Average True Range) and "Percentage" modes to define what constitutes a significant price move or body size.
Settings
Measurement Settings
- Measurement Mode: Choose between ATR-based or Percentage-based thresholds for detection logic.
ATR Settings
- ATR Length/Type: Configures the period and smoothing method (RMA, SMA, EMA, WMA) for ATR calculations.
- Global ATR Multiplier: Scales all ATR-based threshold requirements.
Pattern Settings
- Max Pattern Length: The maximum number of candles allowed to form a single reversal structure.
- Min Ratio / Mid Max Ratio: Defines the relative body size requirements for the final and middle candles compared to the first candle.
- Bars to Check: The lookback period used to determine if a sufficient price move preceded the pattern.
Volume Filter
- Use Volume Filter?: Enables a requirement that the final candle's volume must exceed a specified threshold.
- Volume Multiplier: The multiplier applied to the Volume SMA to set the minimum volume threshold.
Risk Management
- Show TP/SL Levels: Toggles the visibility of profit and loss targets for the latest signal.
- TP/SL Mode: Sets whether targets are calculated using a multiplier of the average range or a fixed percentage.
FAQ
How do I access Flexible Reversal Detector?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Why am I not seeing any signals on lower timeframes?
On markets with low volatility or lower timeframes, the default percentage/ATR thresholds might be too high. Try reducing the "Min Drop" or "Min Rise" settings to better fit the current price action.
What do the colored boxes represent?
The boxes represent the full span of the detected reversal pattern, from the high/low of the initial candle to the close of the final signal candle. These are helpful for identifying structure and potential zones of interest.
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.

