ChrisMoody

CM_Pivot Points Daily To Intraday

New Pivots Indicator With Options for Daily, 4 Hour, 2 Hour, 1 Hour, 30 Minute Pivot Levels!

Great for Forex Traders! - Take a Look at Chart with Weekly, Daily, and 4 Hour levels. Weekly Pivots Indicator is separate - Link is Below.

Plot one Pivot Level or Multiple at the Same Time via Check Boxes in the Inputs tab.

Defaults to 4 Hour Pivot Levels - Adjust in Inputs Tab.

S3 and R3 are turned off by Default - You can Activate Them In The Inputs Tab.

These Intraday Options were Requested By Users Using My CM_ Pivots Point Custom Indicator that Plots Daily, Weekly, Monthly, Quarterly, and Yearly Pivot Levels. Link is Below.

Now Both Longer-Term Traders and Shorter Term Traders Have All The Pivot Levels They Need. From Yearly Levels All The Way Down to 30 Minute Levels!

***The Candles On The Chart Are Custom Heikin-Ashi Paint Bars. Link is Below

CM_ Pivot Points Custom
Daily, Weekly, Monthly, Quarterly, Yearly Pivot Levels
CM_Pivot Points_Custom


Heikin-Ashi Paint Bars
CM Heikin-Ashi Candlesticks_V1
Remove from Favorite Scripts Add to Favorite Scripts
//Created by ChrisMoody 6-14-14 
//Daily, Weekly, Monthly, Quarterly, Yearly Pivots 
//calculations from http://en.wikipedia.org/wiki/Pivot_point 
study(title="CM_Pivot Points Daily To Intraday", shorttitle="CM_Pivots_Daily_IntraDay", overlay=true) 
sd = input(false, title="Show Daily Pivots?")
sw = input(true, title="Show 4 Hour Pivots?")
sm = input(false, title="Show 2 Hour Pivots?")
sq = input(false, title="Show Hourly Pivots?")
sy = input(false, title="Show 30 Minute Pivots?")
sh3 = input(false, title="Show R3 & S3?")

//Classic Pivot Calculations
pivot = (high + low + close ) / 3.0 
r1 = pivot + (pivot - low)
s1 = pivot - (high - pivot) 
r2 = pivot + (high - low) 
s2 = pivot - (high - low) 
r3 = sh3 and r1 + (high - low) ? r1 + (high - low) : na
s3 = sh3 and s1 - (high - low) ? s1 - (high - low) : na

//Daily Pivots 
dtime_pivot = security(tickerid, 'D', pivot[1]) 
dtime_r1 = security(tickerid, 'D', r1[1]) 
dtime_s1 = security(tickerid, 'D', s1[1]) 
dtime_r2 = security(tickerid, 'D', r2[1]) 
dtime_s2 = security(tickerid, 'D', s2[1])
dtime_r3 = security(tickerid, 'D', r3[1])
dtime_s3 = security(tickerid, 'D', s3[1])

