Cloud on High and Low

Buckbull

Active member
vK9w0Vv.jpg

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


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
hal_orb
GgTXBn3.jpg
 
Last edited:
Any help coding this would be greatly appreciated!
Im trying to do this without the orb cause I know nothing about it . Am I on the right track with this script I came up with? The problem im having is a cloud is formed on EVERY CANDLE !!!! I only want a cloud to form on the high and low of the 1st 15 min candle when it closes . PLEASE HELP !I **** AT THIS !!!!

def OpenPrice = open;

def ClosePrice = close;

AddCloud(OpenPrice, ClosePrice, color.RED, color.GREEN, yes);
 
Last edited by a moderator:
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
This is great! Request to add a midline to the code.
 

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