Opening Range Breakout (ORB) Scanner for ThinkorSwim

@markos You can now use def in place of rec, although rec is still recognized by the TOS editor. Usually you will find rec being used in legacy studies. It is an easy conversion
 
Thank you very much for this scanner. one question, this scanner has alert, wondering what type of alert. is there a way i could setup alert to phone via push or text? Thank you very much in advance.
 
@tdao24 I believe when you use the "Alert when scan results change..." option it will send push notifications to your phone as well.
 
@tdao24 I believe when you use the "Alert when scan results change..." option it will send push notifications to your phone as well.
Thank you very much BenTen.
was playing with it and kindda missing something.
i use the following for scanner, and it came back only the above OR, nothing below OR. would you please advise what i am missing? Thank you very much in advance.
Code:
# 30 min opening range
# Robert Payne
# WalkingBallista Watchlist

def OpenRangeMinutes = 30;
def MarketOpenTime = 0930;
input ShowTodayOnly = yes;

def Today = if GetDay() == GetLastDay() then 1 else 0;
def FirstMinute = if SecondsFromTime(MarketOpenTime) < 60 then 1 else 0;
def OpenRangeTime = if SecondsFromTime(MarketOpenTime) < 60 * OpenRangeMinutes then 1 else 0;

def ORHigh =  if FirstMinute then high else if OpenRangeTime and high > ORHigh[1] then high else ORHigh[1];
def ORLow = if FirstMinute then low else if OpenRangeTime and low < ORLow[1] then low else ORLow[1];

def OpenRangeHigh = if ShowTodayOnly and !Today then Double.NaN else if !OpenRangeTime then ORHigh else Double.NaN;
def OpenRangeLow = if ShowTodayOnly and !Today then Double.NaN else if !OpenRangeTime then ORLow else Double.NaN;

def dailyRange = high(period = "day" )[1] - low(period = "day" )[1];
def range = Average(dailyRange, 10);

plot status = if close > OpenRangeHigh then 1 else if close < OpenRangeLow then 0 else -1;
status.AssignValueColor(if status == 1 then Color.Dark_Green else if status == 0 then Color.Dark_Red else Color.Dark_Orange);
AssignBackgroundCOlor(if status == 1 then Color.Dark_Green else if status == 0 then Color.Dark_Red else Color.Dark_Orange);
 
@tdao24 Did you try the one from this thread?
you meant the thread on page 1 of this thread? if so i will give a shot. BTW, it's pretty long compare the the previous one, or the one i posted. Plus what does it mean when condition is any within 2 bars ORL2 and ORH2?
Thank you very much again.
 
link : ORB V03_B

Can anyone assist in the creation of a scan that feeds of this indicator? Only want those stocks actually breaking out of the range ( i use 20 minutes) . Other parameters are RVOL @1.5 / Range >.30 ... the rest i can find in existing studies. Happy to post the final scan link once done ....
 
Last edited by a moderator:
@OldBallz Here is your breakout scan using 20 minutes per your request

Code:
# Opening Range Breakout - UP
# Highest and Best use for this scan is as a Dynamic WatchList
# Scan Resets Every Day
# Set Aggregation Period to 5 minutes or less 
# Mobius
# 4.8.2019
# Scan

def Active = if SecondsFromTime(0930) > 0 and
                SecondsTillTime(0950) >= 0
             then 1
             else 0;
def ActiveHigh = if Active and !Active[1]
                 then high
                 else if Active and
                         high > ActiveHigh[1]
                       then high
                       else ActiveHigh[1];
plot Breakout = if !Active and close > ActiveHigh
                then 1
                else 0;
 
@tomsk thank you - Actually i know how to change time parameters - what i really need to make this a useful scan is only showing stocks where the current Relative Volume is X (i will use 1.5) and the current range is Y (let say $.30) but i dont know how to get to those data sets.

Can anyone help with that?

Thank you !
 
@tomsk What would you need to change in post #91 for a bear scan? Like what I put below? Thank you!

Code:
# Opening Range Breakdown - DOWN
# Highest and Best use for this scan is as a Dynamic WatchList
# Scan Resets Every Day
# Set Aggregation Period to 5 minutes or less
# Mobius
# 4.8.2019
# Scan

def Active = if SecondsFromTime(0930) < 0 and
                SecondsTillTime(0950) <= 0
             then 1
             else 0;
def ActiveLow = if Active and !Active[1]
                 then low
                 else if Active and
                         low < ActiveLow[1]
                       then low
                       else ActiveLow[1];
plot Breakdown = if !Active and close < ActiveLow
                then 1
                else 0;
 
Last edited:
@dougn hi,

I see following error. Could you please advise?

No such function: BetterORB at 1:1
No such function: BetterORB at 1:1
No such function: BetterORB at 1:1
Invalid statement: Unexpected part of function call at 1:29
No such function: BetterORB at 1:1
No such function: BetterORB at 1:1
No such function: BetterORB at 1:1
Invalid statement: Unexpected part of function call at 1:29
 
@netarchitech

Hey All,

First post on the forums - wanted to start by saying thank you for all the outstanding work. Learning a ton reading everything on this forum. I have been playing around with the ORB indicator to fairly solid success, mostly applied on my own watchlist items. This scanner looks really promising, and I believe I have it working - my breakout and breakdown scans are indeed turning back succinct lists of stocks that have done exactly that. Currently, the stocks I get back have broke out/down quite considerably (approach target prices, if not exceeding). How would I limit my search to stocks that are just breaking out, say within 1% or so? I saw that someone had mentioned this as a request previously, and it is my understanding that the "limiter" should control this. When I change the limiter number from 0.05 to 0.01, however, I still get back most of the same stocks as when its 0.05. Any help is much appreciated!

EDIT: I should also mention - I have the ORB indicator defined by the first 15 minutes of market. I have adjusted the timeframe within the scanner to match this, reducing 30 to 15. That said, I still seem to get the same stocks, just their breakout is far far greater relative to the 15minute time frame I defined.

EDIT 2: I am also running this scanner at 12pm EST. I should note, the scanner when ran today excluded INTC, which should have fulfilled the criteria.

@maddy Rename "BetterORB" to match whatever you named your ORB indicator.
 
Last edited by a moderator:
@BenTen Hey I need some help. Im trying to duplicate for ORB indicator for the 5 minute breakout candle? I want horiziontal line to highlight the high and low of first 5 minute candle on the 5 minute chart. Please. Thanks....
 

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
472 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