offs_daily = 0 
plot(sd and dtime_pivot ? dtime_pivot : na, title="Daily Pivot",style=circles, color=fuchsia,linewidth=4) 
plot(sd and dtime_r1 ? dtime_r1 : na, title="Daily R1",style=circles, color=#DC143C,linewidth=4) 
plot(sd and dtime_s1 ? dtime_s1 : na, title="Daily S1",style=circles, color=lime,linewidth=4) 
plot(sd and dtime_r2 ? dtime_r2 : na, title="Daily R2",style=circles, color=maroon,linewidth=4) 
plot(sd and dtime_s2 ? dtime_s2 : na, title="Daily S2",style=circles, color=#228B22,linewidth=4) 
plot(sd and dtime_r3 ? dtime_r3 : na, title="Daily R3",style=circles, color=#FA8072,linewidth=4)
plot(sd and dtime_s3 ? dtime_s3 : na, title="Daily S3",style=circles, color=#CD5C5C,linewidth=4)
//4 Hour Pivots 
wtime_pivot = security(tickerid, '240', pivot[1]) 
wtime_R1 = security(tickerid, '240', r1[1]) 
wtime_S1 = security(tickerid, '240', s1[1])
wtime_R2 = security(tickerid, '240', r2[1]) 
wtime_S2 = security(tickerid, '240', s2[1])
wtime_R3 = security(tickerid, '240', r3[1]) 
wtime_S3 = security(tickerid, '240', s3[1])

plot(sw and wtime_pivot ? wtime_pivot : na, title="4 Hour Pivot",style=circles, color=fuchsia,linewidth=3) 
plot(sw and wtime_R1 ? wtime_R1 : na, title="4 Hour R1",style=circles, color=#DC143C,linewidth=3) 
plot(sw and wtime_S1 ? wtime_S1 : na, title="4 Hour S1",style=circles, color=lime,linewidth=3) 
plot(sw and wtime_R2 ? wtime_R2 : na, title="4 Hour R2",style=circles, color=maroon,linewidth=3) 
plot(sw and wtime_S2 ? wtime_S2 : na, title="4 Hour S2",style=circles, color=#228B22,linewidth=3) 
plot(sw and wtime_R3 ? wtime_R3 : na, title="4 Hour R3",style=circles, color=#FA8072,linewidth=3) 
plot(sw and wtime_S3 ? wtime_S3 : na, title="4 Hour S3",style=circles, color=#CD5C5C,linewidth=3) 
//2 Hour Pivots 
mtime_pivot = security(tickerid, '120', pivot[1]) 
mtime_R1 = security(tickerid, '120', r1[1])
mtime_S1 = security(tickerid, '120', s1[1])
mtime_R2 = security(tickerid, '120', r2[1])
mtime_S2 = security(tickerid, '120', s2[1])
mtime_R3 = security(tickerid, '120', r3[1])
mtime_S3 = security(tickerid, '120', s3[1])

plot(sm and mtime_pivot ? mtime_pivot : na, title="2 Hour Pivot",style=cross, color=fuchsia,linewidth=3) 
plot(sm and mtime_R1 ? mtime_R1 : na, title="2 Hour R1",style=cross, color=#DC143C,linewidth=3) 
plot(sm and mtime_S1 ? mtime_S1 : na, title="2 Hour S1",style=cross, color=lime,linewidth=3) 
plot(sm and mtime_R2 ? mtime_R2 : na, title="2 Hour R2",style=cross, color=maroon,linewidth=3) 
plot(sm and mtime_S2 ? mtime_S2 : na, title="2 Hour S2",style=cross, color=#228B22,linewidth=3)
plot(sm and mtime_R3 ? mtime_R3 : na, title="2 Hour R3",style=cross, color=#FA8072,linewidth=3)
plot(sm and mtime_S3 ? mtime_S3 : na, title="2 Hour S3",style=cross, color=#CD5C5C,linewidth=3)
//1 Hour Pivots
qtime_pivot = security(tickerid, '60', pivot[1]) 
qtime_R1 = security(tickerid, '60', r1[1])
qtime_S1 = security(tickerid, '60', s1[1])
qtime_R2 = security(tickerid, '60', r2[1])
qtime_S2 = security(tickerid, '60', s2[1])
qtime_R3 = security(tickerid, '60', r3[1])
qtime_S3 = security(tickerid, '60', s3[1])

plot(sq and qtime_pivot ? qtime_pivot : na, title="Hourly Pivot",style=circles, color=fuchsia,linewidth=3) 
plot(sq and qtime_R1 ? qtime_R1 : na, title="Hourly R1",style=circles, color=#DC143C,linewidth=3) 
plot(sq and qtime_S1 ? qtime_S1 : na, title="Hourly S1",style=circles, color=lime,linewidth=3) 
plot(sq and qtime_R2 ? qtime_R2 : na, title="Hourly R2",style=circles, color=maroon,linewidth=3) 
plot(sq and qtime_S2 ? qtime_S2 : na, title="Hourly S2",style=circles, color=#228B22,linewidth=3)
plot(sq and qtime_R3 ? qtime_R3 : na, title="Hourly R3",style=circles, color=#FA8072,linewidth=3)
plot(sq and qtime_S3 ? qtime_S3 : na, title="Hourly S3",style=circles, color=#CD5C5C,linewidth=3)
//30 Minute Pivots
ytime_pivot = security(tickerid, '30', pivot[1]) 
ytime_R1 = security(tickerid, '30', r1[1])
ytime_S1 = security(tickerid, '30', s1[1])
ytime_R2 = security(tickerid, '30', r2[1])
ytime_S2 = security(tickerid, '30', s2[1])
ytime_R3 = security(tickerid, '30', r3[1])
ytime_S3 = security(tickerid, '30', s3[1])

plot(sy and ytime_pivot ? ytime_pivot : na, title="30 Minute Pivot",style=cross, color=fuchsia,linewidth=2) 
plot(sy and ytime_R1 ? ytime_R1 : na, title="30 Minute R1",style=cross, color=#DC143C,linewidth=2) 
plot(sy and ytime_S1 ? ytime_S1 : na, title="30 Minute S1",style=cross, color=lime,linewidth=2) 
plot(sy and ytime_R2 ? ytime_R2 : na, title="30 Minute R2",style=cross, color=maroon,linewidth=2) 
plot(sy and ytime_S2 ? ytime_S2 : na, title="30 Minute S2",style=cross, color=#228B22,linewidth=2)
plot(sy and ytime_R3 ? ytime_R3 : na, title="30 Minute R3",style=cross, color=#FA8072,linewidth=2)
plot(sy and ytime_S3 ? ytime_S3 : na, title="30 Minute S3",style=cross, color=#CD5C5C,linewidth=2)
Hi Chris, how to change the pivot calculations from Classic to DeMark? Thx.
Reply
ChrisMoody PRO faizal.mansor.908
2 years ago
Sorry man...take a look at the post below...I made a living for 2 years trading nothing but pivot levels. I researched them all and found the classic pivots to be significantly more accurate. Especially with linking Multiple Pivot levels. I typically waited for price to hit an area where the Monthly, Weekly, and daily levels were all in 1 place. I call it Laminated Support/Resistance.

The other issue is the length of that code maxes out PineScript...That's why I had to create a separate indicator for Daily, Weekly, Monthly, Quarterly, and Yearly levels. So the only way to add demark capability is to code several indicators with just a few time frame options.

The Indicator TradingView provides is coded with more advanced features than PineScript supports. I just can't stand how that indicator won't let me color each Pivot level differently. This is absolutely necessary when I plot Daily, Weekly, Monthly levels. I need to know by the line plot type and the color exactly what pivot level it is.
Reply
Excellent Chris, I always liked pivot points...used to trade price action and this solely when I first began trading bitcoin. Pretty good success rate, especially for me being a noob back then (even more than I currently am)
Reply
ChrisMoody PRO IvanLabrie
2 years ago
Yep...Check out this link on the Longer Term Pivot levels I posted. For two years I made a living trading nothing but pivot levels and using the Heikin-Ashi Paint bars as confirmation. I think I give a few details in that post.

Pivots Indicator - I Made A Living Trading This System For 2 Yrs

+1 Reply
IvanLabrie TOP ChrisMoody
2 years ago
I still like to have them as reference, these paint bars are WAY better than the regular heiken ashi candles I was using.
Reply
ChrisMoody PRO IvanLabrie
2 years ago
Yep...They are great...I paid a developer probably 10 years ago....I don't think I've gone without using them once since then....they are just automatically on my charts.
+1 Reply
IvanLabrie TOP ChrisMoody
2 years ago
We'll remember you when we make some serious profits Chris. :)
Reply
dnago
2 years ago
Hey Chris - this is an awesome indicator! Have been using your CM_Williams_Vix_Fix & RSI/EMA (www.tradingview.com/v/og7JPrRA/) to detect intraday reversals, but this pivot indicator is easier to read. Both show consistent locations in my limited use, as they should.

I have been quite interested in DeMark also, (as alluded to by @faizal.mansor.908), but as I understand, although powerful, it seems to signal infrequently?

Finally, I have used a few of your other indicators and found them to be extremely useful. As mentioned by others, you are an incredibly generous resource on this site and I wish to thank you for your efforts and response to requests, which help many. Thanks much for your contributions!
+1 Reply
ChrisMoody PRO dnago
2 years ago
Thanks...Glad your enjoying them....
+1 Reply
Major New Release for Pivots Indicator

Famous Filtered Pivots Indicator - Many Time Frames Available!!!
Reply
TooRightRich
2 years ago
Hi Chris,

The TradingView "day" starts at 22:00UTC, so the pivots are calculated from that start time. What I would really like to do is have them start from 00:00UTC. So for example, the daily pivots run for 24 hours from 00:00UTC. I haven't seen any other script that will handle this "offset". Do you have any idea if this would even be possible? I have coding experience, but I'm not familiar with Pinescript. The 'resolution' used in the security function is obviously based on the start being 22:00, so would need some kind of offset? Any ideas?

Cheers,

Richard
Reply
//Created by ChrisMoody 6-14-14 ; Medians added by Coondawg71
//Daily, Weekly, Monthly, Quarterly, Yearly Pivots
//calculations from http://en.wikipedia.org/wiki/Pivot_point
study(title="CM_Pivot Points", shorttitle="CM_Pivots", overlay=true)
sd = input(true, title="Show Daily Pivots?")
sw = input(false, title="Show Weekly Pivots?")
sm = input(false, title="Show Monthly Pivots?")
sq = input(false, title="Show Quarterly Pivots?")
sy = input(false, title="Show Yearly Pivots?")
sh3 = input(false, title="Show R3 & S3?")

//Classic Pivot Calculations
pivot = (high + low + close ) / 3.0
median = (high + low) / 2.0
r1 = pivot + (pivot - low)
s1 = pivot - (high - pivot)
r2 = pivot + (high - low)
s2 = pivot - (high - low)
r3 = sh3 and r1 + (high - low) ? r1 + (high - low) : na
s3 = sh3 and s1 - (high - low) ? s1 - (high - low) : na

//Daily Pivots
dtime_pivot = security(tickerid, 'D', pivot)
dtime_median = security (tickerid, 'D', median)
dtime_r1 = security(tickerid, 'D', r1)
dtime_s1 = security(tickerid, 'D', s1)
dtime_r2 = security(tickerid, 'D', r2)
dtime_s2 = security(tickerid, 'D', s2)
dtime_r3 = security(tickerid, 'D', r3)
dtime_s3 = security(tickerid, 'D', s3)

offs_daily = 0
plot(sd and dtime_pivot ? dtime_pivot : na, title="Daily Pivot",style=circles, color=fuchsia,linewidth=3)
plot(sd and dtime_median ? dtime_median : na, title="Daily Median",style=line, color=green,linewidth=5)
plot(sd and dtime_r1 ? dtime_r1 : na, title="Daily R1",style=circles, color=#DC143C,linewidth=3)
plot(sd and dtime_s1 ? dtime_s1 : na, title="Daily S1",style=circles, color=lime,linewidth=3)
plot(sd and dtime_r2 ? dtime_r2 : na, title="Daily R2",style=circles, color=maroon,linewidth=3)
plot(sd and dtime_s2 ? dtime_s2 : na, title="Daily S2",style=circles, color=#228B22,linewidth=3)
plot(sd and dtime_r3 ? dtime_r3 : na, title="Daily R3",style=circles, color=#FA8072,linewidth=3)
plot(sd and dtime_s3 ? dtime_s3 : na, title="Daily S3",style=circles, color=#CD5C5C,linewidth=3)

//Weekly Pivots
wtime_pivot = security(tickerid, 'W', pivot)
wtime_median = security(tickerid, 'W', median)
wtime_R1 = security(tickerid, 'W', r1)
wtime_S1 = security(tickerid, 'W', s1)
wtime_R2 = security(tickerid, 'W', r2)
wtime_S2 = security(tickerid, 'W', s2)
wtime_R3 = security(tickerid, 'W', r3)
wtime_S3 = security(tickerid, 'W', s3)

plot(sw and wtime_pivot ? wtime_pivot : na, title="Weekly Pivot",style=circles, color=fuchsia,linewidth=4)
plot(sw and wtime_median ? wtime_median : na, title="Weekly Median",style=circles, color=white,linewidth=5)
plot(sw and wtime_R1 ? wtime_R1 : na, title="Weekly R1",style=circles, color=#DC143C,linewidth=4)
plot(sw and wtime_S1 ? wtime_S1 : na, title="Weekly S1",style=circles, color=lime,linewidth=4)
plot(sw and wtime_R2 ? wtime_R2 : na, title="Weekly R2",style=circles, color=maroon,linewidth=4)
plot(sw and wtime_S2 ? wtime_S2 : na, title="Weekly S2",style=circles, color=#228B22,linewidth=4)
plot(sw and wtime_R3 ? wtime_R3 : na, title="Weekly R3",style=circles, color=#FA8072,linewidth=4)
plot(sw and wtime_S3 ? wtime_S3 : na, title="Weekly S3",style=circles, color=#CD5C5C,linewidth=4)

//Monthly Pivots
mtime_pivot = security(tickerid, 'M', pivot)
mtime_median = security(tickerid, 'M', median)
mtime_R1 = security(tickerid, 'M', r1)
mtime_S1 = security(tickerid, 'M', s1)
mtime_R2 = security(tickerid, 'M', r2)
mtime_S2 = security(tickerid, 'M', s2)
mtime_R3 = security(tickerid, 'M', r3)
mtime_S3 = security(tickerid, 'M', s3)

plot(sm and mtime_pivot ? mtime_pivot : na, title="Monthly Pivot",style=cross, color=fuchsia,linewidth=3)
plot(sm and mtime_median ? mtime_median : na, title="Monthly Median",style=cross, color=fuchsia,linewidth=3)
plot(sm and mtime_R1 ? mtime_R1 : na, title="Monthly R1",style=cross, color=#DC143C,linewidth=3)
plot(sm and mtime_S1 ? mtime_S1 : na, title="Monthly S1",style=cross, color=lime,linewidth=3)
plot(sm and mtime_R2 ? mtime_R2 : na, title="Monthly R2",style=cross, color=maroon,linewidth=3)
plot(sm and mtime_S2 ? mtime_S2 : na, title="Monthly S2",style=cross, color=#228B22,linewidth=3)
plot(sm and mtime_R3 ? mtime_R3 : na, title="Monthly R3",style=cross, color=#FA8072,linewidth=3)
plot(sm and mtime_S3 ? mtime_S3 : na, title="Monthly S3",style=cross, color=#CD5C5C,linewidth=3)
//Quarterly Pivots
qtime_pivot = security(tickerid, '3M', pivot)
qtime_median = security(tickerid, '3M', median)
qtime_R1 = security(tickerid, '3M', r1)
qtime_S1 = security(tickerid, '3M', s1)
qtime_R2 = security(tickerid, '3M', r2)
qtime_S2 = security(tickerid, '3M', s2)
qtime_R3 = security(tickerid, '3M', r3)
qtime_S3 = security(tickerid, '3M', s3)
//Quarterly Pivots Plots
plot(sq and qtime_pivot ? qtime_pivot : na, title="Quarterly Pivot",style=line, color=purple,linewidth=3)
plot(sq and qtime_median ? qtime_median : na, title="Quarterly Median",style=cross, color=fuchsia,linewidth=3)
plot(sq and qtime_R1 ? qtime_R1 : na, title="Quarterly R1",style=cross, color=#DC143C,linewidth=3)
plot(sq and qtime_S1 ? qtime_S1 : na, title="Quarterly S1",style=cross, color=lime,linewidth=3)
plot(sq and qtime_R2 ? qtime_R2 : na, title="Quarterly R2",style=cross, color=maroon,linewidth=3)
plot(sq and qtime_S2 ? qtime_S2 : na, title="Quarterly S2",style=cross, color=#228B22,linewidth=3)
plot(sq and qtime_R3 ? qtime_R3 : na, title="Quarterly R3",style=cross, color=#FA8072,linewidth=3)
plot(sq and qtime_S3 ? qtime_S3 : na, title="Quarterly S3",style=cross, color=#CD5C5C,linewidth=3)
//Yearly Pivots
ytime_pivot = security(tickerid, '12M', pivot)
ytime_R1 = security(tickerid, '12M', r1)
ytime_S1 = security(tickerid, '12M', s1)
ytime_R2 = security(tickerid, '12M', r2)
ytime_S2 = security(tickerid, '12M', s2)
ytime_R3 = security(tickerid, '12M', r3)
ytime_S3 = security(tickerid, '12M', s3)
//Yearly Pivots Plots
plot(sy and ytime_pivot ? ytime_pivot : na, title="Yearly Pivot",style=cross, color=fuchsia,linewidth=3)
plot(sy and ytime_R1 ? ytime_R1 : na, title="Yearly R1",style=cross, color=#DC143C,linewidth=3)
plot(sy and ytime_S1 ? ytime_S1 : na, title="Yearly S1",style=cross, color=lime,linewidth=3)
plot(sy and ytime_R2 ? ytime_R2 : na, title="Yearly R2",style=cross, color=maroon,linewidth=3)
plot(sy and ytime_S2 ? ytime_S2 : na, title="Yearly S2",style=cross, color=#228B22,linewidth=3)
plot(sy and ytime_R3 ? ytime_R3 : na, title="Yearly R3",style=cross, color=#FA8072,linewidth=3)
plot(sy and ytime_S3 ? ytime_S3 : na, title="Yearly S3",style=cross, color=#CD5C5C,linewidth=3)
Reply
Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
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