커뮤니티

부탁드립니다

프로필 이미지
기찬주
2024-01-13 12:12:52
689
글번호 175712
답변완료
안녕하세요. 항상 큰 도움 주셔서 감사드립니다. 아래의 TV지표를 YS지표로 사용하고 싶습니다. study(title = "Volume Flow Indicator [LazyBear]", shorttitle="VFI_LB") length = input(130, title="VFI length") coef = input(0.2) vcoef = input(2.5, title="Max. vol. cutoff") signalLength=input(5) smoothVFI=input(false, type=bool) ma(x,y) => smoothVFI ? sma(x,y) : x typical=hlc3 inter = log( typical ) - log( typical[1] ) vinter = stdev(inter, 30 ) cutoff = coef * vinter * close vave = sma( volume, length )[1] vmax = vave * vcoef vc = iff(volume < vmax, volume, vmax) //min( volume, vmax ) mf = typical - typical[1] vcp = iff( mf > cutoff, vc, iff ( mf < -cutoff, -vc, 0 ) ) vfi = ma(sum( vcp , length )/vave, 3) vfima=ema( vfi, signalLength ) d=vfi-vfima plot(0, color=gray, style=3) showHisto=input(false, type=bool) plot(showHisto ? d : na, style=histogram, color=gray, linewidth=3, transp=50) plot( vfima , title="EMA of vfi", color=orange) plot( vfi, title="vfi", color=green,linewidth=2)
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2024-01-15 15:39:04

안녕하세요 예스스탁입니다. input : length(130); input : coef(0.2); input : vcoef(2.5); input : signalLength(5); input : smoothVFI(false); var : typical(0),inter(0),vinter(0),cutoff(0); var : vave(0),vmax(0),vc(0),mf(0),vcp(0); var : vfi(0),vfima(0),dd(0); #if smoothVFI = =true Then # ma(x,y) => smoothVFI ? sma(x,y) : x typical=(h+l+c)/3; inter = log( typical ) - log( typical[1] ); vinter = std(inter, 30 ); cutoff = coef * vinter * close; vave = ma( volume, length )[1]; vmax = vave * vcoef; vc = iff(volume < vmax, volume, vmax); //min( volume, vmax ) mf = typical - typical[1]; vcp = iff( mf > cutoff, vc, iff ( mf < -cutoff, -vc, 0 ) ); if smoothVFI == true Then vfi = ma(AccumN( vcp , length )/vave, 3); Else vfi = AccumN( vcp , length )/vave; vfima=ema( vfi, signalLength ); dd=vfi-vfima; plot1(dd,"d",gray); plot2(vfima , "EMA of vfi",orange); plot3(vfi, "vfi",green); PlotBaseLine1(0,"0",gray); 즐거운 하루되세요 > 기찬주 님이 쓴 글입니다. > 제목 : 부탁드립니다 > 안녕하세요. 항상 큰 도움 주셔서 감사드립니다. 아래의 TV지표를 YS지표로 사용하고 싶습니다. study(title = "Volume Flow Indicator [LazyBear]", shorttitle="VFI_LB") length = input(130, title="VFI length") coef = input(0.2) vcoef = input(2.5, title="Max. vol. cutoff") signalLength=input(5) smoothVFI=input(false, type=bool) ma(x,y) => smoothVFI ? sma(x,y) : x typical=hlc3 inter = log( typical ) - log( typical[1] ) vinter = stdev(inter, 30 ) cutoff = coef * vinter * close vave = sma( volume, length )[1] vmax = vave * vcoef vc = iff(volume < vmax, volume, vmax) //min( volume, vmax ) mf = typical - typical[1] vcp = iff( mf > cutoff, vc, iff ( mf < -cutoff, -vc, 0 ) ) vfi = ma(sum( vcp , length )/vave, 3) vfima=ema( vfi, signalLength ) d=vfi-vfima plot(0, color=gray, style=3) showHisto=input(false, type=bool) plot(showHisto ? d : na, style=histogram, color=gray, linewidth=3, transp=50) plot( vfima , title="EMA of vfi", color=orange) plot( vfi, title="vfi", color=green,linewidth=2)