joinfree

Daily_Pivots

85 0 15
Daily_Pivots
Remove from Favorite Scripts Add to Favorite Scripts
//created by Joinfree
//Daily Pivots
study(title="Daily_Pivots", shorttitle="Daily_Pivots", overlay=true) 
sd = input(true, title="Show Daily Pivots?")
sd3 = input(true, 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 = sd3 and r1 + (high - low) ? r1 + (high - low) : na
s3 = sd3 and s1 - (high - low) ? s1 - (high - low) : na
 
 //Daily Pivots 
dtime_pivot = security(tickerid, '1440', pivot[1]) 
dtime_r1 = security(tickerid, '1440', r1[1]) 
dtime_s1 = security(tickerid, '1440', s1[1]) 
dtime_r2 = security(tickerid, '1440', r2[1]) 
dtime_s2 = security(tickerid, '1440', s2[1])
dtime_r3 = security(tickerid, '1440', r3[1])
dtime_s3 = security(tickerid, '1440', s3[1])

plot(sd and dtime_pivot ? dtime_pivot : na, title="Daily Pivot",style=circles, color=fuchsia,linewidth=3) 
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)
plot(close)
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