Code Plots - High, Low, Open, Close—Daily, Weekly, & Monthly!!!

Custom Code Plots High, Low, Open, Close
Plots Today And/Or Previous Day
Daily, Weekly, & Monthly TimeFrames

Default Settings:
Green = High
Silver             = Open
Fuchsia = Close
Red = Low
Current D-W-M = Circles as Plots
Previous D-W-M = Cross as Plots

By Default The Current Days High, Low, Open, Close Plots. There are Check boxes On The Inputs Tab To Turn All Options On And Off.

***Tip - For Intra-Day Trades…I Find It Useful To Plot Previous Days High, Low, Open, Close For Support/Resistance , & Breakout Levels. Plotting the Current Weekly and Monthly Levels Is Also Very Useful.

***If You Trade Daily Charts The Previous Months Levels Are Very Useful as Support/Resistance , & Breakout Levels….

Code For High, Low, Open, Close

Video On Importing Custom Indicators from PasteBin:
Remove from Favorite Scripts Add to Favorite Scripts
//Created By ChrisMoody on 6-14-2014
//Plots Current Days Open, High, Low, Close, And Or Previous Days. Both Days can be turned on and off with CheckBox
//Also plots Weekly and Monthly Versions
//Daily Session To be used on IntraDay Charts
study(title="_CM_High_Low_Open_Close", shorttitle="_CM_H_L_O_C", overlay=true)
st = input(true, title="Show Todays OHLC?")
sy = input(false, title="Show Yesterdays OHLC?")
swt = input(false, title="Show This Weeks OHLC?")
swy = input(false, title="Show Previous Weeks OHLC?")
smh = input(false, title="Show Monthly OHLC?")
spmh = input(false, title="Show Previous Months OHLC?")

tdo = security(tickerid, 'D', open)
pdo = security(tickerid, 'D', open[1])
pc = security(tickerid, 'D', close)
pdc = security(tickerid, 'D', close[1])
ph = security(tickerid, 'D', high)
pdh = security(tickerid, 'D', high[1])
pl = security(tickerid, 'D', low)
pdl = security(tickerid, 'D', low[1])
wtdo = security(tickerid, 'W', open)
wpdo = security(tickerid, 'W', open[1])
wpc = security(tickerid, 'W', close)
wpdc = security(tickerid, 'W', close[1])
wph = security(tickerid, 'W', high)
wpdh = security(tickerid, 'W', high[1])
wpl = security(tickerid, 'W', low)
wpdl = security(tickerid, 'W', low[1])
mtdo = security(tickerid, 'M', open)
mpdo = security(tickerid, 'M', open[1])
mpc = security(tickerid, 'M', close)
mpdc = security(tickerid, 'M', close[1])
mph = security(tickerid, 'M', high)
mpdh = security(tickerid, 'M', high[1])
mpl = security(tickerid, 'M', low)
mpdl = security(tickerid, 'M', low[1])

//Daily Plots
offs_daily = 0 
plot(st and tdo ? tdo : na, title="Daily Open", style=circles, linewidth=2, color=silver)
plot(sy and pdo ? pdo : na, title="Previous Days Open", style=cross, linewidth=2, color=silver)
plot(st and pc ? pc : na, title="Daily Close", style=circles, linewidth=2, color=fuchsia)
plot(sy and pdc ? pdc : na, title="Previous Days Close", style=cross, linewidth=2, color=fuchsia)
plot(st and ph ? ph : na, title="Daily High", style=circles, linewidth=2, color=lime)
plot(sy and pdh ? pdh : na, title="Previous Daily High", style=cross, linewidth=2, color=lime)
plot(st and pl ? pl : na, title="Daily Low", style=circles, linewidth=2, color=red)
plot(sy and pdl ? pdl : na, title="Previous Daily Low", style=cross, linewidth=2, color=red)
//Weekly Plots
plot(swt and wtdo ? wtdo : na, title="Weekly Open", style=circles, linewidth=3, color=silver)
plot(swy and wpdo ? wpdo : na, title="Previous Weeks Open", style=cross, linewidth=3, color=silver)
plot(swt and wpc ? wpc : na, title="Weekly Close", style=circles, linewidth=3, color=fuchsia)
plot(swy and wpdc ? wpdc : na, title="Previous Weeks Close", style=cross, linewidth=3, color=fuchsia)
plot(swt and wph ? wph : na, title="Weekly High", style=circles, linewidth=3, color=green)
plot(swy and wpdh ? wpdh : na, title="Previous Weeks High", style=cross, linewidth=3, color=green)
plot(swt and wpl ? wpl : na, title="Weekly Low", style=circles, linewidth=3, color=red)
plot(swy and wpdl ? wpdl : na, title="Previous Weeks Low", style=cross, linewidth=3, color=red)
//Monthly Plots
plot(smh and mtdo ? mtdo : na, title="Monthly Open", style=circles, linewidth=4, color=silver)
plot(spmh and mpdo ? mpdo : na, title="Previous Months Open", style=cross, linewidth=4, color=silver)
plot(smh and mpc ? mpc : na, title="Monthly Close", style=circles, linewidth=4, color=fuchsia)
plot(spmh and mpdc ? mpdc : na, title="Previous Months Close", style=cross, linewidth=4, color=fuchsia)
plot(smh and mph ? mph : na, title="Monthly High", style=circles, linewidth=4, color=green)
plot(spmh and mpdh ? mpdh : na, title="Previous Monthly High", style=cross, linewidth=4, color=green)
plot(smh and mpl ? mpl : na, title="Monthly Low", style=circles, linewidth=4, color=red)
plot(spmh and mpdl ? mpdl : na, title="Previous Months Low", style=cross, linewidth=4, color=red)
Awesome. Thanks!
No Problem...Thanks for the comment.
Another excellent tool. Saves me a lot of time marking this up by hand.
Thanks...Glad it helps
Chris, first off thanks for all of the great scripts. I added this script to my profile but it seems that the weekly and monthly levels aren't working. I'm new to scripts so there's a good possibility that it's somehow my fault. Seems pretty straightforward though since you just click the import button and apply, right?

