Help with Hourly ATR Cloud Indicator

QuantumSense

New member
Sup yall, I want to create an indicator that plots a cloud and above the ATR. w/ a 5 point cloud.

For example, 200 hourly ATR

Every hour whatever the 200 period ATR (On Hourly or maybe we can do it for whatever timeframe? but i'm mainly focused on hourly) so at 12:00 the 200 hourly ATR for /ES is 16.25 points. Hourly open is 4220. I want to create an indicator that plots a cloud at 4236.25 to 4241.25 as a RED Cloud and 4204.250-4199.25 GREEN cloud.

And have it do this every hour at the opening print for each hour. So 0900CST, 10am CST, 11am CST ect.

Also I want this to plot for the full hour. So 1 plot/level for 0900-10am and 1400-1500 ect. So whatever the Plot is at 11am CST it plots all the way until 11:59am CST. Ect.


I would prefer if the ATR value is editable and dynamic, but if the ATR period has to be hardcoded in the code w/o a input variable thats ok.


Basically my own version of the HPMR and Volatility box ect. I figured out the hourly ATR period for the Chart Viper HPMR's and wanna make my own indicator so I can use it and possibly even stream it w/o streaming someone elses indicator.

But im total newb to making TOS indicators.

Does anyone have an idea how to code this?
 

Svanoy

Well-known member
@QuantumSense like this?

XPDyY42.png


Ruby:
input Points = 5;
input agg = AggregationPeriod.HOUR;
input ATR_length = 200;
input averageType = AverageType.WILDERS;

def agg_value = open(period = agg);
def ATR = MovingAverage(averageType, TrueRange(high(period = agg), close(period = agg), low(period = agg)), ATR_length);

plot UpperBottomLine = agg_value + ATR;
UpperBottomLine.SetpaintingStrategy(PaintingStrategy.HORIZONTAL);
plot UpperTopLine = UpperBottomLine + Points;
UpperTopLine.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
plot LowerTopLine = agg_value - ATR;
LowerTopLine.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
plot LowerBottomLine = LowerTopLine - Points;
LowerBottomLine.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

AddCloud(UpperTopLine, UpperBottomLine, Color.RED);
AddCloud(LowerTopLine, LowerBottomLine, Color.GREEN);
 

QuantumSense

New member
Holy ****.......bro. I'm litterally in tears.

Thank YOU SO MUCH!!!!!!!!!!!!!!

Wow. I have been watching this site for years, but this is my first real post.

Thank you so much bro for the help!
 

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.
Top