커뮤니티

wave 변환

프로필 이미지
고성
2026-10-13 09:50:19
69
글번호 233866
답변완료

트레이딩뷰, 변환 부탁드립니다.


indicator(title="WaveTrend with Crosses + HyperWave + Confluence Zones + Thresholds", shorttitle="SuperWaveTrend", overlay=false)


n1 = input.int(10, "Channel Length")

n2 = input.int(21, "Average Length")

obLevel1 = input.int(70, "Over Bought Level 1")

obLevel2 = input.int(50, "Over Bought Level 2")

osLevel1 = input.int(-70, "Over Sold Level 1")

osLevel2 = input.int(-50, "Over Sold Level 2")

hwDelta = input.int(20, "HyperWave Delta")

thresholdGap = input.float(5.0, "Threshold Gap")


ap = hlc3

esa = ta.ema(ap, n1)

d = ta.ema(math.abs(ap - esa), n1)

ci = (ap - esa) / (0.015 * d)

tci = ta.ema(ci, n2)

wt1 = tci

wt2 = ta.sma(wt1, 4)


hwUpper = obLevel1 + hwDelta

hwLower = osLevel1 - hwDelta

isHyperUp = wt1 > hwUpper

isHyperDown = wt1 < hwLower

bgcolor(isHyperUp ? color.new(color.fuchsia, 85) : na, title="HyperWave 上升?域")

bgcolor(isHyperDown ? color.new(color.orange, 85) : na, title="HyperWave 下降?域")

isConfluenceTop = wt1 > obLevel2 and wt1 > wt2

isConfluenceBottom = wt1 < osLevel2 and wt1 < wt2

bgcolor(isConfluenceTop ? color.new(#e7b323, 86) : na, title="Confluence ?部?域")

bgcolor(isConfluenceBottom ? color.new(#aacadd, 67) : na, title="Confluence 底部?域")

isInThreshold = math.abs(wt1 - wt2) < thresholdGap

bgcolor(isInThreshold ? color.new(#787b86, 98) : na, title="Threshold ?豫?域")


plot(0, color=color.gray, title="中??")

plot(obLevel1, color=color.rgb(251, 149, 149, 21), title="超?? 1")

plot(obLevel2, color=color.rgb(247, 124, 124), title="超?? 2")

plot(osLevel1, color=color.rgb(144, 167, 145), title="超?? 1")

plot(osLevel2, color=color.rgb(19, 111, 22), title="超?? 2")

plot(wt1, color=color.rgb(132, 210, 134), title="WT 主? (wt1)")

plot(wt2, color=color.rgb(253, 166, 166), title="WT 信?? (wt2)")

plot(wt1 - wt2, style=plot.style_area, color=color.new(color.blue, 80), title="WT 面?差 (wt1-wt2)")

isCross = ta.cross(wt1, wt2)

plot(isCross ? wt2 : na, color=color.black, style=plot.style_circles, linewidth=3, title="交叉点 - 底色")

plot(isCross ? wt2 : na, color=(wt2 - wt1 > 0 ? color.red : color.lime), style=plot.style_circles, linewidth=2, title="交叉点 - 方向色")

barcolor(isCross ? (wt2 - wt1 > 0 ? color.aqua : color.yellow) : na, title="交叉柱??色")

지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2026-10-13 10:28:40

안녕하세요 예스스탁입니다. input : n1(10); input : n2(21); input : obLevel1(70); input : obLevel2(50); input : osLevel1(-70); input : osLevel2(-50); input : hwDelta(20); input : thresholdGap(5.0); var : ap(0),esa(0),d(0),ci(0),tci(0),wt1(0),wt2(0); var : hwUpper(0),hwLower(0),isHyperUp(False),isHyperDown(False); var : isConfluenceTop(False),isConfluenceBottom(False),tx(0),box1(0),box2(0); ap = (h+l+c)/3; esa = ema(ap, n1); d = ema(abs(ap - esa), n1); ci = (ap - esa) / (0.015 * d); tci = ema(ci, n2); wt1 = tci; wt2 = ma(wt1, 4); hwUpper = obLevel1 + hwDelta; hwLower = osLevel1 - hwDelta; isHyperUp = wt1 > hwUpper; isHyperDown = wt1 < hwLower; isConfluenceTop = wt1 > obLevel2 and wt1 > wt2; isConfluenceBottom = wt1 < osLevel2 and wt1 < wt2; if isConfluenceTop Then { if isConfluenceTop[1] == False Then { box1 = Box_New_Self(sDate,sTime,100,NextBarSdate,NextBarStime,-100); Box_SetColor(box1,Yellow); Box_SetFill(box1,true); } Else { Box_SetEnd(box1,NextBarSdate,NextBarStime,-100); } } if isConfluenceBottom Then { if isConfluenceBottom[1] == False Then { box2 = Box_New_Self(sDate,sTime,100,NextBarSdate,NextBarStime,-100); Box_SetColor(box2,Gray); Box_SetFill(box2,true); } Else { Box_SetEnd(box2,NextBarSdate,NextBarStime,-100); } } plot1(0,"중심선",gray); plot2(obLevel1,"과매수1",rgb(251, 149, 149)); plot3(obLevel2,"과매수2",rgb(247, 124, 124)); plot4(osLevel1,"과매도1",rgb(144, 167, 145)); plot5(osLevel2,"과매도2",rgb(19, 111, 22)); plot6(wt1,"wt1",rgb(132, 210, 134)); plot7(wt2,"wt2",rgb(253, 166, 166)); plot8(wt1 - wt2,"wt1-wt2",blue); if CrossUp(wt1,wt2) Then { tx = Text_New_Self(sDate,sTime,wt2,"●"); Text_SetColor(tx,Green); Text_SetStyle(tx,2,2); } if CrossDown(wt1,wt2) Then { tx = Text_New_Self(sDate,sTime,wt2,"●"); Text_SetColor(tx,Red); Text_SetStyle(tx,2,2); } 즐거운 하루되세요