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.

Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?
//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:")
//===============================================