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
Açık kaynak kodlu komut dosyası

Gerçek TradingView ruhuyla, bu betiğin yazarı, yatırımcının anlayabilmesi ve doğrulayabilmesi için onu açık kaynak olarak yayınladı. Yazarın eline sağlık! Bunu ücretsiz olarak kullanabilirsiniz, ancak bu kodun bir yayında yeniden kullanımı Kullanım Koşulları ile yönetilir. Bir grafikte kullanmak için favorilere ekleyebilirsiniz.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.

Bu komut dosyasını bir grafikte kullanmak ister misiniz?
//@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)