3 Reversal Candle Patterns Indicators for ThinkorSwim

BenTen

Administrative
Staff member
Staff
VIP
Lifetime
Sharing with you guys some reversal candlestick patterns for ThinkorSwim that will give buy and sell signals on your chart. Two of them were converted from TradingView and the other one were shared on the ThinkorSwim chatroom.

They look something like this.

kZStgdr.png


XikXlyY.png


Here are indicators that will show you reversal candlestick patterns.

Reversal Candle Pattern SetUp

This was taken from TradingView and one of our members converted it to ThinkorSwim.

As you look at a bullish outside reversal pattern, you will notice that the current bar's low is lower than the prior bar's low. Essentially, the market is testing the waters below recently established lows to see if a downside follow-through will occur. When no additional selling pressure enters the market, the result is a flood of buying pressure that causes a springboard effect, thereby shooting price above the prior bar's highs and creating the beginning of a bullish advance."

thinkScript Code

Rich (BB code):
#
# WalkingBallista
# Converted from: https://www.tradingview.com/script/dk2Rl4xb-Reversal-Candle-Pattern-SetUp/
#
def reversal_long = low < low[1] and close > high[1] and open < close[1];
def reversal_short = high > high[1] and close < low[1] and open >open[1];

plot signal_long = if reversal_long then low else double.nan;
plot signal_short = if reversal_short then high else double.nan;

signal_long.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
signal_long.SetLineWeight(3);
signal_long.SetDefaultColor(color.GREEN);
signal_long.HideBubble();
signal_long.HideTitle();

signal_short.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
signal_short.SetLineWeight(3);
signal_short.SetDefaultColor(color.RED);
signal_short.HideBubble();
signal_short.HideTitle();
AddLabel(yes,"Reversal",color.CYAN);

[NM] Reversal Candles

Another indicator that was converted from TradingView platform. This one has some strict conditions.

BUY Signal reversal candle
  • Low of current candle exceeds low of previous candle
  • Low of current candle is lowest for last 7 candles
  • High of current candle exceeds high of previous candle
  • Close of current candle is in the upper 50% of the range of this candle
SELL Signal reversal candle
  • High of current candle exceeds high of previous candle
  • High of current candle is Highest for last 7 candles
  • Low of current candle exceeds low of previous candle
  • Close of current candle is in the lower 50% of the range of this candle

thinkScript Code

Rich (BB code):
#
# WalkingBallista
# Converted from: https://www.tradingview.com/script/sQcoF9i6-NM-Reversal-Candles-v01/
#
def reversal_long = low[0] < low[1] and high[0] > high[1] and close[0] > low[0] + (high[0] - low[0])/2 and low[0] < low[2] and low[0] < low[3] and low[0] < low[4] and low[0] < low[5] and low[0] < low[6] and low[0] < low[7];
def reversal_short = low[0] < low[1] and high[0] > high[1] and close[0] < high[0] - (high[0] - low[0])/2 and high[0] > high[2] and high[0] > high[3] and high[0] > high[4] and high[0] > high[5] and high[0] > high[6] and high[0] > high[7];

plot signal_long = if reversal_long then low else double.nan;
plot signal_short = if reversal_short then high else double.nan;

signal_long.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
signal_long.SetLineWeight(3);
signal_long.SetDefaultColor(color.Cyan);
signal_long.HideBubble();
signal_long.HideTitle();

signal_short.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
signal_short.SetLineWeight(3);
signal_short.SetDefaultColor(color.Magenta);
signal_short.HideBubble();
signal_short.HideTitle();

AddLabel(yes,"Reversal_MN",color.PLUM);

Bulkowski's Three Inside Up

Unlike the other two indicators, this one only identifies bullish reversal candlestick pattern. The Three Inside Up is a "bullish harami with a confirming candle as the third day".

thinkScript Code

Rich (BB code):
# Bulkowski Three Inside Up
# Nube 3.30.19
# The three inside up acts as a bullish reversal 65% of the time and price climbs 2.61% in 10 days, on average - Thomas Bulkowski, TASC 11.2011

input label = yes;

def o = open;
def h = high;
def l = low;
def c = close;

def downTrend = Sum(h < h[1], 3) == 3 and
                Sum(l < l[1], 3) == 3;

def candleOne = downtrend[1] and o > c;
def candleTwo = candleOne[1] and
                c > o        and
                ((o >= c[1] and c <  o[1]) or
                 (o >  c[1] and c <= o[1]));
def candleThree = candleTwo[1] and
                  c > o        and
                  c > c[1];

plot
ThreeInsideUp = candleThree;
ThreeInsideUp.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
ThreeInsideUp.SetDefaultColor(Color.White);

Addlabel(label and ThreeInsideUp, " Three Inside Up ", Color.White);

# f/ Bulkowski Three Inside Up
AddLabel(yes,"InsideUp",color.DARK_ORANGE);

Keep in mind that these reversal candlesticks aren't the holy grail. Please use them as additional confirmation or warning for a potential reversal. I recommend pairing it with other indicators to confirm your bias.

Credits:

 
Last edited:

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

hi is this the correct code for bulkowski inside up? thank you very much

Code:
def o = open;

def h = high;

def l = low;

def c = close;

def downTrend = Sum(h < h[1], 3) == 3 and

                Sum(l < l[1], 3) == 3;

def candleOne = downtrend[1] and o > c;

def candleTwo = candleOne[1] and

                c > o        and

                ((o >= c[1] and c <  o[1]) or

                 (o >  c[1] and c <= o[1]));

def candleThree = candleTwo[1] and

                  c > o        and

                  c > c[1];

AddLabel(yes,"InsideUp",color.DARK_ORANGE);
AddLabel(yes,"Three Inside up", Color.White);
 
Last edited by a moderator:
Hi Ben, TOS has customised ThreeInsideUp candlestick pattern, i am unfamiliar with codes but just comparing to the codes shared above, it doesn't seem to look similar, May i request your comments pls. thanks

Code:
#
# TD Ameritrade IP Company, Inc. (c) 2011-2019
#

#wizard text: Inputs: length:

#wizard input: length

#wizard text: trend setup:

#wizard input: trendSetup

#wizard text: body factor:

#wizard input: bodyFactor

input length = 20;

input trendSetup = 3;

input bodyFactor = 0.3;

assert(bodyFactor >= 0, "'body factor' must not be negative: " + bodyFactor);

plot Bullish = Harami(length, trendSetup, bodyFactor).Bullish[1] and

    open < close and

    close > close[1];

Bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Bullish.SetDefaultColor(GetColor(5));

Bullish.SetLineWeight(2);
 
@Nick They sound similar but the code is different. I tried comparing them on a chart and they identify different candles. The one ToS provided seems to work better. Thanks for letting me know.
 
How do you input these scripts into TOS scan , i was able to use it as a study but i would like to input it to a scan , thx.
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
433 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top