Archived: Opening Range Breakout

Status
Not open for further replies.
@BbenSD Here's the ORB breakout (bullish) scan that Mobius posted a few months ago. Run that on a 5 min aggregation scan. A breakdown (bearish) scan can be written in no time

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
# Scan

def Active = if SecondsFromTime(0930) > 0 and
                SecondsTillTime(1000) >= 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;
 
@BbenSD While the ORB is still active in my mind, I have written the ORB breakdown scan for you.
Just ran a scan on the S&P 500 on a 5 min aggregation and obtained 85 results

Code:
# ORB Breakdown Scan
# tomsk
# 11.27.2019
# Run the scan at 5 min aggregation

def Active = SecondsFromTime(0930) > 0 and SecondsTillTime(1000) >= 0;
def ActiveLow = if Active and !Active[1]
                then low
                else if Active and
                        low < ActiveLow[1]
                      then low
                      else ActiveLow[1];
plot Breakdown = !Active and close < ActiveLow;
 
Hey Tomsk, I appreciate the help and quick response. I've used those scripts you posted in the scanner. Now this may be my misunderstanding of the indicator but it seems that the results are only pertinent to the opening time period correct? I'm looking for a scan that lets me know when the price closes in the breakout zone, during any time of the day. I tried to change the timeframe in the script (to more than just the opening period) but maybe i'm missing something. Thanks for the help again.

@BbenSD An Opening Range Breakout (ORB) is the overnight distribution and occurs within the first 30 minutes of trading. The high and low of that range are the boundaries. Breaking those extremes is the ORB opening range breakout. ORB type trades was designed to start calculating those H/L values at the cash open. If you start messing with those times and change it to some other time bracket it’s just a high low timed range with no real value in which case it should NOT be considered as an ORB trade.
 
Hi @BbenSD what are you scanning in? Try the S&P500 first and work your way from there. If you've read the notes, you know that the author only trades /ES. Others trade the /YM. Have you thought of making friends with just one instrument to start? Just a thought.

The author of the ORB uses that study to trade /ES although one can conceivably use that for other instruments as @markos eluded to.
 
Hi @BbenSD what are you scanning in? Try the S&P500 first and work your way from there. If you've read the notes, you know that the author only trades /ES. Others trade the /YM. Have you thought of making friends with just one instrument to start? Just a thought.

@markos Hey there, I was scanning in all symbols although making refinements to volume and price. It's probably a good idea to familiarize myself with one symbol, I had been using SPY through consistently.
 
@BbenSD An Opening Range Breakout (ORB) is the overnight distribution and occurs within the first 30 minutes of trading. The high and low of that range are the boundaries. Breaking those extremes is the ORB opening range breakout. ORB type trades was designed to start calculating those H/L values at the cash open. If you start messing with those times and change it to some other time bracket it’s just a high low timed range with no real value in which case it should NOT be considered as an ORB trade.

@tomsk Hey Tomsk, through your explanation, I understand how ORB forms those boundaries so thanks for that. The time frame really isn't of primary concern, I'm just seeking closes (or essentially crossovers) in the breakout or breakdown zones. And while I appreciate the scripts you posted, I'm trying to understand what they are displaying in the scan, because it doesn't seem to be what I mentioned. Hopefully, I'm not too confused here.

Thanks again for the help.
 
@BenTen I think I already know the answer to this...BUT I need to ask for confirmation. The settings displayed of the opening range breakout are set to eastern time...Am I right to assume the settings need to be adjusted accordingly to whatever timezone you reside in so it reflects exactly like the settings in TOS? So IF anyone in Central Standard Time needs to change the settings an hour back essentially? etc...With that said...the original Mobius version also has the time different on the last setting for the "END" I think he used 10:30 and not 10...any significance why your version is 30 min shorter? Because that will change the dynamic of the range for the rest of the day.
 
When time brackets are referenced in the code, it refers to eastern time. Even if you are on the west coast, you won't need to adjust it to match pacific times.
 
When time brackets are referenced in the code, it refers to eastern time. Even if you are on the west coast, you won't need to adjust it to match pacific times.
I laugh at myself! All these years of watching the TSL, I never picked up on that. :unsure:
 
@BbenSD @Talochka @HighBredCloud Please, PLEASE, Please, Read all of the ORB threads here. The answers are there.
The questions that are being asked are from lack of looking for the answer OR trial and error to figure stuff out.
If you are truly stuck, please ask, but do some research first.

