Opening Range Breakout Indicator for ThinkorSwim

N

NathanJames

New member
Ben,

Thank you for scripting this ORB, it is very helpful. But i want to ask you a question, is there any possibility that the ORB will appear right away the moment market open? Thanks

Nathan
 
Last edited:
BenTen

BenTen

Administrative
Staff
VIP
Warehouse
@NathanJames No because the default settings is set to 30 mins after market open. You can adjust it to whatever time you want to.
 
markos

markos

Well-known member
VIP
Warehouse
@NathanJames just know that if you change the time frame, it will no longer be an ORB. Please be sure you understand how to use it as intended for best results. Use the search above to start with. ...Best

(and try here)
 
N

NathanJames

New member
@NathanJames just know that if you change the time frame, it will no longer be an ORB. Please be sure you understand how to use it as intended for best results. Use the search above to start with. ...Best

(and try here)

thanks Markos
 
JBTrades

JBTrades

New member
Can someone explain how the mean s/e differs from the begin/end period?
 
Last edited:
JBTrades

JBTrades

New member
@BenTen Yep it was the expansion - thanks! Again, great work here. Really gives me a better visual map to my favorite trading strategy.



Can you let me know the proper settings in the first four time fields to use for oil futures - /CL - and gold futures - /GC - as they have different opening times? Thanks!
What settings are you using for crude oil?
 
K

kvnknpp1

New member
In this indicator, what does 2nd T, 3rd T, 4th T, etc refer to? What is T? thx
 
D

desirobinhood

New member
Current day first 30 mins High and low

Rich (BB code):
def na=double.nan;
input ORBegin = 0930;
input OREnd = 1000;
input ShowTodayOnly={"No", default "Yes"};
def s=ShowTodayOnly;
Def ORActive = if secondstilltime(OREnd)>0 AND secondsfromtime(ORBegin)>=0 then 1 else 0;
def today=if s==0 OR getday()==getlastday() AND secondsfromtime(ORBegin)>=0 then 1 else 0;
Rec ORHigh = if ORHigh[1]==0 or ORActive[1]==0 AND ORActive==1 then high else if ORActive AND high>ORHigh[1] then high else ORHigh[1];
Rec ORLow = if ORLow [1] ==0 or ORActive [1] ==0 AND ORActive ==1 then low else if ORActive AND low < orlow [1] then low else ORLow [1];
Def ORWidth = ORHigh - ORLow;
Plot ORH=if ORActive OR today<1 then na else ORHigh;
Plot ORL=if ORActive OR today<1 then na else ORLow;
ORH.setdefaultcolor(color.yellow);
ORH.setStyle(Curve.FIRM);
ORH.setlineweight(1);
ORL.setdefaultcolor(color.yellow);
ORL.setStyle(Curve.FIRM);
ORL.setlineweight(1);
 
JBTrades

JBTrades

New member
Current day first 30 mins High and low

Rich (BB code):
def na=double.nan;
input ORBegin = 0930;
input OREnd = 1000;
input ShowTodayOnly={"No", default "Yes"};
def s=ShowTodayOnly;
Def ORActive = if secondstilltime(OREnd)>0 AND secondsfromtime(ORBegin)>=0 then 1 else 0;
def today=if s==0 OR getday()==getlastday() AND secondsfromtime(ORBegin)>=0 then 1 else 0;
Rec ORHigh = if ORHigh[1]==0 or ORActive[1]==0 AND ORActive==1 then high else if ORActive AND high>ORHigh[1] then high else ORHigh[1];
Rec ORLow = if ORLow [1] ==0 or ORActive [1] ==0 AND ORActive ==1 then low else if ORActive AND low < orlow [1] then low else ORLow [1];
Def ORWidth = ORHigh - ORLow;
Plot ORH=if ORActive OR today<1 then na else ORHigh;
Plot ORL=if ORActive OR today<1 then na else ORLow;
ORH.setdefaultcolor(color.yellow);
ORH.setStyle(Curve.FIRM);
ORH.setlineweight(1);
ORL.setdefaultcolor(color.yellow);
ORL.setStyle(Curve.FIRM);
ORL.setlineweight(1);
How would you modify this for the futures market? or /CL?
 
