Randy Jackson Bullish/Bearish Scan

cashfolder78

New member
Hope everyone is doing well. I am currently learning "the strat" and searched around to see if anyone may have created a tos scan for "Randy Jackson Bullish/Bearish yet. Not sure if it may be named something different, but I haven't been able to find it here. Attached is a img of what I am looking to create a scan for.
 

Attachments

  • Screenshot 2025-03-20 140205.png
    Screenshot 2025-03-20 140205.png
    242.1 KB · Views: 196
Solution
Hope everyone is doing well. I am currently learning "the strat" and searched around to see if anyone may have created a tos scan for "Randy Jackson Bullish/Bearish yet. Not sure if it may be named something different, but I haven't been able to find it here. Attached is a img of what I am looking to create a scan for.
00b-1.JPG

maybe this can be a starting point
i started with this strat code (next time post the code to start with)
https://usethinkscript.com/threads/indicator-for-think-or-swim-based-on-rob-smiths-the-strat.3312/

this just looks for up patterns
i guessed at a loss level. the low of the buy candle.
if close crosses the loss line, it stops drawing
if close crosses the target line, the entry line and...
Your image isn't really enough to code against without doing a lot of additional research. If you have a link to something more than the one screen shot, I'd be more able to produce some code for your request. As it stands, there really isn't enough in your request and I don't want to watch a bunch of videos on youtube trying to figure out which variant of the strategy you're looking for.

Thanks,
mashume
 
Last edited by a moderator:
Hope everyone is doing well. I am currently learning "the strat" and searched around to see if anyone may have created a tos scan for "Randy Jackson Bullish/Bearish yet. Not sure if it may be named something different, but I haven't been able to find it here. Attached is a img of what I am looking to create a scan for.
There is also a huge Strat thread here.

https://usethinkscript.com/threads/indicator-for-think-or-swim-based-on-rob-smiths-the-strat.3312/
 
My attempt
Code:
def candle1 = close > open; // Bullish candle
def candle2 = close < open; // Bearish candle

def bullishSetup = candle1[3] and candle1[2] and candle2[1] and candle1;
def bearishSetup = candle2[3] and candle2[2] and candle1[1] and candle2;

AddLabel(bullishSetup, "Bullish RJ Setup", Color.GREEN);
AddLabel(bearishSetup, "Bearish RJ Setup", Color.RED);
 
Last edited by a moderator:
Hope everyone is doing well. I am currently learning "the strat" and searched around to see if anyone may have created a tos scan for "Randy Jackson Bullish/Bearish yet. Not sure if it may be named something different, but I haven't been able to find it here. Attached is a img of what I am looking to create a scan for.
00b-1.JPG

maybe this can be a starting point
i started with this strat code (next time post the code to start with)
https://usethinkscript.com/threads/indicator-for-think-or-swim-based-on-rob-smiths-the-strat.3312/

this just looks for up patterns
i guessed at a loss level. the low of the buy candle.
if close crosses the loss line, it stops drawing
if close crosses the target line, the entry line and target line stop drawing

draw a up arrow on first candle of 4 bar up pattern
draw a green cloud over the 4 bars of up pattern


Code:
#strat_jackson2

#https://usethinkscript.com/threads/randy-jackson-bullish-bearish-scan.20756/
#Randy Jackson Bullish/Bearish Scan
#cashfolder78  Apr 2, 2025
#1
# I am currently learning "the strat" and searched around to see if anyone may have created a tos scan for "Randy Jackson Bullish/Bearish yet.
# Attached is a img of what I am looking to create a scan for.


# my interpretation of the rules, from pic

# bull
#.. bar1 , green 2
#.. bar2 , green 2.  high > bar1 high. low > bar1 low. high is target
#.. bar3 , red 2. high < bar2 high. low < bar2 low.  high is entry.  close ?
#.. bar4 , green 2.  bar4 high > bar3 high. low > bar3 low.
# make up a loss exit rule
#   bar4 close < bar3 low
#  no ,  if bar4 high < bar3 high * x% , then sell (approx midpoint of bar3)



# redo to mirror  bull
# bear
#.. bar1 , red 2
#.. bar2 , red 2.  low < bar1 low. high < bar1 high.  low is target
#.. bar3 , green 2. high > bar high. low > bar2 low.  low is entry
#.. bar4 , red 2.  low < bar3 low.  high < bar3 high
# make up a loss exit rule
#  bar4 close > bar3 high
#  no , if bar4 low > bar3 low * x% , then sell (approx midpoint of bar3)


def na = double.nan;
def bn = barnumber();
#------------------------------
# https://usethinkscript.com/threads/indicator-for-think-or-swim-based-on-rob-smiths-the-strat.3312/
# Indicator for Think or Swim based on Rob Smith's The STRAT
# Pelonsax  Aug 1, 2020
#------------------------------
# S T R A T    N U M B E R S
# A study by Ramon DV. aka Pelonsax
#------------------------------
def H = high;
def L = low;
def C = close;
def O = open;

