Reversal Candlestick Pattern With Trend Indentifier
Feb 14, 2018

The Reversal Candlestick Pattern With Trend Indentifier indicator is a comprehensive tool designed to identify popular candlestick reversal patterns only when they occur within a specific trend context. By filtering technical formations through a Relative Strength Index (RSI) trend filter, it aims to reduce false signals and highlight high-probability reversal opportunities.
Usage
The script identifies a wide variety of single, double, and triple candlestick patterns. Unlike standard pattern recognizers, this tool requires the market to be in a specific state (overbought or oversold based on RSI) for a pattern to be valid.
For example, a Bullish Engulfing pattern will only be plotted if the RSI is below the user-defined bearish threshold, signaling a potential reversal from a downtrend. Conversely, a Shooting Star will only appear if the RSI is above the bullish threshold, indicating a potential top in an uptrend.
The supported patterns include:
- Bullish Patterns: White Marubozu (wm), Hammer (h), Inverted Hammer (ih), Bullish Engulfing (e), Tweezer Bottom (tb), Three White Soldiers (tws), Morning Star (ms), and Three Inside Up (tiu).
- Bearish Patterns: Black Marubozu (bm), Hanging Man (hm), Shooting Star (ss), Bearish Engulfing (e), Tweezer Top (tt), Three Black Crows (tbc), Evening Star (es), and Three Inside Down (tid).
Details
The indicator calculates trend using a 14-period RSI. The logic dictates that a "downward trend" is present when RSI is below a certain level, and an "upward trend" is present when it is above a specific level.
The candlestick logic accounts for:
- Body vs. Wick Ratios: Ensuring hammers have long lower wicks and marubozus have minimal wicks.
- Engulfing Logic: Checking that the current candle body fully encompasses the previous candle's body.
- Trend Confluence: Each pattern is hard-coded to check the
isTrendUporisTrendDownvariable before triggering a plot.
Settings
- RSI Bullish Criteria: Sets the RSI threshold (default 55) above which the market is considered to be in an uptrend.
- RSI Bearish Criteria: Sets the RSI threshold (default 45) below which the market is considered to be in a downtrend.
FAQ
How do I use the Reversal Candlestick Pattern With Trend Indentifier?
You can look for labels on the chart (e.g., "h" for Hammer or "ss" for Shooting Star) that appear during specific RSI conditions to identify potential trend reversals.
Can I change the trend sensitivity?
Yes, by adjusting the Bullish and Bearish RSI Criteria in the settings, you can make the trend filter more or less restrictive.
How do I get access to this tool?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.