repaint = input(true, 'Repainting Smoothing', tooltip = 'Repainting is an effect where the indicators historical output is subject to change over time. Disabling repainting will cause the indicator to output the endpoints of the calculations')
//-----------------------------------------------------------------------------} //Append lines //-----------------------------------------------------------------------------{ n = bar_index
var ln = array.new_line(0)
if barstate.isfirst and repaint for i = 0 to 499 array.push(ln,line.new(na,na,na,na))
//-----------------------------------------------------------------------------} //End point method //-----------------------------------------------------------------------------{ var coefs = array.new_float(0) var den = 0.
if barstate.isfirst and not repaint for i = 0 to 499 w = gauss(i, h) coefs.push(w)
den := coefs.sum()
out = 0. if not repaint for i = 0 to 499 out += src * coefs.get(i) out /= den mae = ta.sma(math.abs(src - out), 499) * mult
upper = out + mae lower = out - mae
//-----------------------------------------------------------------------------} //Compute and display NWE //-----------------------------------------------------------------------------{ float y2 = na float y1 = na
nwe = array.new<float>(0) if barstate.islast and repaint sae = 0. //Compute and set NWE point for i = 0 to math.min(499,n - 1) sum = 0. sumw = 0. //Compute weighted mean for j = 0 to math.min(499,n - 1) w = gauss(i - j, h) sum += src[j] * w sumw += w
진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.
차트에 이 스크립트를 사용하시겠습니까?
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.