Thanks again
It defaults to Daily can have All Pivot Time Frames or any combination. Go To The Settings of the Indicator(By the name of the Indicator on your chart...their is a Gear Wheel like on that...Go to Inputs Tab...You will see check boxes you can choose...You've commented on several of my indicators. Most recent ones have this feature.
bergaler PRO ChrisMoody
Chris, thanks for your quick response. I was looking at and checking the boxes on the style tab instead of on the inputs tab which is where I went wrong. Working great now. Cheers!
So your saying If I produced videos...Like I was supposed to be doing...explaining the wouldn't have had the problem to start with...

OK maybe you would have said it nicer than me...

I NEED YOUR HELP....Please document anything you have found confusing on the TradingView Website regarding anything....PM me and I will give you my email address...I need to create a "Basics" series of videos for new users...I've been using the new platform for so long I forget what it was like using it my first week....It would help out the community a lot.
bergaler PRO ChrisMoody
Chris, I know I sound like a noob but ive been on tradingview for a while now, just get excited when I come across good, value-adding stuff like what you're making for the community here. It was just the scripts part, since I'm new to it, and which I don't really think is a beginners topic, and one little thing I was doing wrong. I'm confused, did I say something that wasn't nice? Anyways, I will definitely PM you if I come across anything that I have questions with.

Thanks again
Man I'm so sorry...I hope I didn't imply you said anything that wasn't nice...You said above you were new to scripts...which I misread as you were new to TradingView ...and I know I need to create a beginner type series....I was excited to find someone that could provide me feedback...No issues whatsoever from my end...
+1 Reply
Hi there anyway of coding this indicator to include the same HLOC on lower timeframes, such as 2H inparticular? Thanks in advance for your feedback...
It's very simple...the problem is there is a limit of plot statements/timeframes in Pinescript so it's impossible for me to create code with All timeframe options...

However...I'll create a Intraday version with 4 hour, 2 hour, 1 hour capabilities like I did with my pivots indicator.

If I haven't released it by tomorrow...remind me.
jonesesp ChrisMoody
Perfect... Thanks Chris
Chris, just a thought is it possible to default the viability of HLOC lines to their current period ie. Daily shows current day's HLOC, Weekly shows current week's HLOC, etc and have a check box to show historical HLOC levels? Had the thought whilst looking at the settings of the standard Pivot Points indicator and this way the charts will look less cluttered...

Thanks for your feedback in advance...
simple jonesesp
would be nice if you can have option for only show yesterday, last week and last month
@jonesesp @ChrisMoody Yeah i'm looking for that too, how to limit the plots to a selectable amount, like the internal Pivot Standard function. Any ideas?
Can we use this for forex as well or do you have a similar system for forex ?
Ede Ede
Oh I found it. Thank you
How can I get it to plot yearly?
Hi Chris. How do i get a straight line to show the previous months high and low only? I have removed all others and only have previous month close and high in the settings but the price line isnt straight?
ChrisMoody PRO Artfuldodger

Next time show a I can see what you mean...But using circles gives me strait lines.

@ChrisMoody, Hi Chris, please see:

Previous monthly high and low for Chris Moody
How can I draw lines for the 1st 15 minutes' high and low? I would like to use these levels for entering intraday long or short using Opening Range Breakout strategy.
Please ignore my previous message. I found the Opening Range script. Thanks.