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
Open-source Skript

Ganz im Spirit von TradingView hat der Autor dieses Skripts es als Open-Source veröffentlicht, damit Trader es besser verstehen und überprüfen können. Herzlichen Glückwunsch an den Autor! Sie können es kostenlos verwenden, aber die Wiederverwendung dieses Codes in einer Veröffentlichung unterliegt den Hausregeln. Sie können es als Favoriten auswählen, um es in einem Chart zu verwenden.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.

Möchten Sie dieses Skript auf einem Chart verwenden?
//@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)