CapnOscar

CapnPivots

63
Daily Pivots
Script open-source

Dans le véritable esprit de TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par le règlement. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser ce script sur un graphique ?
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)