커뮤니티

수식변경 부탁합니다

프로필 이미지
as8282
2025-08-26 10:50:09
102
글번호 193508
답변완료
트뷰지표인데 예스로 부탁합니다. indicator("VWAP % Change with SMA", overlay=false) smaPeriod = input.int(20, minval=1, title="SMA Period") vwap_val = ta.vwap vwap_roc = ta.roc(vwap_val, 1) // Conditional coloring for columns barcolor = vwap_roc >= 0? color.green: color.red plot(vwap_roc, color=barcolor, title="VWAP % Change", style=plot.style_columns, linewidth=2) // SMA on VWAP % Change with input period smaLine = ta.sma(vwap_roc, smaPeriod) plot(smaLine, color=color.blue, linewidth=2, title="SMA")
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2025-08-26 15:45:39

안녕하세요 예스스탁입니다. input : smaPeriod(20); var : vwap_val(0),vwap_roc(0),smaLine(0),barcolor(0); if bDate != bDate[1] Then { var1 = 0; var2 = 0; } var1 = var1 + ((h+L+C)/3)*V; var2 = var2 + V; vwap_val = var1/var2; vwap_roc = (vwap_val-vwap_val[1])/vwap_val[1]*100; smaLine = ma(vwap_roc, smaPeriod); barcolor = iff(vwap_roc >= 0 , green , red); plot1(vwap_roc,"VWAP % Change",barcolor); plot2(smaLine, "SMA",blue); 즐거운 하루되세요 > as8282 님이 쓴 글입니다. > 제목 : 수식변경 부탁합니다 > 트뷰지표인데 예스로 부탁합니다. indicator("VWAP % Change with SMA", overlay=false) smaPeriod = input.int(20, minval=1, title="SMA Period") vwap_val = ta.vwap vwap_roc = ta.roc(vwap_val, 1) // Conditional coloring for columns barcolor = vwap_roc >= 0? color.green: color.red plot(vwap_roc, color=barcolor, title="VWAP % Change", style=plot.style_columns, linewidth=2) // SMA on VWAP % Change with input period smaLine = ta.sma(vwap_roc, smaPeriod) plot(smaLine, color=color.blue, linewidth=2, title="SMA")