CapnOscar

CapnPivots

137 0 9
Daily Pivots
Remove from Favorite Scripts Add to Favorite Scripts
study(title="CapnPivots", shorttitle="CapnPivots", overlay=true)

yesterday_close = security(tickerid, "D",close[1])
yesterday_open = security(tickerid, "D",open[1])
today_open = security(tickerid, "D",open)
yesterday_high = security(tickerid, "D",high[1])
yesterday_low = security(tickerid, "D",low[1])
day_high = security(tickerid, "D",high)
day_low = security(tickerid, "D",low)

//yc = plot(yesterday_close, color=blue)
//yo = plot(yesterday_open, color=blue)
//to = plot(today_open, color=red)
//yh = plot(yesterday_high, color=blue)
//yl = plot(yesterday_low, color=blue)
//dh = plot(day_high, color=blue)
//dl = plot(day_low, color=blue)

D = (day_high - day_low)
Q = (yesterday_high - yesterday_low)
P = (yesterday_high + yesterday_low + yesterday_close) / 3
R1 = (2*P)-yesterday_low
S1 = (2*P)-yesterday_high
R2 = P+(yesterday_high - yesterday_low)
S2 = P-(yesterday_high - yesterday_low)

H4 = (Q*0.55)+yesterday_close
H3 = (Q*0.27)+yesterday_close
R3 = (2*P)+(yesterday_high-(2*yesterday_low))
S3 = (2*P)-((2* yesterday_high)-yesterday_low)


pv = plot(P, color=black)
plr1 = plot(R1, color=red)
plr2 = plot(R2, color=red)
plr3 = plot(R3, color=red)
pls1 = plot(S1, color=green)
pls2 = plot(S2, color=green)
pls3 = plot(S3, color=green)

plh4 = plot(H4, color=purple)
plh3 = plot(H3, color=purple)
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