# 3 Candle HighLow Retracement Watchlist Column For ThinkOrSwim

#### Mr D

##### New member
3 Candle Swing Retracement Watchlist Column For ThinkOrSwim
This study tells you the strength of movement on a given timeframe. Set up 3-4 WL columns for your timeframes of interest, say 1m 5m 15m 60m. When they are all bright green or bright red, that's strong momentum.

Ruby:
``````##############################
# Retracement WL Column      #
# 3 candle swing retracement #
# Color codes:               #
# >  0.79: bright green      #
# < -0.79: bright red        #
# <  0.38: cyan              #
# > -0.38: magenta           #
# < 0: dark_red              #
# > 0: dark_green            #
##############################

def H = if high >= high[1] and high >= high[2] then high else if high[1] >= high and high[1] >= high[2] then high[1] else high[2];
def L = if low <= low[1] and low <= low[2] then low else if low[1] <= low and low[1] <= low[2] then low[1] else low[2];
def HP = if high >= high[1] and high >= high[2] then 0 else if high[1] >= high and high[1] >= high[2] then 1 else 2;
def LP = if low <= low[1] and low <= low[2] then 0 else if low[1] <= low and low[1] <= low[2] then 1 else 2;

plot rsi= if lp>hp then (close - L)/(H-L) else if hp>lp then (close - H)/(H-L)
else if close>open[2] then (close-L)/(H-L) else (close-H)/(H-L);
def up = rsi>0.79;
def dn = rsi<-0.79;
def ur = rsi>0 and rsi<0.38;
def dr = rsi<0 and rsi>-0.38;

rsi.assignValueColor( if dn or up or ur or dr then color.black else color.white);
assignbackgroundcolor(if up then color.green else if dn then color.red
else if ur then color.cyan else if dr then color.magenta
else if rsi>0 then color.dark_green else color.dark_red);

#######
# END #
#######``````

Last edited by a moderator:

Ruby:
``````##############################
# Retracement WL Column      #
# 3 candle swing retracement #
# Color codes:               #
# >  0.79: bright green      #
# < -0.79: bright red        #
# <  0.38: cyan              #
# > -0.38: magenta           #
# < 0: dark_red              #
# > 0: dark_green            #
##############################

def H = if high >= high[1] and high >= high[2] then high else if high[1] >= high and high[1] >= high[2] then high[1] else high[2];
def L = if low <= low[1] and low <= low[2] then low else if low[1] <= low and low[1] <= low[2] then low[1] else low[2];
def HP = if high >= high[1] and high >= high[2] then 0 else if high[1] >= high and high[1] >= high[2] then 1 else 2;
def LP = if low <= low[1] and low <= low[2] then 0 else if low[1] <= low and low[1] <= low[2] then 1 else 2;

plot rsi= if lp>hp then (close - L)/(H-L) else if hp>lp then (close - H)/(H-L)
else if close>open[2] then (close-L)/(H-L) else (close-H)/(H-L);
def up = rsi>0.79;
def dn = rsi<-0.79;
def ur = rsi>0 and rsi<0.38;
def dr = rsi<0 and rsi>-0.38;

rsi.assignValueColor( if dn or up or ur or dr then color.black else color.white);
assignbackgroundcolor(if up then color.green else if dn then color.red
else if ur then color.cyan else if dr then color.magenta
else if rsi>0 then color.dark_green else color.dark_red);

#######
# END #
#######``````
Hello, pls could you explain how this study works?

Hello, pls could you explain how this study works?
Hi, this study tells you the strength of movement on a given timeframe. Set up 3-4 WL columns for your timeframes of interest, say 1m 5m 15m 60m. When they are all bright green or bright red, that's strong momentum.

87k+ Posts
367 Online

## The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
• Exclusive indicators
• Proven strategies & setups
• Private Discord community
• Exclusive members-only content
• 1 full year of unlimited support

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?