def insidebar =  (H < H[1] and L > L[1]) or (H == H[1] and L > L[1]) or (H < H[1] and L == L[1]) or (H == H[1] and L == L[1]);
def outsidebar =  H  > H[1] and L <  L[1];
def twoup  = H > H[1] and L >= L[1];
def twodown  = H <= H[1] and L < L[1];

#-----------------------------
# STRAT NUMBERS
#-----------------------------
input Show_Strat_Numbers = yes;
input Show_Twos = yes;
plot barType = if Show_Strat_Numbers and insidebar then 1
 else if Show_Strat_Numbers and outsidebar then 3
 else Double.NaN;
barType.SetPaintingStrategy(PaintingStrategy.VALUES_BELOW);
barType.AssignValueColor(color.WHITE);

plot barTypeDN = if Show_Strat_Numbers and !insidebar and !outsidebar and Show_Twos and twodown then 2 else Double.NaN;
barTypeDN.SetPaintingStrategy(PaintingStrategy.VALUES_BELOW);
barTypeDN.AssignValueColor(color.DOWNTICK);

plot barTypeUP = if Show_Strat_Numbers and !insidebar and !outsidebar and Show_Twos and twoup then 2 else Double.NaN;
barTypeUP.SetPaintingStrategy(PaintingStrategy.VALUES_ABOVE);
barTypeUP.AssignValueColor(color.UPTICK);
#---------------------------

def bdn = if !insidebar and !outsidebar and twodown then 2 else 0;
def bup = if !insidebar and !outsidebar and twoup then 2 else 0;



# bull
#.. bar1 , green 2
#.. bar2 , green 2.  high > bar1 high. low > bar1 low. high is target
#.. bar3 , red 2. high < bar2 high. low < bar2 low.  high is entry.  close ?
#.. bar4 , green 2.  bar4 high > bar3 high. low > bar3 low.

# make up a loss exit rule
#   bar4 close < bar3 low


#def bull1 = (barTypeUP == 2 and barTypeUP[-1] == 2 and barTypeDN[-2] == 2 and barTypeUP[-3] == 2)
def bull1 = (bup == 2 and bup[-1] == 2 and bdn[-2] == 2 and bup[-3] == 2)
 and high[-1] > high and low[-1] > low
 and high[-2] < high[-1] and low[-2] < low[-1]
 and high[-3] > high[-2] and low[-3] > low[-2];

#addverticalline(bull1, "bull 1", color.green);

plot zup = if bull1 then low*0.9999 else na;
zup.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
zup.SetDefaultColor(Color.cyan);
zup.setlineweight(3);
zup.hidebubble();

#-----------------------
# cloud levels
def big = 99999;

def upcldtop;
if bn == 1 then {
  upcldtop = 0;
} else if bull1 then {
  upcldtop = fold a = 0 to 3
  with b
  do max(b,getvalue(high,-a));
} else if bull1[1] or bull1[2] or bull1[3] then {
  upcldtop = upcldtop[1];
} else {
  upcldtop = 0;
}


def upcldbot;
if bn == 1 then {
  upcldbot = 0;
} else if bull1 then {
  upcldbot = fold e = 0 to 3
  with f = big
  do min(f,getvalue(low,-e));
} else if bull1[1] or bull1[2] or bull1[3] then {
  upcldbot = upcldbot[1];
} else {
  upcldbot = 0;
}

def cut = if upcldtop > 0 then upcldtop else na;
def cub = if upcldbot > 0 then upcldbot else na;
addcloud(cut,cub,color.light_green);

#--------------------

def uptarget = if bn == 1 then 0
 else if !bull1[1] and !bull1[0] and close[1] > uptarget[1] then 0
 else if bull1[1] then high
 else uptarget[1];

plot zuptgt = if uptarget > 0 then uptarget else na;
zuptgt.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
zuptgt.SetDefaultColor(Color.green);
zuptgt.setlineweight(2);
zuptgt.hidebubble();


def uploss = if bn == 1 then 0
 else if uptarget == 0 then 0
 else if close[1] < uploss[1] then 0
 else if bull1[2] then low
 else uploss[1];

plot zuploss = if uploss > 0 then uploss else na;
zuploss.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
zuploss.SetDefaultColor(Color.red);
zuploss.setlineweight(2);
zuploss.hidebubble();


def upentry = if bn == 1 then 0
 else if uptarget == 0 then 0
 else if bull1[2] then high
 else upentry[1];

plot zupen = if upentry > 0 then upentry else na;
zupen.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
zupen.SetDefaultColor(Color.blue);
zupen.setlineweight(2);
zupen.hidebubble();


addchartbubble(0, low*0.997,
#bull1[2] + " B2\n" +
bull1[0] + " B\n" +
bup + "\n" +
bdn + "\n" +
upentry + " En"
, (if bull1 then color.yellow else color.gray), no);
#
 
Last edited by a moderator:
Solution

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

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
389 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