# ORB Watch List Column
input StartTime = 0930;
input EndTime = 1000;
def h = high;
def l = low;
def c = close;
def ORActive = if SecondsFromTime(StartTime) > 0 and
SecondsTillTime(EndTime) >= 0
then 1
else 0;
def ORH = if ORActive and !ORActive[1]
then h
else if ORActive and
h > ORH[1]
then h
else ORH[1];
def ORL = if ORActive and !ORActive[1]
then l
else if ORActive and
l < ORL[1]
then l
else ORL[1];
def ORhigh = if !ORActive
then ORH
else Double.NaN;
def ORlow = if !ORActive
then ORL
else Double.NaN;
plot OR_high = ORH;
# ORB Watch List Column
input StartTime = 0930;
input EndTime = 1000;
def h = high;
def l = low;
def c = close;
def ORActive = if SecondsFromTime(StartTime) > 0 and
SecondsTillTime(EndTime) >= 0
then 1
else 0;
def ORH = if ORActive and !ORActive[1]
then h
else if ORActive and
h > ORH[1]
then h
else ORH[1];
def ORL = if ORActive and !ORActive[1]
then l
else if ORActive and
l < ORL[1]
then l
else ORL[1];
def ORhigh = if !ORActive
then ORH
else Double.NaN;
def ORlow = if !ORActive
then ORL
else Double.NaN;
plot OR_low = ORL;
Nice ! Thank you so much@vince92615 Here you go:
Plot value of opening range high:
Code:# ORB Watch List Column input StartTime = 0930; input EndTime = 1000; def h = high; def l = low; def c = close; def ORActive = if SecondsFromTime(StartTime) > 0 and SecondsTillTime(EndTime) >= 0 then 1 else 0; def ORH = if ORActive and !ORActive[1] then h else if ORActive and h > ORH[1] then h else ORH[1]; def ORL = if ORActive and !ORActive[1] then l else if ORActive and l < ORL[1] then l else ORL[1]; def ORhigh = if !ORActive then ORH else Double.NaN; def ORlow = if !ORActive then ORL else Double.NaN; plot OR_high = ORH;
Plot value of opening range low:
Code:# ORB Watch List Column input StartTime = 0930; input EndTime = 1000; def h = high; def l = low; def c = close; def ORActive = if SecondsFromTime(StartTime) > 0 and SecondsTillTime(EndTime) >= 0 then 1 else 0; def ORH = if ORActive and !ORActive[1] then h else if ORActive and h > ORH[1] then h else ORH[1]; def ORL = if ORActive and !ORActive[1] then l else if ORActive and l < ORL[1] then l else ORL[1]; def ORhigh = if !ORActive then ORH else Double.NaN; def ORlow = if !ORActive then ORL else Double.NaN; plot OR_low = ORL;
# ORB Watch List Column - % move to B/O
input StartTime = 0930;
input EndTime = 0945;
def h = high;
def l = low;
def c = close;
def ORActive = if SecondsFromTime(StartTime) > 0 and
SecondsTillTime(EndTime) >= 0
then 1
else 0;
def ORH = if ORActive and !ORActive[1]
then h
else if ORActive and
h > ORH[1]
then h
else ORH[1];
def ORL = if ORActive and !ORActive[1]
then l
else if ORActive and
l < ORL[1]
then l
else ORL[1];
def ORhigh = if !ORActive
then ORH
else Double.NaN;
def ORlow = if !ORActive
then ORL
else Double.NaN;
def ORMid = if !ORActive
then (ORHigh + ORLow) / 2
else Double.NaN;
def ORRange = if !ORActive
then ORHigh - ORLow
else Double.NaN;
AddLabel(1,
if (close < ORMid) and (close > ORLow) then "-" + astext(round((close - ORLow) / close * 100,2))+"%"
else if (close >= ORMid) and (close < ORHigh) then "+" + astext(round((ORHigh - close) / close * 100,2)) + "%"
else "-",
if close > ORHigh or close < ORLow then color.white
else if (close >= ORMid) and (close < ORHigh) then color.green
else if (close < ORMid) and (close > ORLow) < ORlow then color.red
else color.white
);
# ORB Watch List Column - near B/O
input StartTime = 0930;
input EndTime = 0945;
def h = high;
def l = low;
def c = close;
def ORActive = if SecondsFromTime(StartTime) > 0 and
SecondsTillTime(EndTime) >= 0
then 1
else 0;
def ORH = if ORActive and !ORActive[1]
then h
else if ORActive and
h > ORH[1]
then h
else ORH[1];
def ORL = if ORActive and !ORActive[1]
then l
else if ORActive and
l < ORL[1]
then l
else ORL[1];
def ORhigh = if !ORActive
then ORH
else Double.NaN;
def ORlow = if !ORActive
then ORL
else Double.NaN;
def ORMid = if !ORActive
then (ORHigh + ORLow) / 2
else Double.NaN;
def ORRange = if !ORActive
then ORHigh - ORLow
else Double.NaN;
AddLabel(1,
if close >= ORMid and close <ORHigh and 1 - round((ORHigh - close) / (ORHigh - ORMid),1) >= 0.6 then astext(1 - round((ORHigh - close) / (ORHigh - ORMid),1))
else if close < ORMid and close >ORLow and round((ORMid - close) / (ORMid - ORLow),1) >= 0.5 then astext(round((ORMid - close) / (ORMid - ORLow),1))
else "-"
);
This is only for long. I like to play for long from mid opening range or from second try, I have noticed if it hits the first T-1 and then does not reach it again, it's a good chance it will go to T2 or T3 to the upside. Then you also have the down side.I played with some code to get some better OR info into watchlists, thought maybe it'd help someone else. I always seem to be missing OR breaks and am hoping this helps to anticipate them and pull up a chart/ prepare trade.
...
This is only for long. I like to play for long from mid opening range or from second try, I have noticed if it hits the first T-1 and then does not reach it again, it's a good chance it will go to T2 or T3 to the upside. Then you also have the down side.
I tried to add these script to my watchlist column but they are both blank. Any help would be appreciated.I played with some code to get some better OR info into watchlists, thought maybe it'd help someone else. I always seem to be missing OR breaks and am hoping this helps to anticipate them and pull up a chart/ prepare trade.
The first is the % change required to break the OR - either up or down depending on which side of the middle the stock is currently sitting.
The second is how close it is to breaking it on a comparable basis. ie: 0.9 => 90% of the way to breaking the range. These only show up when >50%.
Code:# ORB Watch List Column - % move to B/O input StartTime = 0930; input EndTime = 0945; def h = high; def l = low; def c = close; def ORActive = if SecondsFromTime(StartTime) > 0 and SecondsTillTime(EndTime) >= 0 then 1 else 0; def ORH = if ORActive and !ORActive[1] then h else if ORActive and h > ORH[1] then h else ORH[1]; def ORL = if ORActive and !ORActive[1] then l else if ORActive and l < ORL[1] then l else ORL[1]; def ORhigh = if !ORActive then ORH else Double.NaN; def ORlow = if !ORActive then ORL else Double.NaN; def ORMid = if !ORActive then (ORHigh + ORLow) / 2 else Double.NaN; def ORRange = if !ORActive then ORHigh - ORLow else Double.NaN; AddLabel(1, if (close < ORMid) and (close > ORLow) then "-" + astext(round((close - ORLow) / close * 100,2))+"%" else if (close >= ORMid) and (close < ORHigh) then "+" + astext(round((ORHigh - close) / close * 100,2)) + "%" else "-", if close > ORHigh or close < ORLow then color.white else if (close >= ORMid) and (close < ORHigh) then color.green else if (close < ORMid) and (close > ORLow) < ORlow then color.red else color.white );
Code:# ORB Watch List Column - near B/O input StartTime = 0930; input EndTime = 0945; def h = high; def l = low; def c = close; def ORActive = if SecondsFromTime(StartTime) > 0 and SecondsTillTime(EndTime) >= 0 then 1 else 0; def ORH = if ORActive and !ORActive[1] then h else if ORActive and h > ORH[1] then h else ORH[1]; def ORL = if ORActive and !ORActive[1] then l else if ORActive and l < ORL[1] then l else ORL[1]; def ORhigh = if !ORActive then ORH else Double.NaN; def ORlow = if !ORActive then ORL else Double.NaN; def ORMid = if !ORActive then (ORHigh + ORLow) / 2 else Double.NaN; def ORRange = if !ORActive then ORHigh - ORLow else Double.NaN; AddLabel(1, if close >= ORMid and close <ORHigh and 1 - round((ORHigh - close) / (ORHigh - ORMid),1) >= 0.6 then astext(1 - round((ORHigh - close) / (ORHigh - ORMid),1)) else if close < ORMid and close >ORLow and round((ORMid - close) / (ORMid - ORLow),1) >= 0.5 then astext(round((ORMid - close) / (ORMid - ORLow),1)) else "-" );
@fredcolclough how can I scan for stocks where OR_SPOT >.90 <.95?
# ORB Watch List Column - near B/O
input StartTime = 0929;
input EndTime = 1000;
input CloudOn = yes; #hint CloudOn: Clouds Opening Range.
def h = high;
def l = low;
def c = close;
def ORActive = if SecondsFromTime(StartTime) > 0 and
SecondsTillTime(EndTime) >= 0
then 1
else 0;
def ORH = if ORActive and !ORActive[1]
then h
else if ORActive and
h > ORH[1]
then h
else ORH[1];
def ORL = if ORActive and !ORActive[1]
then l
else if ORActive and
l < ORL[1]
then l
else ORL[1];
def ORhigh = if !ORActive
then ORH
else Double.NaN;
def ORlow = if !ORActive
then ORL
else Double.NaN;
def ORMid = if !ORActive
then (ORhigh + ORlow) / 2
else Double.NaN;
def ORRange = if !ORActive
then ORhigh - ORlow
else Double.NaN;
def ORL3 = if !ORActive
then ORL
else Double.NaN;
plot ORh2 = ORhigh;
plot ORl2 = ORlow;
plot ORm1 = (ORhigh + ORlow) / 2;
plot ORU = (ORhigh + ORmid) / 2;
addCloud(if CloudOn == yes
then ORu
else double.nan
, orm1,createColor(66,244,131), createColor(66,244,131));
addCloud(if CloudOn == yes
then orh2
else double.nan
, ORu,createColor(238,130,238), createColor(238,130,238));
addCloud(if CloudOn == yes
then orl3
else double.nan
,orm1,createColor(244,83,66), createColor(244,83,66));
Did you guys see this guy pedaling pretty much a free indicator from here plus overnight highs and lows https://www.momentum-options.com/orbi
Join useThinkScript to post your question to a community of 21,000+ developers and traders.
Start a new thread and receive assistance from our community.
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.
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.