커뮤니티

문의드립니다.

프로필 이미지
골드드래곤
2021-02-19 14:59:00
473
글번호 146443
답변완료
var : T(0),L1(0),L1i(0),H1(0),H1i(0); var : L2(0),L2i(0),H2(0),H2i(0),HL(0),HLi(0); if L < Lowest(L,30)[1] Then { Condition1 = true; T = 0; L1 = L; # L1 - 30일 최저점 L1i = index; H1 = 0; # H1 - 1파고점 H1i = index; L2 = 0; L2i = Index; H2 = 0; H2i = Index; HL = 0; HLi = Index; } if Condition1 == true then { if T == 0 then { if index > L1i && (H1 == 0 or (H1 > 0 and H > H1)) Then { H1 = H; H1i = index; } if index > H1i and H1 >= L1*1.2 and H1 <= L1*2 and # 상승폭이 +20% ~ 60% L < H1-(H1-L1)*0.6 Then # 조정폭 0.6 { T = 1; L2 = 0; L2i = index; H2 = 0; H2i = index; HL = 0; HLi = Index; } } if T == 1 Then { if Index > L2i and (L2 == 0 or (L2 > 0 and L < L2)) Then { L2 = L; H2 = 0; H2i = index; HL = 0; HLi = Index; } if Index > H2i and (H2 == 0 or (H2 > 0 and H > H2)) Then { H2 = h; HL = 0; HLi = Index; if H2 > H1 Then T = 2; } if L < L1 Then { T = 0; L1 = 0; H1 = 0; L2 = 0; H2 = 0; HL = 0; } } if T == 2 Then { if H > H2 then { H2 = H; HL = 0; HLi = Index; } if Index > HLi and (HL == 0 or (HL > 0 and L < HL)) Then { HL = L; HLi = Index; } if L < L1 Then { T = 0; L1 = 0; H1 = 0; L2 = 0; H2 = 0; HL = 0; } } if L1 > 0 Then plot1(L1,"L1"); if H1 > 0 Then plot2(h1,"h1"); if L2 > 0 Then plot3(L2,"L2"); if H2 > 0 and H2 > H1 Then plot4(H2,"H2"); # if HL > 0 Then # plot5(HL,"HL"); } 안녕하세요. 위 수식을 출력하면 노랑동그라미 봉의 저점에서 L2 출력조건 L < H1-(H1-L1)*0.6을 만족하는데 L2가 출력되지 않고 다음봉의 저점에서 출력됩니다. 수식 수정 부탁드립니다.
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2021-02-19 14:08:36

안녕하세요 예스스탁입니다. if index > H1i and H1 >= L1*1.2 and H1 <= L1*2 and # 상승폭이 +20% ~ 60% L < H1-(H1-L1)*0.6 Then # 조정폭 0.6 { T = 1; L2 = 0; L2i = index; L2가 위 조건만족후에 다음봉부터 체크하게 되어 있습니다. 모든 고저점이 발생하면 그 봉 다음봉부터 체크합니다. if T == 1 Then { if Index >= L2i and (L2 == 0 or (L2 > 0 and L < L2)) Then { 위와 같이 index >= L2i로 지정하시면 해당봉부터 체크하게 됩니다. 이부분은 수식의 모든 조건내용이 동일합니다. var : T(0),L1(0),L1i(0),H1(0),H1i(0); var : L2(0),L2i(0),H2(0),H2i(0),HL(0),HLi(0); if L < Lowest(L,30)[1] Then { Condition1 = true; T = 0; L1 = L; # L1 - 30일 최저점 L1i = index; H1 = 0; # H1 - 1파고점 H1i = index; L2 = 0; L2i = Index; H2 = 0; H2i = Index; HL = 0; HLi = Index; } if Condition1 == true then { if T == 0 then { if index > L1i && (H1 == 0 or (H1 > 0 and H > H1)) Then { H1 = H; H1i = index; } if index > H1i and H1 >= L1*1.2 and H1 <= L1*2 and # 상승폭이 +20% ~ 60% L < H1-(H1-L1)*0.6 Then # 조정폭 0.6 { T = 1; L2 = 0; L2i = index; H2 = 0; H2i = index; HL = 0; HLi = Index; } } if T == 1 Then { if Index >= L2i and (L2 == 0 or (L2 > 0 and L < L2)) Then { L2 = L; H2 = 0; H2i = index; HL = 0; HLi = Index; } if Index > H2i and (H2 == 0 or (H2 > 0 and H > H2)) Then { H2 = h; HL = 0; HLi = Index; if H2 > H1 Then T = 2; } if L < L1 Then { T = 0; L1 = 0; H1 = 0; L2 = 0; H2 = 0; HL = 0; } } if T == 2 Then { if H > H2 then { H2 = H; HL = 0; HLi = Index; } if Index > HLi and (HL == 0 or (HL > 0 and L < HL)) Then { HL = L; HLi = Index; } if L < L1 Then { T = 0; L1 = 0; H1 = 0; L2 = 0; H2 = 0; HL = 0; } } if L1 > 0 Then plot1(L1,"L1"); if H1 > 0 Then plot2(h1,"h1"); if L2 > 0 Then plot3(L2,"L2"); if H2 > 0 and H2 > H1 Then plot4(H2,"H2"); # if HL > 0 Then # plot5(HL,"HL"); } 즐거운 하루되세요 > 골드드래곤 님이 쓴 글입니다. > 제목 : 문의드립니다. > var : T(0),L1(0),L1i(0),H1(0),H1i(0); var : L2(0),L2i(0),H2(0),H2i(0),HL(0),HLi(0); if L < Lowest(L,30)[1] Then { Condition1 = true; T = 0; L1 = L; # L1 - 30일 최저점 L1i = index; H1 = 0; # H1 - 1파고점 H1i = index; L2 = 0; L2i = Index; H2 = 0; H2i = Index; HL = 0; HLi = Index; } if Condition1 == true then { if T == 0 then { if index > L1i && (H1 == 0 or (H1 > 0 and H > H1)) Then { H1 = H; H1i = index; } if index > H1i and H1 >= L1*1.2 and H1 <= L1*2 and # 상승폭이 +20% ~ 60% L < H1-(H1-L1)*0.6 Then # 조정폭 0.6 { T = 1; L2 = 0; L2i = index; H2 = 0; H2i = index; HL = 0; HLi = Index; } } if T == 1 Then { if Index > L2i and (L2 == 0 or (L2 > 0 and L < L2)) Then { L2 = L; H2 = 0; H2i = index; HL = 0; HLi = Index; } if Index > H2i and (H2 == 0 or (H2 > 0 and H > H2)) Then { H2 = h; HL = 0; HLi = Index; if H2 > H1 Then T = 2; } if L < L1 Then { T = 0; L1 = 0; H1 = 0; L2 = 0; H2 = 0; HL = 0; } } if T == 2 Then { if H > H2 then { H2 = H; HL = 0; HLi = Index; } if Index > HLi and (HL == 0 or (HL > 0 and L < HL)) Then { HL = L; HLi = Index; } if L < L1 Then { T = 0; L1 = 0; H1 = 0; L2 = 0; H2 = 0; HL = 0; } } if L1 > 0 Then plot1(L1,"L1"); if H1 > 0 Then plot2(h1,"h1"); if L2 > 0 Then plot3(L2,"L2"); if H2 > 0 and H2 > H1 Then plot4(H2,"H2"); # if HL > 0 Then # plot5(HL,"HL"); } 안녕하세요. 위 수식을 출력하면 노랑동그라미 봉의 저점에서 L2 출력조건 L < H1-(H1-L1)*0.6을 만족하는데 L2가 출력되지 않고 다음봉의 저점에서 출력됩니다. 수식 수정 부탁드립니다.