vdubus

Thermal Expansion Wave VDUB_v1

169
TEW_V1
*** Modified, Madrid Ma Ribbon, Mashup. Using three colours indicating thermal expansion zones using Hull ma for the pivot points.

開源腳本

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

免責聲明

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

想在圖表上使用此腳本?
//Modified Madrid MA ribbon///// 
study("Thermal Expansion Wave VDUB_v1", overlay=true, shorttitle="TEW_V1")
src = input(close, type="source")
fastLen = input(55, minval=1)
slowLen = input(1, minval=1)
ema = input(true, title="Exponential")
maColor(ma) =>change(ma,3)>=0?lime:red
fastMA = ema?ema(src, fastLen):sma(src, fastLen)
slowMA = ema?wma(src, slowLen):wma(src, slowLen)
fastUT = plot(fastMA>=slowMA?fastMA:na, color=maColor(fastMA), style=linebr, linewidth=4)
slowUT = plot(fastMA>=slowMA?slowMA:na, color=maColor(slowMA), style=linebr,linewidth=4)
fill(fastUT, slowUT, color=yellow, transp=1)

fastDT = plot(fastMA<slowMA?fastMA:na, color=maColor(fastMA), style=linebr,linewidth=4)
slowDT = plot(fastMA<slowMA?slowMA:na, color=maColor(slowMA), style=linebr,linewidth=4)
fill(fastDT, slowDT, color=lime, transp=1)
//----------------2/-------------------
src2 = input(close, type="source")
fastLen2 = input(55, minval=1)
slowLen2 = input(9, minval=1)
ema2 = input(true, title="Exponential")
maColor2(ma) =>change(ma,3)>=0?black:black
fastMA2 = ema2?ema(src2, fastLen2):sma(src2, fastLen2)
slowMA2 = ema2?ema(src2, slowLen2):ema(src2, slowLen2)
fastUT2 = plot(fastMA2>=slowMA2?fastMA2:na, color=maColor(fastMA2), style=linebr, linewidth=1)
slowUT2 = plot(fastMA2>=slowMA2?slowMA2:na, color=maColor(slowMA2), style=linebr,linewidth=1)
fill(fastUT2, slowUT2, color=blue, transp=60)

fastDT2 = plot(fastMA2<slowMA2?fastMA2:na, color=maColor(fastMA2), style=linebr,linewidth=1)
slowDT2 = plot(fastMA2<slowMA2?slowMA2:na, color=maColor(slowMA2), style=linebr,linewidth=1)
fill(fastDT2, slowDT2, color=blue, transp=60)
//-----------------3/--------------------
src3 = input(close, type="source")
fastLen3 = input(55, minval=1)
slowLen3 = input(24, minval=1)
ema3 = input(true, title="Exponential")
maColor3(ma) =>change(ma,3)>=0?black:black
fastMA3 = ema3?ema(src, fastLen3):sma(src3, fastLen3)
slowMA3 = ema3?wma(src, slowLen3):wma(src3, slowLen3)
fastUT3 = plot(fastMA3>=slowMA3?fastMA3:na, color=maColor3(fastMA3), style=linebr, linewidth=1)
slowUT3 = plot(fastMA3>=slowMA3?slowMA3:na, color=maColor3(slowMA3), style=linebr,linewidth=1)
fill(fastUT3, slowUT3, color=black, transp=1)

fastDT3 = plot(fastMA3<slowMA3?fastMA3:na, color=maColor3(fastMA3), style=linebr,linewidth=1)
slowDT3 = plot(fastMA3<slowMA3?slowMA3:na, color=maColor3(slowMA3), style=linebr,linewidth=1)
fill(fastDT3, slowDT3, color=black, transp=1)
//=============Hull MA//
show_hma = input(true, title="Display Hull MA Set:")
hma_src = input(close, title="Hull MA's Source:")
hma_base_length = input(1, minval=1, title="Hull MA's Base Length:")
hma_length_scalar = input(6, minval=0, title="Hull MA's Length Scalar:")
hullma(src, length)=>wma(2*wma(src, length/2)-wma(src, length), round(sqrt(length)))
plot(not show_hma ? na : hullma(hma_src, hma_base_length+hma_length_scalar*6), color=black, linewidth=4, title="Hull MA 7:")
//===============================================