Extreme Engulfing Reversal Pattern for ThinkorSwim

BenTen

BenTen

Administrative
Staff
VIP
The Engulfing candlestick is considered to be a reliable pattern for reversal trading. This indicator will give you a buy and sell signal based on the Engulfing pattern combining with the RSI (Relative Strength Index) indicator.

When a bullish or bearish Engulfing candle is identified we also look at the Overbought and Oversold levels. If they match up then a signal is alerted.
  • Buy signal: Bullish Engulfing Candlestick is detected while the RSI is below 25 (extremely oversold level) then we get a sense that a bullish reversal may happen here.
  • Sell signal: The same goes for bearish Engulfing candles. It has to be detected while the RSI is in extreme overbought level (75 and over).





thinkScript Code

Code:
# Bullish/ Bearish Engulfing Alerts (Oversold/ Overbought)

# Use with caution and in context of market.
# Make sure to adjust settings that fits you best.

# By Confluence Capital Group @ConfluenceCptl - 2017-12-04
# Addendum & thanks from @M0101X

input length = 14;
input over_Bought = 75;
input over_Sold = 25;
input price = close;
input averageType = AverageType.WEIGHTED;

#defining engulfing bars
def BodyMax = Max(open, close);
def BodyMin = Min(open, close);
def IsEngulfing = BodyMax > BodyMax[1] and
BodyMin < BodyMin[1];

#defining the bullish / bearish signals

def bullish_signal = RSI(length = length, averageType = averageType) < over_Sold and Isengulfing and close > open;

def bearish_signal = RSI(length = length, averageType = averageType) > over_Bought and Isengulfing and close < open;

#plotting the bullish / bearish signals
plot bullish = bullish_signal;
bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
bullish.SetDefaultColor(Color.CYAN);
bullish.SetLineWeight(2);

plot bearish = bearish_signal;
bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
bearish.SetDefaultColor(Color.YELLOW);
bearish.SetLineWeight(2);

Shareable Link

 
Thread starter Similar threads Forum Replies Date
BenTen Indicators 13

Top