커뮤니티

부틱드립니다

프로필 이미지
파생돌이
2024-09-29 20:03:48
787
글번호 183828
답변완료
수고하십니다 트레이딩 뷰 수식입니다. 예스로적용가능하도록 부탁 드립니다. 아래 뷰 수식을 제가 참조해서 해봤는데 //plots 부분 과 전체적으로 수정부탁드립니다 input ; g(0.75),ob(0.80),os(0.20),smooth(1),coloring(true); var : p(0),L0(0),L1(0),L2(0),L3(0),cu(0),cd(0); p = c L0 = 0.0 L1 = 0.0 L2 = 0.0 L3 = 0.0 L0 = (1 - g) * p + g * iff(IsNaN(L0[1])==False,L0[1],0); L1 = -g * L0 + iff(IsNaN(L0[1])==False,L0[1],0) + g * iff(IsNaN(L1[1])==False,L1[1],0); L2 = -g * L1 + iff(IsNaN(L1[1])==False,L1[1],0) + g * iff(IsNaN(L2[1])==False,L2[1],0); L3 = -g * L2 + iff(IsNaN(L2[1])==False,L2[1],0) + g * iff(IsNaN(L3[1])==False,L3[1],0); cu = IFf(L0 > L1 , L0 - L1 , 0) + IFf(L1 > L2 , L1 - L2 , 0) + IFf(L2 > L3 , L2 - L3 , 0); cd = IFf(L0 < L1 , L1 - L0 , 0) + IFf(L1 < L2 , L2 - L1 , 0) + IFf(L2 < L3 , L3 - L2 , 0); //plots lrsi = ema((cu + cd == 0 ? -1 : cu + cd) == -1 ? 0 : cu / (cu + cd == 0 ? -1 : cu + cd), smooth) col1 = lrsi > lrsi[1] and lrsi > os ? #00FF7B : lrsi < lrsi[1] and lrsi < ob ? #FF3571 : lrsi == lrsi ? #ECA700 : #ECA700 col2 = lrsi > lrsi[1] and lrsi > os ? #00FF7B : lrsi < lrsi[1] and lrsi < ob ? #FF3571 : lrsi < os ? #FF3571 : lrsi > ob ? #00FF7B : lrsi == lrsi ? #ECA700 : #ECA700 col = coloring ? col1 : col2 plot(lrsi, color=col, linewidth=2) ============================================================== //@version=4 study("laguerre RSI v4 | LK", overlay=false) //setups h = high l = low o = open c = close //inputs g = input(0.75, title="Gamma") ob = input(0.80, title="Over Bought") os = input(0.20, title="Over Sold") smooth = input(1, minval=1, title="Smoothing (1 = off)") coloring = input(true,title="3 colors?") //calc p = c L0 = 0.0 L1 = 0.0 L2 = 0.0 L3 = 0.0 L0 := (1 - g) * p + g * nz(L0[1]) L1 := -g * L0 + nz(L0[1]) + g * nz(L1[1]) L2 := -g * L1 + nz(L1[1]) + g * nz(L2[1]) L3 := -g * L2 + nz(L2[1]) + g * nz(L3[1]) cu = (L0 > L1 ? L0 - L1 : 0) + (L1 > L2 ? L1 - L2 : 0) + (L2 > L3 ? L2 - L3 : 0) cd = (L0 < L1 ? L1 - L0 : 0) + (L1 < L2 ? L2 - L1 : 0) + (L2 < L3 ? L3 - L2 : 0) //plots lrsi = ema((cu + cd == 0 ? -1 : cu + cd) == -1 ? 0 : cu / (cu + cd == 0 ? -1 : cu + cd), smooth) col1 = lrsi > lrsi[1] and lrsi > os ? #00FF7B : lrsi < lrsi[1] and lrsi < ob ? #FF3571 : lrsi == lrsi ? #ECA700 : #ECA700 col2 = lrsi > lrsi[1] and lrsi > os ? #00FF7B : lrsi < lrsi[1] and lrsi < ob ? #FF3571 : lrsi < os ? #FF3571 : lrsi > ob ? #00FF7B : lrsi == lrsi ? #ECA700 : #ECA700 col = coloring ? col1 : col2 plot(lrsi, color=col, linewidth=2)
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2024-09-30 13:17:05

