커뮤니티

적용 가능하도록 부탁 드립니다.

프로필 이미지
다올
2024-04-03 23:45:15
1307
글번호 178257
답변완료
적용 가능하도록 전환 부탁 드립니다. 1; AvgLen = input(7, minval=1) hline(0, color=red, linestyle=line) xClose = close xOpen = open xVolume = volume nVolAccum = sum(iff(xClose > xOpen, xVolume, iff(xClose < xOpen, -xVolume, 0)) ,AvgLen) nRes = nVolAccum / AvgLen plot(nRes, color=blue, title="TFS", style = histogram) 2; length = input(24) src = input(hl2) showcross = input(true, "Show cross over/under") hma(_src, _length)=> wma((2 * wma(_src, _length / 2)) - wma(_src, _length), round(sqrt(_length))) hma3(_src, _length)=> p = length/2 wma(wma(close,p/3)*3 - wma(close,p/2) - wma(close,p),p) a = hma(src, length) b = hma3(src, length) c = b > a ? color.lime : color.red p1 = plot(a,color=c,linewidth=1,transp=75) p2 = plot(b,color=c,linewidth=1,transp=75) fill(p1,p2,color=c,transp=55) crossdn = a > b and a[1] < b[1] crossup = b > a and b[1] < a[1] plotshape(showcross and crossdn ? a : na, location=location.absolute, style=shape.labeldown, color=color.red, size=size.tiny, text="Sell", textcolor=color.white, transp=0, offset=-1) plotshape(showcross and crossup ? a : na, location=location.absolute, style=shape.labelup, color=color.green, size=size.tiny, text="Buy", textcolor=color.white, transp=0, offset=-1)
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2024-04-04 13:38:02

안녕하세요 예스스탁입니다. 1 input : AvgLen(7); var : xclose(0),xopen(0),xvolume(0),nVolAccum(0),nRes(0); PlotBaseLine1(0,"line",red); xClose = close; xOpen = open; xVolume = volume; nVolAccum = AccumN(iff(xClose > xOpen, xVolume, iff(xClose < xOpen, -xVolume, 0)) ,AvgLen); nRes = nVolAccum / AvgLen; plot1(nRes,"TFS",blue); 2 input : length(24); var :src(0),p(0),a(0),b(0),clr(0),tx(0); src = (h+l)/2; a = wma((2 * wma(src,length / 2)) - wma(src,length), round(sqrt(length),0)); p = length/2; b = wma(wma(close,p/3)*3 - wma(close,p/2) - wma(close,p),p); clr = iff(b > a , lime , red); plot1(a,"p1",clr); plot2(b,"p2",clr); if a > b and a[1] < b[1] Then { tx = text_new(sDate,sTime,L,"▲"); Text_SetStyle(tx,2,0); Text_SetColor(tx,Red); } if b > a and b[1] < a[1] Then { tx = text_new(sDate,sTime,H,"▼"); Text_SetStyle(tx,2,1); Text_SetColor(tx,Green); } 즐거운 하루되세요 > 다올 님이 쓴 글입니다. > 제목 : 적용 가능하도록 부탁 드립니다. > 적용 가능하도록 전환 부탁 드립니다. 1; AvgLen = input(7, minval=1) hline(0, color=red, linestyle=line) xClose = close xOpen = open xVolume = volume nVolAccum = sum(iff(xClose > xOpen, xVolume, iff(xClose < xOpen, -xVolume, 0)) ,AvgLen) nRes = nVolAccum / AvgLen plot(nRes, color=blue, title="TFS", style = histogram) 2; length = input(24) src = input(hl2) showcross = input(true, "Show cross over/under") hma(_src, _length)=> wma((2 * wma(_src, _length / 2)) - wma(_src, _length), round(sqrt(_length))) hma3(_src, _length)=> p = length/2 wma(wma(close,p/3)*3 - wma(close,p/2) - wma(close,p),p) a = hma(src, length) b = hma3(src, length) c = b > a ? color.lime : color.red p1 = plot(a,color=c,linewidth=1,transp=75) p2 = plot(b,color=c,linewidth=1,transp=75) fill(p1,p2,color=c,transp=55) crossdn = a > b and a[1] < b[1] crossup = b > a and b[1] < a[1] plotshape(showcross and crossdn ? a : na, location=location.absolute, style=shape.labeldown, color=color.red, size=size.tiny, text="Sell", textcolor=color.white, transp=0, offset=-1) plotshape(showcross and crossup ? a : na, location=location.absolute, style=shape.labelup, color=color.green, size=size.tiny, text="Buy", textcolor=color.white, transp=0, offset=-1)