ChartArt

Rounded Weekly Pivot (by ChartArt)

Trade with the trend. This is an overlay indicator which shows the weekly pivot (rounded) either as line or circle drawing, select-able by the user. The width of the pivot line (or circle) overlay is also adjustable.

In addition the bars can be colored by the trend, depending if the close price is above or below both the weekly and monthly pivots. If the close price is neither above or below both the weekly and monthly pivot prices the trend color is neutral blue.

The weekly pivot indicator with the optional setting that the pivot price is drawn as circles instead of a line:

And here with the pivot drawing disabled, showing only the pivot bar trend color
Skrypt open-source

Zgodnie z prawdziwym duchem TradingView, autor tego skryptu opublikował go jako open-source, aby traderzy mogli go zrozumieć i zweryfikować. Brawo dla autora! Możesz używać go za darmo, ale ponowne wykorzystanie tego kodu w publikacji jest regulowane przez Dobre Praktyki. Możesz go oznaczyć jako ulubione, aby użyć go na wykresie.

Wyłączenie odpowiedzialności

Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.

Chcesz użyć tego skryptu na wykresie?
//@version=2
study("Rounded Weekly Pivot (by ChartArt)",overlay=true,shorttitle="CA_-_Weekly_Pivot")

// ChartArt's Rounded Weekly Pivot Overlay Indicator
//
// Version 1.0
// Idea by ChartArt on December 5, 2015.
//
// This is an overlay indicator which shows
// the weekly pivot (rounded) either as
// line or circle drawing, select-able by
// the user. The width of the line is also
// adjustable.
//
// In addition the bars can be colored by the
// trend, depending if the current close price
// is above or below both the weekly and monthly
// pivot prices. If the close price is neither
// above or below both the weekly and monthly
// pivot prices the trend color is neutral blue.
//
// List of my work: 
// https://www.tradingview.com/u/ChartArt/


// Input
switch1=input(true, title="Show Weekly Pivot?")
switch2=input(true, title="Draw Weekly Pivot as Line?")
pivotlinewidth = input(3, minval=1, title="Line Width of Weekly Pivot")
switch3=input(true, title="Enable Bar Color?")

// Calculation
roundedweeklypivot = round ( security(tickerid,"W", hlc3[1]) )
monthlypivot = security(tickerid,"M", hlc3[1])
linestyle=switch2?line:circles

// Colors
weeklypivotcolor = close > roundedweeklypivot and close > monthlypivot ? green : close < roundedweeklypivot and close < monthlypivot ? red : blue
weeklypivotbgcolor = close > roundedweeklypivot and close > monthlypivot ? green : close < roundedweeklypivot and close < monthlypivot ? red : blue

// Output
plot(switch1?roundedweeklypivot:na, color=gray, title="Pivot", style = linestyle, linewidth = pivotlinewidth,transp=0)
barcolor(switch3?weeklypivotcolor:na)