Is there a script that will automatically plot a cloud at the H/L of the first 15 min bar close and extend it right like in the pic. Thanks
Is there a script that will automatically plot a cloud at the H/L of the first 15 min bar close and extend it right like in the pic. Thanks
in what area do I put the time in for the 1st 15 min candle ? there is a lot of stuff in this study !!!search for ORB, opening range breakout studies
https://usethinkscript.com/search/1072879/?q=orb&o=date
here is one
https://usethinkscript.com/threads/opening-range-breakout-indicator-for-thinkorswim.16/
in what area do I put the time in for the 1st 15 min candle ? there is a lot of stuff in this study !!!
# orb_07
#----------------------
# orb lines , cloud
# halcyonguy
# 23-02-26
#----------------------
def na = Double.NaN;
def bn = barnumber();
def lastbar = !isnan(close[0]) and isnan(close[-1]);
# chart time
def chartagg = GetAggregationPeriod();
def chartmin = (chartagg /(1000*60));
# pick a time for ORB
input orb_time = AggregationPeriod.fifteen_min;
def orbmin = (orb_time/(60*1000));
# daytime (EST)
input start = 0930;
input end = 1600;
def daytime = if secondsfromTime(start) >= 0 and secondstillTime(end) > 0 then 1 else 0;
def day_start = secondsfromTime(start) == 0;
input show_ORB_label = yes;
addlabel(show_ORB_label, " ORB " + orbmin, color.cyan);
def duration_sec = orbmin * 60;
def seconds_passed = secondsfromTime(start);
def isorb = if seconds_passed >= 0 and seconds_passed < duration_sec then 1 else 0;
def orbhi = high(period = orb_time);
def orblo = low(period = orb_time);
def perhigh = if !daytime then na else if isorb then orbhi else perhigh[1];
def perlow = if !daytime then na else if isorb then orblo else perlow[1];
input show_orb_level_lines = yes;
# plot dots for first bar timeframe
plot hidots = if show_orb_level_lines and isorb then perhigh else na;
plot lodots = if show_orb_level_lines and isorb then perlow else na;
hidots.setpaintingStrategy(paintingStrategy.points);
lodots.setpaintingStrategy(paintingStrategy.pointS);
hidots.setDefaultColor(color.yellow);
lodots.setDefaultColor(color.yellow);
# plot line after first bar
plot hiline = if show_orb_level_lines and !isorb then perhigh else na;
plot loline = if show_orb_level_lines and !isorb then perlow else na;
hiline.setpaintingStrategy(paintingStrategy.line);
loline.setpaintingStrategy(paintingStrategy.line);
hiline.setDefaultColor(color.yellow);
loline.setDefaultColor(color.yellow);
input show_orb_cloud = yes;
def cld_hi = if !show_orb_cloud or day_start then na else perhigh;
def cld_lo = if !show_orb_cloud or day_start then na else perlow;
addcloud(cld_hi, cld_lo, color.gray, color.gray);
#
This is great! Request to add a midline to the code.sorry about that, i'll simplify it...
i ended up finding one i made and and added the cloud.
with this one , just pick a time period, that corresponds with the desired orb time. default is 15 minutes
draws dots during orb time, at highest and lowest.
draws lines after orb time, at highest and lowest orb levels.
with after hours off, the cloud was stretching from the last bar of a day to the first bar of next day.
an easy way to stop this was to, don't draw a cloud on the first bar of the day.
Code:# orb_07 #---------------------- # orb lines , cloud # halcyonguy # 23-02-26 #---------------------- def na = Double.NaN; def bn = barnumber(); def lastbar = !isnan(close[0]) and isnan(close[-1]); # chart time def chartagg = GetAggregationPeriod(); def chartmin = (chartagg /(1000*60)); # pick a time for ORB input orb_time = AggregationPeriod.fifteen_min; def orbmin = (orb_time/(60*1000)); # daytime (EST) input start = 0930; input end = 1600; def daytime = if secondsfromTime(start) >= 0 and secondstillTime(end) > 0 then 1 else 0; def day_start = secondsfromTime(start) == 0; input show_ORB_label = yes; addlabel(show_ORB_label, " ORB " + orbmin, color.cyan); def duration_sec = orbmin * 60; def seconds_passed = secondsfromTime(start); def isorb = if seconds_passed >= 0 and seconds_passed < duration_sec then 1 else 0; def orbhi = high(period = orb_time); def orblo = low(period = orb_time); def perhigh = if !daytime then na else if isorb then orbhi else perhigh[1]; def perlow = if !daytime then na else if isorb then orblo else perlow[1]; input show_orb_level_lines = yes; # plot dots for first bar timeframe plot hidots = if show_orb_level_lines and isorb then perhigh else na; plot lodots = if show_orb_level_lines and isorb then perlow else na; hidots.setpaintingStrategy(paintingStrategy.points); lodots.setpaintingStrategy(paintingStrategy.pointS); hidots.setDefaultColor(color.yellow); lodots.setDefaultColor(color.yellow); # plot line after first bar plot hiline = if show_orb_level_lines and !isorb then perhigh else na; plot loline = if show_orb_level_lines and !isorb then perlow else na; hiline.setpaintingStrategy(paintingStrategy.line); loline.setpaintingStrategy(paintingStrategy.line); hiline.setDefaultColor(color.yellow); loline.setDefaultColor(color.yellow); input show_orb_cloud = yes; def cld_hi = if !show_orb_cloud or day_start then na else perhigh; def cld_lo = if !show_orb_cloud or day_start then na else perlow; addcloud(cld_hi, cld_lo, color.gray, color.gray); #
1 minute chart
5 minute ORB time
View attachment 17803
@halcyonguy its been a while thanks for the orb code ! but how do i get it to the color cloud I have above ? If possible I would like this color and transparency . Again thank youView attachment 17673
Is there a script that will automatically plot a cloud at the H/L of the first 15 min bar close and extend it right like in the pic. Thanks
Join useThinkScript to post your question to a community of 21,000+ developers and traders.
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
S | Order Cloud based on volume | Questions | 4 | |
S | Add Cloud to RSI moving average crossover ? | Questions | 1 | |
5 | add cloud to the stacked EMA | Questions | 2 | |
I | Need help extending lines on Ichimoku Cloud | Questions | 2 | |
C | MTF EMA cloud | Questions | 1 |
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.