// Candlestick Patterns bullish_engulfing = ta.crossover(close[1], open[1]) and close > open and close[1] < open[1] bearish_engulfing = ta.crossover(open[1], close[1]) and close < open and close[1] > open[1] pin_bar_bullish = (low < low[1] and close > (high + low) / 2) pin_bar_bearish = (high > high[1] and close < (high + low) / 2)
// Trend Direction uptrend = close > ema200 downtrend = close < ema200
// Entry Signals long_signal = uptrend and bullish_engulfing and rsi > rsi_oversold short_signal = downtrend and bearish_engulfing and rsi < rsi_overbought
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.