After the threads have been read, please look and read here. It is the OneNote by JQ that has been posted in Tutorials for us. There are over 50 iterations of the ORB there.
https://onedrive.live.com/redir?res...iginal|02bfdb40-c63f-409d-bc5b-452f63eb0249/)
 
@HighBredCloud As far as the ORB settings go, I don't make any changes to it. I don't mess with the time input either. The concept behind Opening Range Breakout is simple. The most popular version uses the first 30 mins to identify levels of breakouts. You have the highest level and lowest level that the stock has reached within its first 30 minutes of open. From there, you can decide to trade the direction that it is breaking out of. I have seen some traders who use the 15 minute and even the first 5-minute range. You need to play around with that and decide for yourself if you want to stick with the default 30 min ORB or not. If you don't want to use this version, and admittedly, it can be overwhelming, then use the simplified version that I posted in the scanner thread.
 
@HighBredCloud Please call the number below. Something else may be happening. They can hook up with your PC to see what you see and help you. I have used them multiple times. They can get you fixed up!

ThinkorSwim customer support phone number: 800-672-2098. This is the Advanced Support Team for TOS. I guess they are top secret because people call the other numbers and then complain about the lack of help.

These folks will hook up with your computer and work with you to diagnose issues. As far as using them for thinkscript questions, some are well versed others not as much. At least they are in Nebraska, St Louis, and Salt lake City and have that helpful spirit.
 
Gosh, lots of interest on the ORB. For those not familiar with what the ORB is (other than the links that @markos had already posted earlier) I thought it might be insightful to provide some added info from Mobius who as we all know is an exceptional coder, teacher, professor, mentor, mathematician, trader bar none. Mobius trades /ES using the ORB although some traders have attempted to trade equities using this.

Here are some direct quotes from Mobius. Have fun digesting that - lot's of good info

Opening Range is the overnight distribution and occurs within the first 30 minutes of trading. The high and low of that range are the boundaries. Breaking those extremes is the ORB opening range breakout.

In my experience, other than an after the fact reversal, an ORB false breakout is attributable to news. A news event coming out at the end of the opening range can push price outside the range on a false signal. I usually do one of two things – when I know a news event can do that, either don't trade or scalp. Other than that, price on the intraday level is somewhat random so if you are going to trade intraday you have to be willing to take a loss and get out.

Make your risk level one you can live with. 2 points /ES or to the opposite extreme of the previous candle is my typical level for risk. and 1 ATR in my favor and I take risk out of the trade. If you trade 3 contracts and you take risk out at 1 ATR (take one contract off) let 2 run to 2 ATR and let 1 run. Each time stop at prior level, over time your going to make money. It's all trading like a monkey. If you can't trade at a minimum 3 contracts futures you are wasting your time on these sorts of systems
 
Whatever you do, always focus on the risk rather than the reward. Pay attention to the market internals because at the end of the day that will in turn drive order flow. All the best as you find the system that works for you
 
This caught my eye in the first post - "...As of 01.03.2017 You have just under a 52% probability that a DAILY bar will close green. So a 60% to 70% probability is a nice edge. ..."

Does anyone have the data to substantiate this claim?
Codydog, that is straight from Mobius.
 
Codydog, that is straight from Mobius.


@markos That's exactly right, here's the entire quote from Mobius for greater context, It also includes some usage notes on the ORB

How to use This ORB study: The yellow dashed line is the first period line and represents the mean of the remaining Opening Range trading. The dominant time spent above or below this line typically determines the day’s trend. Green points indicate a close at EOD above the yellow line. Red Points a close below the yellow line. Yellow points a neutral or balanced day, close near the yellow line. The Opening Range is plotted with a green and red dashed line. Trades are taken when there is an open outside these range lines. up to 5 Targets are generated with Average True Range as the underlying algorithm. When price crosses the first target line 1/2 the trade should be taken as Risk Off profit and a stop should be placed at the entry point. If price crosses further targets stops should be moved to the preceding target until stopped or your profit target is met. Initial Risk Stops are an open below the bar's low prior to entry or the Risk Lines plotted.

FYI on the color of Probable close direction points

Statistically these have proved between 60% and 70% correct. Taking trades against the direction of ORB should be considered counter trend trades. As of 01.03.2017 you have just under a 52% probability that a DAILY bar will close green. So a 60% to 70% probability is a nice edge.
 
Status
Not open for further replies.

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