안녕하세요 예스스탁입니다. //inputs input : g(0.75); input : ob(0.80); input : os(0.20); input : smooth(1);; input : coloring(true); var : p(0),l0(0), l1(0),l2(0),l3(0); var : cu(0),cd(0),lrsi(0),col1(0),col2(0),col(0); //calc p = c; L0 = 0.0; L1 = 0.0; L2 = 0.0; L3 = 0.0; L0 = (1 - g) * p + g * iff(IsNan(L0[1])==true,0,L0[1]); L1 = -g * L0 + iff(IsNan(L0[1])==true,0,L0[1]) + g * iff(IsNan(L1[1])==true,0,L1[1]); L2 = -g * L1 + iff(IsNan(L1[1])==true,0,L1[1]) + g * iff(IsNan(L2[1])==true,0,L2[1]); L3 = -g * L2 + iff(IsNan(L2[1])==true,0,L2[1]) + g * iff(IsNan(L3[1])==true,0,L3[1]); cu = IFf(L0 > L1 , L0 - L1 , 0) + IFf(L1 > L2 , L1 - L2 , 0) + IFf(L2 > L3 , L2 - L3 , 0); cd = IFf(L0 < L1 , L1 - L0 , 0) + IFf(L1 < L2 , L2 - L1 , 0) + IFf(L2 < L3 , L3 - L2 , 0); //plots lrsi = ema(iff(IFf(cu + cd == 0 , -1 , cu + cd) == -1 , 0 , cu) / IFf(cu + cd == 0 , -1 , cu + cd), smooth); col1 = IFF(lrsi > lrsi[1] and lrsi > os , lime , iff(lrsi < lrsi[1] and lrsi < ob , Red , iff(lrsi == lrsi , Gold , Gold))); col2 = IFF(lrsi > lrsi[1] and lrsi > os , Lime , iff(lrsi < lrsi[1] and lrsi < ob , Red , iff(lrsi < os , Red , iff(lrsi > ob , Lime , IFf(lrsi == lrsi , Yellow,Yellow))))); col = IFf(coloring , col1 , col2); plot1(lrsi,"LRSI",col); 즐거운 하루되세요 > 파생돌이 님이 쓴 글입니다. > 제목 : 부틱드립니다 > 수고하십니다 트레이딩 뷰 수식입니다. 예스로적용가능하도록 부탁 드립니다. 아래 뷰 수식을 제가 참조해서 해봤는데 //plots 부분 과 전체적으로 수정부탁드립니다 input ; g(0.75),ob(0.80),os(0.20),smooth(1),coloring(true); var : p(0),L0(0),L1(0),L2(0),L3(0),cu(0),cd(0); p = c L0 = 0.0 L1 = 0.0 L2 = 0.0 L3 = 0.0 L0 = (1 - g) * p + g * iff(IsNaN(L0[1])==False,L0[1],0); L1 = -g * L0 + iff(IsNaN(L0[1])==False,L0[1],0) + g * iff(IsNaN(L1[1])==False,L1[1],0); L2 = -g * L1 + iff(IsNaN(L1[1])==False,L1[1],0) + g * iff(IsNaN(L2[1])==False,L2[1],0); L3 = -g * L2 + iff(IsNaN(L2[1])==False,L2[1],0) + g * iff(IsNaN(L3[1])==False,L3[1],0); cu = IFf(L0 > L1 , L0 - L1 , 0) + IFf(L1 > L2 , L1 - L2 , 0) + IFf(L2 > L3 , L2 - L3 , 0); cd = IFf(L0 < L1 , L1 - L0 , 0) + IFf(L1 < L2 , L2 - L1 , 0) + IFf(L2 < L3 , L3 - L2 , 0); //plots lrsi = ema((cu + cd == 0 ? -1 : cu + cd) == -1 ? 0 : cu / (cu + cd == 0 ? -1 : cu + cd), smooth) col1 = lrsi > lrsi[1] and lrsi > os ? #00FF7B : lrsi < lrsi[1] and lrsi < ob ? #FF3571 : lrsi == lrsi ? #ECA700 : #ECA700 col2 = lrsi > lrsi[1] and lrsi > os ? #00FF7B : lrsi < lrsi[1] and lrsi < ob ? #FF3571 : lrsi < os ? #FF3571 : lrsi > ob ? #00FF7B : lrsi == lrsi ? #ECA700 : #ECA700 col = coloring ? col1 : col2 plot(lrsi, color=col, linewidth=2) ============================================================== //@version=4 study("laguerre RSI v4 | LK", overlay=false) //setups h = high l = low o = open c = close //inputs g = input(0.75, title="Gamma") ob = input(0.80, title="Over Bought") os = input(0.20, title="Over Sold") smooth = input(1, minval=1, title="Smoothing (1 = off)") coloring = input(true,title="3 colors?") //calc p = c L0 = 0.0 L1 = 0.0 L2 = 0.0 L3 = 0.0 L0 := (1 - g) * p + g * nz(L0[1]) L1 := -g * L0 + nz(L0[1]) + g * nz(L1[1]) L2 := -g * L1 + nz(L1[1]) + g * nz(L2[1]) L3 := -g * L2 + nz(L2[1]) + g * nz(L3[1]) cu = (L0 > L1 ? L0 - L1 : 0) + (L1 > L2 ? L1 - L2 : 0) + (L2 > L3 ? L2 - L3 : 0) cd = (L0 < L1 ? L1 - L0 : 0) + (L1 < L2 ? L2 - L1 : 0) + (L2 < L3 ? L3 - L2 : 0) //plots lrsi = ema((cu + cd == 0 ? -1 : cu + cd) == -1 ? 0 : cu / (cu + cd == 0 ? -1 : cu + cd), smooth) col1 = lrsi > lrsi[1] and lrsi > os ? #00FF7B : lrsi < lrsi[1] and lrsi < ob ? #FF3571 : lrsi == lrsi ? #ECA700 : #ECA700 col2 = lrsi > lrsi[1] and lrsi > os ? #00FF7B : lrsi < lrsi[1] and lrsi < ob ? #FF3571 : lrsi < os ? #FF3571 : lrsi > ob ? #00FF7B : lrsi == lrsi ? #ECA700 : #ECA700 col = coloring ? col1 : col2 plot(lrsi, color=col, linewidth=2)