Open Close Daily Line

This will place circles on your chart for the opening daily price. If price is above, the circles are green. If price is below, the circles are red. I wanted to be able to see the opening price a bit easier while in smaller time frames.
I decided to add the previous daily closing line to the original script. Basically looking for good support / resistance
Remove from Favorite Scripts Add to Favorite Scripts
// Written by Robert N.  030615
// Still looking for way to remove from previous days
study("Open/Close Daily Line", overlay=true)

odl = input(true, title="Open Daily Line")
dopen = security(tickerid, 'D', open) 
dcolor = close < dopen ? red : green
plot(odl and dopen ? dopen :na , title="Daily_Open",style=circles, color=dcolor, linewidth=3) 

cdl = input(true, title="Previous Closing Daily Line")
dclose = security(tickerid, 'D', close[1]) 
dcolor2 = close < dclose ? red : green
plot(cdl and dclose ? dclose :na , title="Daily_Close",style=circles, color=dcolor2, linewidth=3) 
admin PRO
2 years ago
Awesome. We receive a lot of requests for this.
repo32 PRO admin
2 years ago
Thank you. I finally got some vacation time from work and decided to have some "me" time for programming what I want :) I love the sharing with the community idea here.
admin PRO repo32
2 years ago
2 years ago
Hi, I've been looking on a way to display last year highs and lows only. Do you have any ideas how I could do this? Thank you.
repo32 PRO N
2 years ago
Just created it. You can uncheck the box for current years high/lows in the settings.
High Low Yearly
2 years ago
What was supposed to be changed in order for the open close of previous week? Thank in advance ~
alex.a alex.a
2 years ago
as well as previous week High and Low? ^_* Thanks -
repo32 PRO alex.a
2 years ago
alex.a : I would write it up for you, but I am super bogged with work lately. But here is what needs to be done to make the quick change for you: dopen = security(tickerid, 'D', open) Change to: dopen = security(tickerid, 'W', open) . You can do the same for the dclose reference. If you want month, just change to: 'M'. The tweaks are very easy. I highly recommend using the help reference under pine script. You may be able to modify it to make something completely new. Enjoy. Rob
Ideas Scripts Chart
United States
United Kingdom
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Billing Sign Out