Skip to content
All library documents

Combining Candlestick Reversals, RSI, and EMA Trend Filters

Article TradingView scripts

Summary

This rule-based strategy looks for bullish or bearish candlestick patterns while filtering for a longer-term trend. Its active bullish patterns are engulfing candles and morning stars; its bearish patterns are engulfing candles and evening stars. Inside bars are defined in the script but excluded from the active pattern conditions. Three EMAs must be ordered in the trade direction, with price above all three for longs or below all three for shorts.

RSI must have reached an oversold or overbought threshold within the current or prior two bars, and must be below or above 50, respectively, when the pattern appears. Entries trigger on those combined conditions, with configurable point-based profit and loss exits. The code includes default RSI, EMA, and exit settings, but no market, timeframe, backtest results, or evidence of profitability. The accompanying prose inaccurately characterizes RSI as decreasing for both directions; the actual conditions specify threshold history and position relative to 50, not a falling or rising RSI requirement.

Key ideas

  • Long entries combine an oversold RSI reading, a bullish pattern, and an upward EMA alignment with price above all three averages.
  • Short entries combine an overbought RSI reading, a bearish pattern, and the inverse EMA alignment with price below all three averages.
  • The RSI threshold may have occurred on the current bar or either of the two preceding bars.
  • The strategy uses configurable point-based take-profit and stop-loss exits.
  • Inside-bar patterns are calculated but omitted from the active entry signals, and no performance evidence is supplied.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.