joinfree

Daily_Pivots

94 0 16
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)
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
SV Svenska
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
AR العربية
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Contact Support Ideas Published Followers Following Private Messages Chat Sign Out