커뮤니티

문의드립니다.

프로필 이미지
로즈버드
2021-04-20 20:41:24
631
글번호 148235
답변완료
예스랭귀지로 변환 부탁드릴 수 있을까요 항상 도움주셔서 감사드립니다. src=close sm =input(21, title="Smoothing Period") cd = input(0.4, title="Constant D") ebc=input(false, title="Color Bars") ribm=input(false, title="Ribbon Mode") di = (sm - 1.0) / 2.0 + 1.0 c1 = 2 / (di + 1.0) c2 = 1 - c1 c3 = 3.0 * (cd * cd + cd * cd * cd) c4 = -3.0 * (2.0 * cd * cd + cd + cd * cd * cd) c5 = 3.0 * cd + 1.0 + cd * cd * cd + 3.0 * cd * cd i1 = c1*src + c2*nz(i1[1]) i2 = c1*i1 + c2*nz(i2[1]) i3 = c1*i2 + c2*nz(i3[1]) i4 = c1*i3 + c2*nz(i4[1]) i5 = c1*i4 + c2*nz(i5[1]) i6 = c1*i5 + c2*nz(i6[1]) bfr = -cd*cd*cd*i6 + c3*(i5) + c4*(i4) + c5*(i3) // -------------------------------------------------------------------------- // For the Pinescrip coders: Determining trend based on the mintick step. // -------------------------------------------------------------------------- //bfrC = bfr - nz(bfr[1]) > syminfo.mintick ? green : bfr - nz(bfr[1]) < syminfo.mintick ? red : blue bfrC = bfr > nz(bfr[1]) ? green : bfr < nz(bfr[1]) ? red : blue tc=ebc?gray:bfrC plot(ribm?na:bfr, title="Trend", linewidth=3, style=circles, color=tc) bgcolor(ribm?bfrC:na, transp=50) barcolor(ebc?bfrC:na)
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2021-04-21 14:19:08

안녕하세요 예스스탁입니다. 1 지표 input : sm(21),cd(0.4); var : src(0),di(0),c1(0),c2(0),c3(0),c4(0),c5(0); var : i1(0),i2(0),i3(0),i4(0),i5(0),i6(0),bfr(0),bfrc(0),tc(0); src = close; di = (sm - 1.0) / 2.0 + 1.0; c1 = 2 / (di + 1.0); c2 = 1 - c1; c3 = 3.0 * (cd * cd + cd * cd * cd); c4 = -3.0 * (2.0 * cd * cd + cd + cd * cd * cd); c5 = 3.0 * cd + 1.0 + cd * cd * cd + 3.0 * cd * cd; if CurrentBar >= 1 Then { i1 = c1*src + c2*i1[1]; i2 = c1*i1 + c2*i2[1]; i3 = c1*i2 + c2*i3[1]; i4 = c1*i3 + c2*i4[1]; i5 = c1*i4 + c2*i5[1]; i6 = c1*i5 + c2*i6[1]; bfr = -cd*cd*cd*i6 + c3*(i5) + c4*(i4) + c5*(i3); bfrC = iff(bfr > bfr[1], green,iff(bfr < bfr[1], red , blue)); plot1(bfr,"Trend",bfrC); } 2 강조 input : sm(21),cd(0.4); var : src(0),di(0),c1(0),c2(0),c3(0),c4(0),c5(0); var : i1(0),i2(0),i3(0),i4(0),i5(0),i6(0),bfr(0),bfrc(0),tc(0); src = close; di = (sm - 1.0) / 2.0 + 1.0; c1 = 2 / (di + 1.0); c2 = 1 - c1; c3 = 3.0 * (cd * cd + cd * cd * cd); c4 = -3.0 * (2.0 * cd * cd + cd + cd * cd * cd); c5 = 3.0 * cd + 1.0 + cd * cd * cd + 3.0 * cd * cd; if CurrentBar >= 1 Then { i1 = c1*src + c2*i1[1]; i2 = c1*i1 + c2*i2[1]; i3 = c1*i2 + c2*i3[1]; i4 = c1*i3 + c2*i4[1]; i5 = c1*i4 + c2*i5[1]; i6 = c1*i5 + c2*i6[1]; bfr = -cd*cd*cd*i6 + c3*(i5) + c4*(i4) + c5*(i3); bfrC = iff(bfr > bfr[1], green,iff(bfr < bfr[1], red , blue)); PlotPaintBar(h,L,"강조",bfrc); } 즐거운 하루되세요 > 로즈버드 님이 쓴 글입니다. > 제목 : 문의드립니다. > 예스랭귀지로 변환 부탁드릴 수 있을까요 항상 도움주셔서 감사드립니다. src=close sm =input(21, title="Smoothing Period") cd = input(0.4, title="Constant D") ebc=input(false, title="Color Bars") ribm=input(false, title="Ribbon Mode") di = (sm - 1.0) / 2.0 + 1.0 c1 = 2 / (di + 1.0) c2 = 1 - c1 c3 = 3.0 * (cd * cd + cd * cd * cd) c4 = -3.0 * (2.0 * cd * cd + cd + cd * cd * cd) c5 = 3.0 * cd + 1.0 + cd * cd * cd + 3.0 * cd * cd i1 = c1*src + c2*nz(i1[1]) i2 = c1*i1 + c2*nz(i2[1]) i3 = c1*i2 + c2*nz(i3[1]) i4 = c1*i3 + c2*nz(i4[1]) i5 = c1*i4 + c2*nz(i5[1]) i6 = c1*i5 + c2*nz(i6[1]) bfr = -cd*cd*cd*i6 + c3*(i5) + c4*(i4) + c5*(i3) // -------------------------------------------------------------------------- // For the Pinescrip coders: Determining trend based on the mintick step. // -------------------------------------------------------------------------- //bfrC = bfr - nz(bfr[1]) > syminfo.mintick ? green : bfr - nz(bfr[1]) < syminfo.mintick ? red : blue bfrC = bfr > nz(bfr[1]) ? green : bfr < nz(bfr[1]) ? red : blue tc=ebc?gray:bfrC plot(ribm?na:bfr, title="Trend", linewidth=3, style=circles, color=tc) bgcolor(ribm?bfrC:na, transp=50) barcolor(ebc?bfrC:na)