Opening Range Breakout (ORB) Scanner for ThinkorSwim

Could someone help me on how to make a scan from a watchlist that the 1st candle is red and the alert is triggered when the latest closing bar is higher from the opening day price (its somewhat kind of a ORB but it base on the 1st candle)

aapl.png


Thank you
 
@BenTen

is that the latest ORB indicator??
could you please indicate on which line should i change??
sorry im not good in script,
i just usually use the scan conditions on TOS

Also im trying to scan it without using the indicator

thank you
 
@airsakuragi Use the code posted on the first page of this thread. You do not need to change any line. You just have to go to the indicator's settings and adjust the breakout time. For example, if you want the first 5 min candle to be your base candle, then you would adjust the ORend time to 0935.
 
@johnpoole92 Please help me understand by being specific about which part of the scanner that you need help. You can also post a screenshot of your scanner.
 
Hi Ben 10, Thank you for the scanner. I have a question related to changing the script to get scanned for a stock when they cross the breakout region. Below is an example -

Today I have scanned for a stock and got AMC at 10:43 at price range of $4.78 which have reached the 2nd high target(15%) for the day. Currently I'm having limiter with 5%(.05), is there any where we can change the scanner to get notified when they are crossing the breakout region.

Please refer to the screenshot, I have highlighted both the places.

 
Last edited:
Hi @Rosalyn,

Below please find the link you requested...I made two changes to the scan:
  1. I changed the timeframe from Daily to 30 minutes
  2. I added "RangeLimiter" to go with the original "Limiter" to be able to better scope result sets
As a result of the changes made, the scan does return tickers...Give it a try and let me know how it goes...

Hope this helps...

Good Luck and Good Trading :)

Link: http://tos.mx/Nqe2Z6l
Hi there,
Have done a scan on the ORB BD but one stock the close is within the OR... but all other stock are ok:unsure:

ESyzr5R.png


I did a check on the code and everything seem ok ...
I was scan on "all optionable"
Was wondering maybe you can do a check...
Thanks :cool:
 
HI BenTen, this is amazing. But for some reason, I get notification very late, not sure why? The problem is in the scanner, I am on mountain time but have setting. Sorry I am not sure how to attach a picture
 
Last edited:
@BenTen About 30-40 minutes late. Today LYFT broke ORB around 10:00 am EST (8 am MST)- but my notification/addition to scanner came around 10:41 am EST (8:41 am MST)
 
@suchetam You would need to open a support ticket within ThinkorSwim so they can look into it. This sort of problem isn't something we have control over.
 
Hi all,
I've done some modification to try to scan for stock that ORB is above yesterday Value area

Code:
# Filename: 30_min_Opening_Range_SCAN

# source: 30 min opening range
# original author: Robert Payne

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;

#TPO Value area high
Def TPOVAHigh = TPOProfile("time per profile" = "DAY", "on expansion" = no)."VAHigh"; 

# TPO Value area high of yesterday
Def TPOVAHighValue = GetValue(TPOVALow, GetMaxValueOffset(TPOVAHigh, 1), 1); 

plot ORBOPOC = OpenRangeLow > TPOVAHighValue;

However, when I do a scan on a 30 minutes time frame, there's no matches... but of course checking thru the stocks I could see there's some did fulfill the condition. Any idea on what might have gone wrong? :unsure: o_O

Thanks :cool:
 

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