Madrid

Madrid Donchian Bar

This is the companion bar of the Donchian Channel study. This bar at the bottom of the screen depicts the detrended position of the closing price. This is useful to reduce clutter on the screen and locate the position of the closing price at a glance.
Lime ; Extremely Bullish
Green : Bullish
Maroon : Bearish
Red : Extremely Bearish

開源腳本

本著真正的TradingView精神,該腳本的作者將其開源發布,以便交易者可以理解和驗證它。為作者喝彩吧!您可以免費使用它,但在出版物中重複使用此代碼受網站規則的約束。 您可以收藏它以在圖表上使用。

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。

想在圖表上使用此腳本?
// Hector R. Madrid : 15/JUN/2014 : 23:07 : 2.0 : Madrid Donchian Bar
study("Madrid Donchian Bar", shorttitle="MDonchianBar")

len = input(13)

src = close

highestBar=highest(high, len)
lowestBar=lowest(low, len)
midBar=(highestBar+lowestBar)/2

// Donchian Indicator
mdcb = (src-midBar)/(highestBar-lowestBar)
ceilFloor = mdcb<-0.25 ? -0.5 : mdcb<0 ? -0.25 : mdcb<0.25 ? 0.25 : 0.5

ceilFloorColor = ceilFloor==-0.50 ? red
               : ceilFloor==-0.25 ? maroon
               : ceilFloor==0.25  ? green 
               : ceilFloor==0.50  ? lime
               : yellow               
               
// output
plot(1, linewidth=3, style=columns, color=ceilFloorColor, transp=30)