Reversal
Jun 12, 2023

The Reversal indicator identifies candlestick patterns that signal potential market exhaustion and subsequent price reversals by tracking extreme price closes relative to a defined lookback period. It provides traders with actionable signals when price action deviates significantly from a prevailing trend and confirms a breakout from specific high or low thresholds.
Usage
The Usage section describes how the script can be used to pinpoint turning points in the market. Traders can utilize this tool to spot entries where a trend may be losing momentum.
- Bullish Reversals: These occur when the indicator first identifies a candle with the lowest close within the "Candle Lookback" period. A bullish signal is triggered if the price subsequently closes above the high of that specific "extreme" candle within the "Confirm Within" window.
- Bearish Reversals: These occur when the indicator identifies a candle with the highest close within the "Candle Lookback" period. A bearish signal is triggered if the price subsequently closes below the low of that "extreme" candle within the "Confirm Within" window.
The tool is effective across various timeframes and assets, helping to filter out market noise by requiring price to break specific confirmation levels before a signal is plotted.
Details
The script follows a specific logic to ensure the validity of a reversal pattern. First, it scans for an extreme candle—a candle whose close is lower (for bullish) or higher (for bearish) than all other candles in the user-defined lookback period.
Once this anchor candle is established, the script monitors the subsequent price action. If the price fails to break the anchor candle's high/low within the "Confirm Within" period, the potential setup is discarded. Furthermore, if the price makes a new extreme (dropping below the low of a potential bullish anchor or rising above the high of a bearish anchor) before confirmation, the current setup is invalidated and the search resets. This ensures signals are only generated when momentum genuinely shifts.
Settings
- Candle Lookback: Determines the number of previous candles used to identify the highest or lowest closing price. Higher values require a more significant price extreme to trigger a setup.
- Confirm Within: Specifies the maximum number of candles allowed to pass after the extreme candle for a confirmation breakout to occur.
- Non-Repainting Mode: When enabled, signals will only appear after a bar has closed, ensuring the signal does not disappear if price fluctuates during the live candle.
FAQ
How do I adjust the sensitivity of the signals? You can increase the "Candle Lookback" to find more significant historical reversals or decrease the "Confirm Within" setting to require a more immediate price response.
What is the difference between standard and Non-Repainting mode? Standard mode displays signals in real-time as soon as the conditions are met, while Non-Repainting mode waits for the candle to close to ensure the signal is confirmed and permanent on the chart.
How can I access the Reversal indicator? 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.

