Opening Range Breakout Indicator for ThinkorSwim

T

Talochka

Member
@Talochka Already mentioned it in message #192. Scroll up a bit and you should see it.
Thanks BenTen!
I have a little problem, I used the above settings today on ES and CL. ES chart ended at 16:10 PM (or 4:10) and CL ended (or stopped at 14:25 pm) or 2:25 pm) . I am in USA and used same
setting on both. 5 min charts
Please help.
Thanks
 
BenTen

BenTen

Administrative
Staff
VIP
Warehouse
@Talochka So what's the problem? Is this related to the day light saving timezone that @Playstation was asking about earlier?
 
T

Talochka

Member
BenTen, I need help with this:



For some reason this chrt for CL stops at 14:30pm (open market at 9:30am). At the same time ES stops at 16:00.
Thanks
 
BenTen

BenTen

Administrative
Staff
VIP
Warehouse
@Talochka I don't have a lot of knowledge on futures trading time, so I can't help. It seems like you're not the only one experiencing such issue. Maybe someone else on here who trade futures can help.
 
T

tomsk

Well-known member
VIP
Warehouse
@Talochka @BenTen Whilst trading CL on the CME Group (Chicago Mercantile Exchange) Globex is actually open for nearly 24 hours a day during the week (6:00pm – 5:15pm EST) the primary pit session is just 5½ hours long (9:00am to 2:30pm EST) which are some pretty short trading hours.

Here are some references you may like to read up on

 
B

BbenSD

New member
Warehouse
Hello all, new user here and I've been checking out the site.

I began using the ORB indicator and from my understanding(and from the post), it's advisable to go long when the price closes above that breakout zone, my question is, how do I scan for stocks that are currently breaking that plane? I tried the script in the post for the scan but I get some very strange stocks in return.

I have read the author's notes and a few things remain unclear, where are the probable close direction points... And if I'm using a 5m chart, can I move to 1hr without altering the code?


Thanks for the help and I appreciate the time.

Ben
 
T

tomsk

Well-known member
VIP
Warehouse
@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;
 
T

tomsk

Well-known member
VIP
Warehouse
@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;
 
B

BbenSD

New member
Warehouse
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.
 
markos

markos

Well-known member
VIP
Warehouse
Hello all, new user here and I've been checking out the site.

I began using the ORB indicator and from my understanding(and from the post), it's advisable to go long when the price closes above that breakout zone, my question is, how do I scan for stocks that are currently breaking that plane? I tried the script in the post for the scan but I get some very strange stocks in return.

I have read the author's notes and a few things remain unclear, where are the probable close direction points... And if I'm using a 5m chart, can I move to 1hr without altering the code?


Thanks for the help and I appreciate the time.

Ben
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.
 
T

tomsk

Well-known member
VIP
Warehouse
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.
 
T

tomsk

Well-known member
VIP
Warehouse
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.
 
B

BbenSD

New member
Warehouse
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.
 
B

BbenSD

New member
Warehouse
@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.
 

Top