P

Playstation

Member
Warehouse
Hey @BenTen



I bought at the border of Bull and Bear Zone, Heikin candles. Supertrend signal was delayed, doesn't appear until 3-4 bars later.
Should I treat the upper line of Bull Zone as resistance too? I exited this trade once it ranges at that upper line.
 
Last edited by a moderator:
BenTen

BenTen

Administrative
Staff
VIP
Warehouse
@Playstation Last I checked, the Supertrend indicator is not delayed.

Yes, you should also treat the upper and lower ORB as support and resistance, as well.
 
P

Playstation

Member
Warehouse
oh hey thanks. I also saw you edited my photo link. What did I do wrong? Yours is much clearer and better than mine!

@Playstation Last I checked, the Supertrend indicator is not delayed.

Yes, you should also treat the upper and lower ORB as support and resistance, as well.
 
markos

markos

Well-known member
VIP
Warehouse
Current day first 30 mins High and low

Rich (BB code):
def na=double.nan;
input ORBegin = 0930;
input OREnd = 1000;
input ShowTodayOnly={"No", default "Yes"};
def s=ShowTodayOnly;
Def ORActive = if secondstilltime(OREnd)>0 AND secondsfromtime(ORBegin)>=0 then 1 else 0;
def today=if s==0 OR getday()==getlastday() AND secondsfromtime(ORBegin)>=0 then 1 else 0;
Rec ORHigh = if ORHigh[1]==0 or ORActive[1]==0 AND ORActive==1 then high else if ORActive AND high>ORHigh[1] then high else ORHigh[1];
Rec ORLow = if ORLow [1] ==0 or ORActive [1] ==0 AND ORActive ==1 then low else if ORActive AND low < orlow [1] then low else ORLow [1];
Def ORWidth = ORHigh - ORLow;
Plot ORH=if ORActive OR today<1 then na else ORHigh;
Plot ORL=if ORActive OR today<1 then na else ORLow;
ORH.setdefaultcolor(color.yellow);
ORH.setStyle(Curve.FIRM);
ORH.setlineweight(1);
ORL.setdefaultcolor(color.yellow);
ORL.setStyle(Curve.FIRM);
ORL.setlineweight(1);
@desirobinhood Using this code totally defeats the whole purpose of ORB trading. Please type Opening in the search box and read this post from the beginning. There is a wealth of info here that must be understood to trade using the ORB. Thanks.
 
Last edited:
BenTen

BenTen

Administrative
Staff
VIP
Warehouse
@Playstation When you upload your image to imgur, on the top right hand corner of the image there is a 3-dots button. Click on that > Get share links > Copy the BBCode (Forums) > paste the code directly into the thread and it should be just like that.
 
markos

markos

Well-known member
VIP
Warehouse
Can someone explain how the mean s/e differs from the begin/end period? Is it the first candle for your timeframe vs opening range?
@JBTrades you may be putting the cart before the horse. Please read this thread from the beginning to be sure you have a good understanding. Also, read the threads at the bottom of this page. There is a wealth of info here that must be understood to trade using the ORB. Thanks.
 
G

GetRichOrDieTrying

Member
@BenTen This looks really interesting. Can you explain what the following means. I've noticed these pop up bubbles and/or lines on charts:

  • RO
  • Risk ON ORL
  • Risk ON ORH
  • 2nd T, 3rd T, 4th T, 5th T
 
C

codydog

Member
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?
 
BenTen

BenTen

Administrative
Staff
VIP
Warehouse
@Billions What green bar?

@GetRichOrDieTrying I believe those are sort of like price targets. I don't use them so I don't know for sure.
 
markos

markos

Well-known member
VIP
Warehouse
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 comes directly from Mobius in the notes in his ORBv3. I won't ask him for data, it never works out so well for me. Feel free to ask him, It is a valid question.
 

Top