Kurbelklaus

KK_Price Action Channel (TDI BH)

Hey guys,

this little script is an addition to another one I will release right after this.

This is the Price Action Channel. The bands are calculated using a smoothed moving average of the highs/lows. I have taken the smoothed moving average script from the public library in order to create this, so all props to whoever created that one.

I am fairly new to creating scripts so use it with caution and let me know what you think!

EDIT: Here is the script I have written this one for:
開源腳本

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

免責聲明

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

想在圖表上使用此腳本?
//author: Kurbelklaus
//Code for the smoothed moving average taken from the public library
study(title = "KK_Price Action Channel", shorttitle="PAC", overlay=true)
srcH = high
srcL = low
lenH = input(5, minval=1, title="Length High")
lenL = input(5, minval=1, title="Length Low")
smmaH = na(smmaH[1]) ? sma(srcH, lenH) : (smmaH[1] * (lenH - 1) + srcH) / lenH
smmaL = na(smmaL[1]) ? sma(srcL, lenL) : (smmaL[1] * (lenL - 1) + srcL) / lenL
plot(smmaH, color=blue)
plot(smmaL, color=blue)