커뮤니티

부탁 드립니다.

프로필 이미지
yes
2018-07-10 17:33:18
147
글번호 120436
답변완료
도움주심에 감사 합니다. 58519번에서 답변주신 수식 입니다. 여기에서 우측으로 수평선을 그을때 조건 1개를 더 추가 부탁드리고자 합니다. 예를들어 연속양봉 또는 음봉이 3개이상 지속되고(기존조건) 그것을 합한 높이가 과거100개봉 평균값의 5배이상일때만 우측으로 수평선을 긋도록 부탁 드립니다. 미리 감사 드립니다. var : T(0),cnt1(0),d1(0),t1(0),h1(0),l1(0); var : cnt2(0),d2(0),t2(0),h2(0),l2(0); var : tl11(0),tl12(0),tl13(0),tl14(0); var : tl21(0),tl22(0),tl23(0),tl24(0); if C > O Then T = 1; if C < O Then T = -1; if T == 1 and T[1] != 1 Then { cnt1 = 0; d1 = sdate; t1 = stime; h1 = H; l1 = L; } if T == 1 Then { cnt1 = cnt1+1; if h > h1 Then h1 = h; if l < l1 Then l1 = l; } if T == -1 and T[1] != -1 Then { cnt2 = 0; d2 = sdate; t2 = stime; h2 = H; l2 = L; } if T == -1 Then { cnt2 = cnt2+1; if h > h2 Then h2 = h; if l < l2 Then l2 = l; } if T != 1 and T[1] == 1 and cnt1[1] >= 3 and C[1] > O[1] Then { var1 = h1; TL_SetEnd(tl11[1],sdate[cnt1+1],stime[cnt1+1],var1[1]); tl11 = TL_New(d1,t1,h1,sdate[1],stime[1],h1); tl12 = TL_New(d1,t1,l1,sdate[1],stime[1],l1); tl13 = TL_New(d1,t1,h1,d1,t1,l1); tl14 = TL_New(sdate[1],stime[1],h1,sdate[1],stime[1],l1); TL_SetColor(Tl11,RED); TL_SetColor(Tl12,RED); TL_SetColor(Tl13,RED); TL_SetColor(Tl14,RED); } Else TL_SetEnd(tl11,sdate,stime,var1); if T != -1 and T[1] == -1 and cnt2[1] >= 3 and C[1] < O[1] then { var2 = l2; TL_SetEnd(tl22[1],sdate[cnt2+1],stime[cnt2+1],var2[1]); tl21 = TL_New(d2,t2,h2,sdate[1],stime[1],h2); tl22 = TL_New(d2,t2,l2,sdate[1],stime[1],l2); tl23 = TL_New(d2,t2,h2,d2,t2,l2); tl24 = TL_New(sdate[1],stime[1],h2,sdate[1],stime[1],l2); TL_SetColor(Tl21,BLUE); TL_SetColor(Tl22,BLUE); TL_SetColor(Tl23,BLUE); TL_SetColor(Tl24,BLUE); } Else TL_SetEnd(tl22,sdate,stime,var2); 참고수식) var1 = iff(C>O,abs(C-O),0); var2 = AccumN(var1,100); var3 = countif(C>O,100); var4 = var2/var3; if C > O and abs(C-O) >= var4*3 Then { value1 = c; } if C < O and abs(C-O) >= var4*3 Then { value2 = c; }
지표
답변 5
프로필 이미지

예스스탁 예스스탁 답변

2018-07-11 13:31:33

안녕하세요 예스스탁입니다. var : T(0),cnt1(0),d1(0),t1(0),h1(0),l1(0); var : cnt2(0),d2(0),t2(0),h2(0),l2(0); var : tl11(0),tl12(0),tl13(0),tl14(0); var : tl21(0),tl22(0),tl23(0),tl24(0); var : v1(0),v2(0),v3(0),v4(0); v1 = iff(C>O,abs(C-O),0); v2 = AccumN(v1,100); v3 = countif(C>O,100); v4 = v2/v3; if C > O Then T = 1; if C < O Then T = -1; if T == 1 and T[1] != 1 Then { cnt1 = 0; d1 = sdate; t1 = stime; h1 = H; l1 = L; } if T == 1 Then { cnt1 = cnt1+1; if h > h1 Then h1 = h; if l < l1 Then l1 = l; } if T == -1 and T[1] != -1 Then { cnt2 = 0; d2 = sdate; t2 = stime; h2 = H; l2 = L; } if T == -1 Then { cnt2 = cnt2+1; if h > h2 Then h2 = h; if l < l2 Then l2 = l; } if T != 1 and T[1] == 1 and cnt1[1] >= 3 and C[1] > O[1] Then { var1 = h1; TL_SetEnd(tl11[1],sdate[cnt1+1],stime[cnt1+1],var1[1]); tl11 = TL_New(d1,t1,h1,sdate[1],stime[1],h1); tl12 = TL_New(d1,t1,l1,sdate[1],stime[1],l1); tl13 = TL_New(d1,t1,h1,d1,t1,l1); tl14 = TL_New(sdate[1],stime[1],h1,sdate[1],stime[1],l1); TL_SetColor(Tl11,RED); TL_SetColor(Tl12,RED); TL_SetColor(Tl13,RED); TL_SetColor(Tl14,RED); Condition1 = false; if h1-l1 >= v4*5 Then Condition1 = true; } Else { if Condition1 == true then { TL_SetEnd(tl11,sdate,stime,var1); } } if T != -1 and T[1] == -1 and cnt2[1] >= 3 and C[1] < O[1] then { var2 = l2; TL_SetEnd(tl22[1],sdate[cnt2+1],stime[cnt2+1],var2[1]); tl21 = TL_New(d2,t2,h2,sdate[1],stime[1],h2); tl22 = TL_New(d2,t2,l2,sdate[1],stime[1],l2); tl23 = TL_New(d2,t2,h2,d2,t2,l2); tl24 = TL_New(sdate[1],stime[1],h2,sdate[1],stime[1],l2); TL_SetColor(Tl21,BLUE); TL_SetColor(Tl22,BLUE); TL_SetColor(Tl23,BLUE); TL_SetColor(Tl24,BLUE); Condition2 = false; if h2-l2 >= v4*5 Then Condition2 = true; } Else { if Condition2 == true then { TL_SetEnd(tl22,sdate,stime,var2); } } 즐거운 하루되세요 > yes 님이 쓴 글입니다. > 제목 : 부탁 드립니다. > 도움주심에 감사 합니다. 58519번에서 답변주신 수식 입니다. 여기에서 우측으로 수평선을 그을때 조건 1개를 더 추가 부탁드리고자 합니다. 예를들어 연속양봉 또는 음봉이 3개이상 지속되고(기존조건) 그것을 합한 높이가 과거100개봉 평균값의 5배이상일때만 우측으로 수평선을 긋도록 부탁 드립니다. 미리 감사 드립니다. var : T(0),cnt1(0),d1(0),t1(0),h1(0),l1(0); var : cnt2(0),d2(0),t2(0),h2(0),l2(0); var : tl11(0),tl12(0),tl13(0),tl14(0); var : tl21(0),tl22(0),tl23(0),tl24(0); if C > O Then T = 1; if C < O Then T = -1; if T == 1 and T[1] != 1 Then { cnt1 = 0; d1 = sdate; t1 = stime; h1 = H; l1 = L; } if T == 1 Then { cnt1 = cnt1+1; if h > h1 Then h1 = h; if l < l1 Then l1 = l; } if T == -1 and T[1] != -1 Then { cnt2 = 0; d2 = sdate; t2 = stime; h2 = H; l2 = L; } if T == -1 Then { cnt2 = cnt2+1; if h > h2 Then h2 = h; if l < l2 Then l2 = l; } if T != 1 and T[1] == 1 and cnt1[1] >= 3 and C[1] > O[1] Then { var1 = h1; TL_SetEnd(tl11[1],sdate[cnt1+1],stime[cnt1+1],var1[1]); tl11 = TL_New(d1,t1,h1,sdate[1],stime[1],h1); tl12 = TL_New(d1,t1,l1,sdate[1],stime[1],l1); tl13 = TL_New(d1,t1,h1,d1,t1,l1); tl14 = TL_New(sdate[1],stime[1],h1,sdate[1],stime[1],l1); TL_SetColor(Tl11,RED); TL_SetColor(Tl12,RED); TL_SetColor(Tl13,RED); TL_SetColor(Tl14,RED); } Else TL_SetEnd(tl11,sdate,stime,var1); if T != -1 and T[1] == -1 and cnt2[1] >= 3 and C[1] < O[1] then { var2 = l2; TL_SetEnd(tl22[1],sdate[cnt2+1],stime[cnt2+1],var2[1]); tl21 = TL_New(d2,t2,h2,sdate[1],stime[1],h2); tl22 = TL_New(d2,t2,l2,sdate[1],stime[1],l2); tl23 = TL_New(d2,t2,h2,d2,t2,l2); tl24 = TL_New(sdate[1],stime[1],h2,sdate[1],stime[1],l2); TL_SetColor(Tl21,BLUE); TL_SetColor(Tl22,BLUE); TL_SetColor(Tl23,BLUE); TL_SetColor(Tl24,BLUE); } Else TL_SetEnd(tl22,sdate,stime,var2); 참고수식) var1 = iff(C>O,abs(C-O),0); var2 = AccumN(var1,100); var3 = countif(C>O,100); var4 = var2/var3; if C > O and abs(C-O) >= var4*3 Then { value1 = c; } if C < O and abs(C-O) >= var4*3 Then { value2 = c; }
프로필 이미지

yes

2018-07-11 14:34:42

답변 수식 깊이 감사 드립니다. 실행 결과 if h1-l1 >= v4*5 Then . . . if h2-l2 >= v4*5 Then . . 부분에서 v4*5의 *5를 예를 들어 *30으로 변경 하여도 원하는 형태의 선이 그려 지지 않습니다. 검토 및 수정 부탁 드립니다. 미리 감사 드립니다. > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 부탁 드립니다. > 안녕하세요 예스스탁입니다. var : T(0),cnt1(0),d1(0),t1(0),h1(0),l1(0); var : cnt2(0),d2(0),t2(0),h2(0),l2(0); var : tl11(0),tl12(0),tl13(0),tl14(0); var : tl21(0),tl22(0),tl23(0),tl24(0); var : v1(0),v2(0),v3(0),v4(0); v1 = iff(C>O,abs(C-O),0); v2 = AccumN(v1,100); v3 = countif(C>O,100); v4 = v2/v3; if C > O Then T = 1; if C < O Then T = -1; if T == 1 and T[1] != 1 Then { cnt1 = 0; d1 = sdate; t1 = stime; h1 = H; l1 = L; } if T == 1 Then { cnt1 = cnt1+1; if h > h1 Then h1 = h; if l < l1 Then l1 = l; } if T == -1 and T[1] != -1 Then { cnt2 = 0; d2 = sdate; t2 = stime; h2 = H; l2 = L; } if T == -1 Then { cnt2 = cnt2+1; if h > h2 Then h2 = h; if l < l2 Then l2 = l; } if T != 1 and T[1] == 1 and cnt1[1] >= 3 and C[1] > O[1] Then { var1 = h1; TL_SetEnd(tl11[1],sdate[cnt1+1],stime[cnt1+1],var1[1]); tl11 = TL_New(d1,t1,h1,sdate[1],stime[1],h1); tl12 = TL_New(d1,t1,l1,sdate[1],stime[1],l1); tl13 = TL_New(d1,t1,h1,d1,t1,l1); tl14 = TL_New(sdate[1],stime[1],h1,sdate[1],stime[1],l1); TL_SetColor(Tl11,RED); TL_SetColor(Tl12,RED); TL_SetColor(Tl13,RED); TL_SetColor(Tl14,RED); Condition1 = false; if h1-l1 >= v4*5 Then Condition1 = true; } Else { if Condition1 == true then { TL_SetEnd(tl11,sdate,stime,var1); } } if T != -1 and T[1] == -1 and cnt2[1] >= 3 and C[1] < O[1] then { var2 = l2; TL_SetEnd(tl22[1],sdate[cnt2+1],stime[cnt2+1],var2[1]); tl21 = TL_New(d2,t2,h2,sdate[1],stime[1],h2); tl22 = TL_New(d2,t2,l2,sdate[1],stime[1],l2); tl23 = TL_New(d2,t2,h2,d2,t2,l2); tl24 = TL_New(sdate[1],stime[1],h2,sdate[1],stime[1],l2); TL_SetColor(Tl21,BLUE); TL_SetColor(Tl22,BLUE); TL_SetColor(Tl23,BLUE); TL_SetColor(Tl24,BLUE); Condition2 = false; if h2-l2 >= v4*5 Then Condition2 = true; } Else { if Condition2 == true then { TL_SetEnd(tl22,sdate,stime,var2); } } 즐거운 하루되세요 > yes 님이 쓴 글입니다. > 제목 : 부탁 드립니다. > 도움주심에 감사 합니다. 58519번에서 답변주신 수식 입니다. 여기에서 우측으로 수평선을 그을때 조건 1개를 더 추가 부탁드리고자 합니다. 예를들어 연속양봉 또는 음봉이 3개이상 지속되고(기존조건) 그것을 합한 높이가 과거100개봉 평균값의 5배이상일때만 우측으로 수평선을 긋도록 부탁 드립니다. 미리 감사 드립니다. var : T(0),cnt1(0),d1(0),t1(0),h1(0),l1(0); var : cnt2(0),d2(0),t2(0),h2(0),l2(0); var : tl11(0),tl12(0),tl13(0),tl14(0); var : tl21(0),tl22(0),tl23(0),tl24(0); if C > O Then T = 1; if C < O Then T = -1; if T == 1 and T[1] != 1 Then { cnt1 = 0; d1 = sdate; t1 = stime; h1 = H; l1 = L; } if T == 1 Then { cnt1 = cnt1+1; if h > h1 Then h1 = h; if l < l1 Then l1 = l; } if T == -1 and T[1] != -1 Then { cnt2 = 0; d2 = sdate; t2 = stime; h2 = H; l2 = L; } if T == -1 Then { cnt2 = cnt2+1; if h > h2 Then h2 = h; if l < l2 Then l2 = l; } if T != 1 and T[1] == 1 and cnt1[1] >= 3 and C[1] > O[1] Then { var1 = h1; TL_SetEnd(tl11[1],sdate[cnt1+1],stime[cnt1+1],var1[1]); tl11 = TL_New(d1,t1,h1,sdate[1],stime[1],h1); tl12 = TL_New(d1,t1,l1,sdate[1],stime[1],l1); tl13 = TL_New(d1,t1,h1,d1,t1,l1); tl14 = TL_New(sdate[1],stime[1],h1,sdate[1],stime[1],l1); TL_SetColor(Tl11,RED); TL_SetColor(Tl12,RED); TL_SetColor(Tl13,RED); TL_SetColor(Tl14,RED); } Else TL_SetEnd(tl11,sdate,stime,var1); if T != -1 and T[1] == -1 and cnt2[1] >= 3 and C[1] < O[1] then { var2 = l2; TL_SetEnd(tl22[1],sdate[cnt2+1],stime[cnt2+1],var2[1]); tl21 = TL_New(d2,t2,h2,sdate[1],stime[1],h2); tl22 = TL_New(d2,t2,l2,sdate[1],stime[1],l2); tl23 = TL_New(d2,t2,h2,d2,t2,l2); tl24 = TL_New(sdate[1],stime[1],h2,sdate[1],stime[1],l2); TL_SetColor(Tl21,BLUE); TL_SetColor(Tl22,BLUE); TL_SetColor(Tl23,BLUE); TL_SetColor(Tl24,BLUE); } Else TL_SetEnd(tl22,sdate,stime,var2); 참고수식) var1 = iff(C>O,abs(C-O),0); var2 = AccumN(var1,100); var3 = countif(C>O,100); var4 = var2/var3; if C > O and abs(C-O) >= var4*3 Then { value1 = c; } if C < O and abs(C-O) >= var4*3 Then { value2 = c; }
프로필 이미지

예스스탁 예스스탁 답변

2018-07-11 15:31:26

안녕하세요 예스스탁입니다. 식을 수정했습니다. input : n(4); var : T(0),cnt1(0),d1(0),t1(0),h1(0),l1(0); var : cnt2(0),d2(0),t2(0),h2(0),l2(0); var : tl11(0),tl12(0),tl13(0),tl14(0); var : tl21(0),tl22(0),tl23(0),tl24(0); var : v1(0),v2(0),v3(0),v4(0); v1 = iff(C>O,abs(C-O),0); v2 = AccumN(v1,100); v3 = countif(C>O,100); v4 = v2/v3; if C > O Then T = 1; if C < O Then T = -1; if T == 1 and T[1] != 1 Then { cnt1 = 0; d1 = sdate; t1 = stime; h1 = H; l1 = L; } if T == 1 Then { cnt1 = cnt1+1; if h > h1 Then h1 = h; if l < l1 Then l1 = l; } if T == -1 and T[1] != -1 Then { cnt2 = 0; d2 = sdate; t2 = stime; h2 = H; l2 = L; } if T == -1 Then { cnt2 = cnt2+1; if h > h2 Then h2 = h; if l < l2 Then l2 = l; } if T != 1 and T[1] == 1 and cnt1[1] >= 3 and C[1] > O[1] Then { var1 = h1; var2 = L1; if Condition1[1] == true then TL_SetEnd(tl11[1],sdate[cnt1+1],stime[cnt1+1],var1[1]); tl11 = TL_New(d1,t1,h1,sdate[1],stime[1],h1); tl12 = TL_New(d1,t1,l1,sdate[1],stime[1],l1); tl13 = TL_New(d1,t1,h1,d1,t1,l1); tl14 = TL_New(sdate[1],stime[1],h1,sdate[1],stime[1],l1); TL_SetColor(Tl11,RED); TL_SetColor(Tl12,RED); TL_SetColor(Tl13,RED); TL_SetColor(Tl14,RED); Condition1 = false; if h1-l1 >= v4*n Then Condition1 = true; } Else { if Condition1 == true then { TL_SetEnd(tl11,sdate,stime,var1); } } if T != -1 and T[1] == -1 and cnt2[1] >= 3 and C[1] < O[1] then { var3 = H2; var4 = L2; if Condition2[1] == true then TL_SetEnd(tl22[1],sdate[cnt2+1],stime[cnt2+1],var4[1]); tl21 = TL_New(d2,t2,h2,sdate[1],stime[1],h2); tl22 = TL_New(d2,t2,l2,sdate[1],stime[1],l2); tl23 = TL_New(d2,t2,h2,d2,t2,l2); tl24 = TL_New(sdate[1],stime[1],h2,sdate[1],stime[1],l2); TL_SetColor(Tl21,BLUE); TL_SetColor(Tl22,BLUE); TL_SetColor(Tl23,BLUE); TL_SetColor(Tl24,BLUE); Condition2 = false; if h2-l2 >= v4*20 Then Condition2 = true; } Else { if Condition2 == true then { TL_SetEnd(tl22,sdate,stime,var2); } } 즐거운 하루되세요 > yes 님이 쓴 글입니다. > 제목 : Re : Re : 부탁 드립니다. > 답변 수식 깊이 감사 드립니다. 실행 결과 if h1-l1 >= v4*5 Then . . . if h2-l2 >= v4*5 Then . . 부분에서 v4*5의 *5를 예를 들어 *30으로 변경 하여도 원하는 형태의 선이 그려 지지 않습니다. 검토 및 수정 부탁 드립니다. 미리 감사 드립니다. > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 부탁 드립니다. > 안녕하세요 예스스탁입니다. var : T(0),cnt1(0),d1(0),t1(0),h1(0),l1(0); var : cnt2(0),d2(0),t2(0),h2(0),l2(0); var : tl11(0),tl12(0),tl13(0),tl14(0); var : tl21(0),tl22(0),tl23(0),tl24(0); var : v1(0),v2(0),v3(0),v4(0); v1 = iff(C>O,abs(C-O),0); v2 = AccumN(v1,100); v3 = countif(C>O,100); v4 = v2/v3; if C > O Then T = 1; if C < O Then T = -1; if T == 1 and T[1] != 1 Then { cnt1 = 0; d1 = sdate; t1 = stime; h1 = H; l1 = L; } if T == 1 Then { cnt1 = cnt1+1; if h > h1 Then h1 = h; if l < l1 Then l1 = l; } if T == -1 and T[1] != -1 Then { cnt2 = 0; d2 = sdate; t2 = stime; h2 = H; l2 = L; } if T == -1 Then { cnt2 = cnt2+1; if h > h2 Then h2 = h; if l < l2 Then l2 = l; } if T != 1 and T[1] == 1 and cnt1[1] >= 3 and C[1] > O[1] Then { var1 = h1; TL_SetEnd(tl11[1],sdate[cnt1+1],stime[cnt1+1],var1[1]); tl11 = TL_New(d1,t1,h1,sdate[1],stime[1],h1); tl12 = TL_New(d1,t1,l1,sdate[1],stime[1],l1); tl13 = TL_New(d1,t1,h1,d1,t1,l1); tl14 = TL_New(sdate[1],stime[1],h1,sdate[1],stime[1],l1); TL_SetColor(Tl11,RED); TL_SetColor(Tl12,RED); TL_SetColor(Tl13,RED); TL_SetColor(Tl14,RED); Condition1 = false; if h1-l1 >= v4*5 Then Condition1 = true; } Else { if Condition1 == true then { TL_SetEnd(tl11,sdate,stime,var1); } } if T != -1 and T[1] == -1 and cnt2[1] >= 3 and C[1] < O[1] then { var2 = l2; TL_SetEnd(tl22[1],sdate[cnt2+1],stime[cnt2+1],var2[1]); tl21 = TL_New(d2,t2,h2,sdate[1],stime[1],h2); tl22 = TL_New(d2,t2,l2,sdate[1],stime[1],l2); tl23 = TL_New(d2,t2,h2,d2,t2,l2); tl24 = TL_New(sdate[1],stime[1],h2,sdate[1],stime[1],l2); TL_SetColor(Tl21,BLUE); TL_SetColor(Tl22,BLUE); TL_SetColor(Tl23,BLUE); TL_SetColor(Tl24,BLUE); Condition2 = false; if h2-l2 >= v4*5 Then Condition2 = true; } Else { if Condition2 == true then { TL_SetEnd(tl22,sdate,stime,var2); } } 즐거운 하루되세요 > yes 님이 쓴 글입니다. > 제목 : 부탁 드립니다. > 도움주심에 감사 합니다. 58519번에서 답변주신 수식 입니다. 여기에서 우측으로 수평선을 그을때 조건 1개를 더 추가 부탁드리고자 합니다. 예를들어 연속양봉 또는 음봉이 3개이상 지속되고(기존조건) 그것을 합한 높이가 과거100개봉 평균값의 5배이상일때만 우측으로 수평선을 긋도록 부탁 드립니다. 미리 감사 드립니다. var : T(0),cnt1(0),d1(0),t1(0),h1(0),l1(0); var : cnt2(0),d2(0),t2(0),h2(0),l2(0); var : tl11(0),tl12(0),tl13(0),tl14(0); var : tl21(0),tl22(0),tl23(0),tl24(0); if C > O Then T = 1; if C < O Then T = -1; if T == 1 and T[1] != 1 Then { cnt1 = 0; d1 = sdate; t1 = stime; h1 = H; l1 = L; } if T == 1 Then { cnt1 = cnt1+1; if h > h1 Then h1 = h; if l < l1 Then l1 = l; } if T == -1 and T[1] != -1 Then { cnt2 = 0; d2 = sdate; t2 = stime; h2 = H; l2 = L; } if T == -1 Then { cnt2 = cnt2+1; if h > h2 Then h2 = h; if l < l2 Then l2 = l; } if T != 1 and T[1] == 1 and cnt1[1] >= 3 and C[1] > O[1] Then { var1 = h1; TL_SetEnd(tl11[1],sdate[cnt1+1],stime[cnt1+1],var1[1]); tl11 = TL_New(d1,t1,h1,sdate[1],stime[1],h1); tl12 = TL_New(d1,t1,l1,sdate[1],stime[1],l1); tl13 = TL_New(d1,t1,h1,d1,t1,l1); tl14 = TL_New(sdate[1],stime[1],h1,sdate[1],stime[1],l1); TL_SetColor(Tl11,RED); TL_SetColor(Tl12,RED); TL_SetColor(Tl13,RED); TL_SetColor(Tl14,RED); } Else TL_SetEnd(tl11,sdate,stime,var1); if T != -1 and T[1] == -1 and cnt2[1] >= 3 and C[1] < O[1] then { var2 = l2; TL_SetEnd(tl22[1],sdate[cnt2+1],stime[cnt2+1],var2[1]); tl21 = TL_New(d2,t2,h2,sdate[1],stime[1],h2); tl22 = TL_New(d2,t2,l2,sdate[1],stime[1],l2); tl23 = TL_New(d2,t2,h2,d2,t2,l2); tl24 = TL_New(sdate[1],stime[1],h2,sdate[1],stime[1],l2); TL_SetColor(Tl21,BLUE); TL_SetColor(Tl22,BLUE); TL_SetColor(Tl23,BLUE); TL_SetColor(Tl24,BLUE); } Else TL_SetEnd(tl22,sdate,stime,var2); 참고수식) var1 = iff(C>O,abs(C-O),0); var2 = AccumN(var1,100); var3 = countif(C>O,100); var4 = var2/var3; if C > O and abs(C-O) >= var4*3 Then { value1 = c; } if C < O and abs(C-O) >= var4*3 Then { value2 = c; }
프로필 이미지

yes

2018-07-12 09:31:51

매우 만족한 답변에 깊이 감사 드립니다. 답변주신내용을 일부 편집 하였습니다. 1)그림과 같이 되도록 부탁 드립니다. 2)아울러 수정 후 data2를 이용한 타주기 수식 부탁 드립니다. 미리 경배로 감사 드립니다. input : n(10),사각형그리기1삭제0(0); var : T(0),cnt1(0),d1(0),t1(0),h1(0),l1(0); var : cnt2(0),d2(0),t2(0),h2(0),l2(0); var : tl11(0),tl12(0),tl13(0),tl14(0); var : tl21(0),tl22(0),tl23(0),tl24(0); var : v1(0),v2(0),v3(0),v4(0); v1 = iff(C>O,abs(C-O),0); v2 = AccumN(v1,100); v3 = countif(C>O,100); v4 = v2/v3; if C > O Then T = 1; if C < O Then T = -1; if T == 1 and T[1] != 1 Then { cnt1 = 0; d1 = sdate; t1 = stime; h1 = H; l1 = L; } if T == 1 Then { cnt1 = cnt1+1; if h > h1 Then h1 = h; if l < l1 Then l1 = l; } if T == -1 and T[1] != -1 Then { cnt2 = 0; d2 = sdate; t2 = stime; h2 = H; l2 = L; } if T == -1 Then { cnt2 = cnt2+1; if h > h2 Then h2 = h; if l < l2 Then l2 = l; } if T != 1 and T[1] == 1 and cnt1[1] >= 3 and C[1] > O[1] Then { var1 = h1; var2 = L1; if Condition1[1] == true then TL_SetEnd(tl11[1],sdate[cnt1+1],stime[cnt1+1],var1[1]); tl11 = TL_New(d1,t1,h1,sdate[1],stime[1],h1); if 사각형그리기1삭제0==1 then{ tl12 = TL_New(d1,t1,l1,sdate[1],stime[1],l1); tl13 = TL_New(d1,t1,h1,d1,t1,l1); tl14 = TL_New(sdate[1],stime[1],h1,sdate[1],stime[1],l1);} TL_SetColor(Tl11,RED); TL_SetColor(Tl12,RED); TL_SetColor(Tl13,RED); TL_SetColor(Tl14,RED); Condition1 = false; if h1-l1 >= v4*n Then Condition1 = true; } Else { if Condition1 == true then { TL_SetEnd(tl11,sdate,stime,var1); TL_SetExtRight(TL11,true); TL_Setsize(TL11,2); } } if T != -1 and T[1] == -1 and cnt2[1] >= 3 and C[1] < O[1] then { var3 = H2; var4 = L2; if Condition2[1] == true then TL_SetEnd(tl22[1],sdate[cnt2+1],stime[cnt2+1],var4[1]); tl22 = TL_New(d2,t2,l2,sdate[1],stime[1],l2); if 사각형그리기1삭제0==1 then{ tl21 = TL_New(d2,t2,h2,sdate[1],stime[1],h2); tl23 = TL_New(d2,t2,h2,d2,t2,l2); tl24 = TL_New(sdate[1],stime[1],h2,sdate[1],stime[1],l2);} TL_SetColor(Tl21,BLUE); TL_SetColor(Tl22,BLUE); TL_SetColor(Tl23,BLUE); TL_SetColor(Tl24,BLUE); Condition2 = false; if h2-l2 >= v4*N Then Condition2 = true; } Else { if Condition2 == true then { TL_SetExtRight(TL22,true); TL_Setsize(TL22,2); } } 즐거운 하루되세요 > yes 님이 쓴 글입니다. > 제목 : Re : Re : 부탁 드립니다. > 답변 수식 깊이 감사 드립니다. 실행 결과 if h1-l1 >= v4*5 Then . . . if h2-l2 >= v4*5 Then . . 부분에서 v4*5의 *5를 예를 들어 *30으로 변경 하여도 원하는 형태의 선이 그려 지지 않습니다. 검토 및 수정 부탁 드립니다. 미리 감사 드립니다. > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 부탁 드립니다. > 안녕하세요 예스스탁입니다. var : T(0),cnt1(0),d1(0),t1(0),h1(0),l1(0); var : cnt2(0),d2(0),t2(0),h2(0),l2(0); var : tl11(0),tl12(0),tl13(0),tl14(0); var : tl21(0),tl22(0),tl23(0),tl24(0); var : v1(0),v2(0),v3(0),v4(0); v1 = iff(C>O,abs(C-O),0); v2 = AccumN(v1,100); v3 = countif(C>O,100); v4 = v2/v3; if C > O Then T = 1; if C < O Then T = -1; if T == 1 and T[1] != 1 Then { cnt1 = 0; d1 = sdate; t1 = stime; h1 = H; l1 = L; } if T == 1 Then { cnt1 = cnt1+1; if h > h1 Then h1 = h; if l < l1 Then l1 = l; } if T == -1 and T[1] != -1 Then { cnt2 = 0; d2 = sdate; t2 = stime; h2 = H; l2 = L; } if T == -1 Then { cnt2 = cnt2+1; if h > h2 Then h2 = h; if l < l2 Then l2 = l; } if T != 1 and T[1] == 1 and cnt1[1] >= 3 and C[1] > O[1] Then { var1 = h1; TL_SetEnd(tl11[1],sdate[cnt1+1],stime[cnt1+1],var1[1]); tl11 = TL_New(d1,t1,h1,sdate[1],stime[1],h1); tl12 = TL_New(d1,t1,l1,sdate[1],stime[1],l1); tl13 = TL_New(d1,t1,h1,d1,t1,l1); tl14 = TL_New(sdate[1],stime[1],h1,sdate[1],stime[1],l1); TL_SetColor(Tl11,RED); TL_SetColor(Tl12,RED); TL_SetColor(Tl13,RED); TL_SetColor(Tl14,RED); Condition1 = false; if h1-l1 >= v4*5 Then Condition1 = true; } Else { if Condition1 == true then { TL_SetEnd(tl11,sdate,stime,var1); } } if T != -1 and T[1] == -1 and cnt2[1] >= 3 and C[1] < O[1] then { var2 = l2; TL_SetEnd(tl22[1],sdate[cnt2+1],stime[cnt2+1],var2[1]); tl21 = TL_New(d2,t2,h2,sdate[1],stime[1],h2); tl22 = TL_New(d2,t2,l2,sdate[1],stime[1],l2); tl23 = TL_New(d2,t2,h2,d2,t2,l2); tl24 = TL_New(sdate[1],stime[1],h2,sdate[1],stime[1],l2); TL_SetColor(Tl21,BLUE); TL_SetColor(Tl22,BLUE); TL_SetColor(Tl23,BLUE); TL_SetColor(Tl24,BLUE); Condition2 = false; if h2-l2 >= v4*5 Then Condition2 = true; } Else { if Condition2 == true then { TL_SetEnd(tl22,sdate,stime,var2); } } 즐거운 하루되세요 > yes 님이 쓴 글입니다. > 제목 : 부탁 드립니다. > 도움주심에 감사 합니다. 58519번에서 답변주신 수식 입니다. 여기에서 우측으로 수평선을 그을때 조건 1개를 더 추가 부탁드리고자 합니다. 예를들어 연속양봉 또는 음봉이 3개이상 지속되고(기존조건) 그것을 합한 높이가 과거100개봉 평균값의 5배이상일때만 우측으로 수평선을 긋도록 부탁 드립니다. 미리 감사 드립니다. var : T(0),cnt1(0),d1(0),t1(0),h1(0),l1(0); var : cnt2(0),d2(0),t2(0),h2(0),l2(0); var : tl11(0),tl12(0),tl13(0),tl14(0); var : tl21(0),tl22(0),tl23(0),tl24(0); if C > O Then T = 1; if C < O Then T = -1; if T == 1 and T[1] != 1 Then { cnt1 = 0; d1 = sdate; t1 = stime; h1 = H; l1 = L; } if T == 1 Then { cnt1 = cnt1+1; if h > h1 Then h1 = h; if l < l1 Then l1 = l; } if T == -1 and T[1] != -1 Then { cnt2 = 0; d2 = sdate; t2 = stime; h2 = H; l2 = L; } if T == -1 Then { cnt2 = cnt2+1; if h > h2 Then h2 = h; if l < l2 Then l2 = l; } if T != 1 and T[1] == 1 and cnt1[1] >= 3 and C[1] > O[1] Then { var1 = h1; TL_SetEnd(tl11[1],sdate[cnt1+1],stime[cnt1+1],var1[1]); tl11 = TL_New(d1,t1,h1,sdate[1],stime[1],h1); tl12 = TL_New(d1,t1,l1,sdate[1],stime[1],l1); tl13 = TL_New(d1,t1,h1,d1,t1,l1); tl14 = TL_New(sdate[1],stime[1],h1,sdate[1],stime[1],l1); TL_SetColor(Tl11,RED); TL_SetColor(Tl12,RED); TL_SetColor(Tl13,RED); TL_SetColor(Tl14,RED); } Else TL_SetEnd(tl11,sdate,stime,var1); if T != -1 and T[1] == -1 and cnt2[1] >= 3 and C[1] < O[1] then { var2 = l2; TL_SetEnd(tl22[1],sdate[cnt2+1],stime[cnt2+1],var2[1]); tl21 = TL_New(d2,t2,h2,sdate[1],stime[1],h2); tl22 = TL_New(d2,t2,l2,sdate[1],stime[1],l2); tl23 = TL_New(d2,t2,h2,d2,t2,l2); tl24 = TL_New(sdate[1],stime[1],h2,sdate[1],stime[1],l2); TL_SetColor(Tl21,BLUE); TL_SetColor(Tl22,BLUE); TL_SetColor(Tl23,BLUE); TL_SetColor(Tl24,BLUE); } Else TL_SetEnd(tl22,sdate,stime,var2); 참고수식) var1 = iff(C>O,abs(C-O),0); var2 = AccumN(var1,100); var3 = countif(C>O,100); var4 = var2/var3; if C > O and abs(C-O) >= var4*3 Then { value1 = c; } if C < O and abs(C-O) >= var4*3 Then { value2 = c; }
프로필 이미지

예스스탁 예스스탁 답변

2018-07-12 09:50:43

안녕하세요 예스스탁입니다. input :p100(100),적청3병갯수(3), n(4),사각형그리기1삭제0(0); var : T(0),cnt1(0),d1(0),t1(0),h1(0),l1(0); var : cnt2(0),d2(0),t2(0),h2(0),l2(0); var : tl11(0),tl12(0),tl13(0),tl14(0); var : tl21(0),tl22(0),tl23(0),tl24(0); var : v1(0),v2(0),v3(0),v4(0); v1 = iff(C>O,abs(C-O),0); v2 = AccumN(v1,p100); v3 = countif(C>O,p100); v4 = v2/v3; if C > O Then T = 1; if C < O Then T = -1; if T == 1 and T[1] != 1 Then { cnt1 = 0; d1 = sdate; t1 = stime; h1 = H; l1 = L; } if T == 1 Then { cnt1 = cnt1+1; if h > h1 Then h1 = h; if l < l1 Then l1 = l; } if T == -1 and T[1] != -1 Then { cnt2 = 0; d2 = sdate; t2 = stime; h2 = H; l2 = L; } if T == -1 Then { cnt2 = cnt2+1; if h > h2 Then h2 = h; if l < l2 Then l2 = l; } if T != 1 and T[1] == 1 and cnt1[1] >= 적청3병갯수 and C[1] > O[1] Then { var1 = h1; var2 = L1; if Condition1[1] == true then TL_SetEnd(tl11[1],sdate[cnt1+1],stime[cnt1+1],var1[1]); tl11 = TL_New(d1,t1,h1,sdate[1],stime[1],h1); if 사각형그리기1삭제0==1 then { tl12 = TL_New(d1,t1,l1,sdate[1],stime[1],l1); tl13 = TL_New(d1,t1,h1,d1,t1,l1); tl14 = TL_New(sdate[1],stime[1],h1,sdate[1],stime[1],l1);} TL_SetColor(Tl11,RED); TL_SetColor(Tl12,RED); TL_SetColor(Tl13,RED); TL_SetColor(Tl14,RED); Condition1 = false; if h1-l1 >= v4*n Then Condition1 = true; if Condition1 == false Then TL_Delete(TL11); } Else { if Condition1 == true then { TL_SetExtRight(TL11,true); TL_Setsize(TL11,2); } } if T != -1 and T[1] == -1 and cnt2[1] >= 적청3병갯수 and C[1] < O[1] then { var3 = H2; var4 = L2; if Condition2[1] == true then TL_SetEnd(tl22[1],sdate[cnt2+1],stime[cnt2+1],var4[1]); tl22 = TL_New(d2,t2,l2,sdate[1],stime[1],l2); if 사각형그리기1삭제0==1 then { tl21 = TL_New(d2,t2,h2,sdate[1],stime[1],h2); tl23 = TL_New(d2,t2,h2,d2,t2,l2); tl24 = TL_New(sdate[1],stime[1],h2,sdate[1],stime[1],l2);} TL_SetColor(Tl21,BLUE); TL_SetColor(Tl22,BLUE); TL_SetColor(Tl23,BLUE); TL_SetColor(Tl24,BLUE); Condition2 = false; if h2-l2 >= v4*N Then Condition2 = true; if Condition2 == false Then TL_Delete(TL22); } Else { if Condition2 == true then { TL_SetExtRight(TL22,true); TL_Setsize(TL22,2); } } 즐거운 하루되세요 > yes 님이 쓴 글입니다. > 제목 : Re : Re : Re : Re : 부탁 드립니다. > 매우 만족한 답변에 깊이 감사 드립니다. 답변주신내용을 일부 편집 하였습니다. 1)그림과 같이 되도록 부탁 드립니다. 2)아울러 수정 후 data2를 이용한 타주기 수식 부탁 드립니다. 미리 경배로 감사 드립니다. input : n(10),사각형그리기1삭제0(0); var : T(0),cnt1(0),d1(0),t1(0),h1(0),l1(0); var : cnt2(0),d2(0),t2(0),h2(0),l2(0); var : tl11(0),tl12(0),tl13(0),tl14(0); var : tl21(0),tl22(0),tl23(0),tl24(0); var : v1(0),v2(0),v3(0),v4(0); v1 = iff(C>O,abs(C-O),0); v2 = AccumN(v1,100); v3 = countif(C>O,100); v4 = v2/v3; if C > O Then T = 1; if C < O Then T = -1; if T == 1 and T[1] != 1 Then { cnt1 = 0; d1 = sdate; t1 = stime; h1 = H; l1 = L; } if T == 1 Then { cnt1 = cnt1+1; if h > h1 Then h1 = h; if l < l1 Then l1 = l; } if T == -1 and T[1] != -1 Then { cnt2 = 0; d2 = sdate; t2 = stime; h2 = H; l2 = L; } if T == -1 Then { cnt2 = cnt2+1; if h > h2 Then h2 = h; if l < l2 Then l2 = l; } if T != 1 and T[1] == 1 and cnt1[1] >= 3 and C[1] > O[1] Then { var1 = h1; var2 = L1; if Condition1[1] == true then TL_SetEnd(tl11[1],sdate[cnt1+1],stime[cnt1+1],var1[1]); tl11 = TL_New(d1,t1,h1,sdate[1],stime[1],h1); if 사각형그리기1삭제0==1 then{ tl12 = TL_New(d1,t1,l1,sdate[1],stime[1],l1); tl13 = TL_New(d1,t1,h1,d1,t1,l1); tl14 = TL_New(sdate[1],stime[1],h1,sdate[1],stime[1],l1);} TL_SetColor(Tl11,RED); TL_SetColor(Tl12,RED); TL_SetColor(Tl13,RED); TL_SetColor(Tl14,RED); Condition1 = false; if h1-l1 >= v4*n Then Condition1 = true; } Else { if Condition1 == true then { TL_SetEnd(tl11,sdate,stime,var1); TL_SetExtRight(TL11,true); TL_Setsize(TL11,2); } } if T != -1 and T[1] == -1 and cnt2[1] >= 3 and C[1] < O[1] then { var3 = H2; var4 = L2; if Condition2[1] == true then TL_SetEnd(tl22[1],sdate[cnt2+1],stime[cnt2+1],var4[1]); tl22 = TL_New(d2,t2,l2,sdate[1],stime[1],l2); if 사각형그리기1삭제0==1 then{ tl21 = TL_New(d2,t2,h2,sdate[1],stime[1],h2); tl23 = TL_New(d2,t2,h2,d2,t2,l2); tl24 = TL_New(sdate[1],stime[1],h2,sdate[1],stime[1],l2);} TL_SetColor(Tl21,BLUE); TL_SetColor(Tl22,BLUE); TL_SetColor(Tl23,BLUE); TL_SetColor(Tl24,BLUE); Condition2 = false; if h2-l2 >= v4*N Then Condition2 = true; } Else { if Condition2 == true then { TL_SetExtRight(TL22,true); TL_Setsize(TL22,2); } } 즐거운 하루되세요 > yes 님이 쓴 글입니다. > 제목 : Re : Re : 부탁 드립니다. > 답변 수식 깊이 감사 드립니다. 실행 결과 if h1-l1 >= v4*5 Then . . . if h2-l2 >= v4*5 Then . . 부분에서 v4*5의 *5를 예를 들어 *30으로 변경 하여도 원하는 형태의 선이 그려 지지 않습니다. 검토 및 수정 부탁 드립니다. 미리 감사 드립니다. > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 부탁 드립니다. > 안녕하세요 예스스탁입니다. var : T(0),cnt1(0),d1(0),t1(0),h1(0),l1(0); var : cnt2(0),d2(0),t2(0),h2(0),l2(0); var : tl11(0),tl12(0),tl13(0),tl14(0); var : tl21(0),tl22(0),tl23(0),tl24(0); var : v1(0),v2(0),v3(0),v4(0); v1 = iff(C>O,abs(C-O),0); v2 = AccumN(v1,100); v3 = countif(C>O,100); v4 = v2/v3; if C > O Then T = 1; if C < O Then T = -1; if T == 1 and T[1] != 1 Then { cnt1 = 0; d1 = sdate; t1 = stime; h1 = H; l1 = L; } if T == 1 Then { cnt1 = cnt1+1; if h > h1 Then h1 = h; if l < l1 Then l1 = l; } if T == -1 and T[1] != -1 Then { cnt2 = 0; d2 = sdate; t2 = stime; h2 = H; l2 = L; } if T == -1 Then { cnt2 = cnt2+1; if h > h2 Then h2 = h; if l < l2 Then l2 = l; } if T != 1 and T[1] == 1 and cnt1[1] >= 3 and C[1] > O[1] Then { var1 = h1; TL_SetEnd(tl11[1],sdate[cnt1+1],stime[cnt1+1],var1[1]); tl11 = TL_New(d1,t1,h1,sdate[1],stime[1],h1); tl12 = TL_New(d1,t1,l1,sdate[1],stime[1],l1); tl13 = TL_New(d1,t1,h1,d1,t1,l1); tl14 = TL_New(sdate[1],stime[1],h1,sdate[1],stime[1],l1); TL_SetColor(Tl11,RED); TL_SetColor(Tl12,RED); TL_SetColor(Tl13,RED); TL_SetColor(Tl14,RED); Condition1 = false; if h1-l1 >= v4*5 Then Condition1 = true; } Else { if Condition1 == true then { TL_SetEnd(tl11,sdate,stime,var1); } } if T != -1 and T[1] == -1 and cnt2[1] >= 3 and C[1] < O[1] then { var2 = l2; TL_SetEnd(tl22[1],sdate[cnt2+1],stime[cnt2+1],var2[1]); tl21 = TL_New(d2,t2,h2,sdate[1],stime[1],h2); tl22 = TL_New(d2,t2,l2,sdate[1],stime[1],l2); tl23 = TL_New(d2,t2,h2,d2,t2,l2); tl24 = TL_New(sdate[1],stime[1],h2,sdate[1],stime[1],l2); TL_SetColor(Tl21,BLUE); TL_SetColor(Tl22,BLUE); TL_SetColor(Tl23,BLUE); TL_SetColor(Tl24,BLUE); Condition2 = false; if h2-l2 >= v4*5 Then Condition2 = true; } Else { if Condition2 == true then { TL_SetEnd(tl22,sdate,stime,var2); } } 즐거운 하루되세요 > yes 님이 쓴 글입니다. > 제목 : 부탁 드립니다. > 도움주심에 감사 합니다. 58519번에서 답변주신 수식 입니다. 여기에서 우측으로 수평선을 그을때 조건 1개를 더 추가 부탁드리고자 합니다. 예를들어 연속양봉 또는 음봉이 3개이상 지속되고(기존조건) 그것을 합한 높이가 과거100개봉 평균값의 5배이상일때만 우측으로 수평선을 긋도록 부탁 드립니다. 미리 감사 드립니다. var : T(0),cnt1(0),d1(0),t1(0),h1(0),l1(0); var : cnt2(0),d2(0),t2(0),h2(0),l2(0); var : tl11(0),tl12(0),tl13(0),tl14(0); var : tl21(0),tl22(0),tl23(0),tl24(0); if C > O Then T = 1; if C < O Then T = -1; if T == 1 and T[1] != 1 Then { cnt1 = 0; d1 = sdate; t1 = stime; h1 = H; l1 = L; } if T == 1 Then { cnt1 = cnt1+1; if h > h1 Then h1 = h; if l < l1 Then l1 = l; } if T == -1 and T[1] != -1 Then { cnt2 = 0; d2 = sdate; t2 = stime; h2 = H; l2 = L; } if T == -1 Then { cnt2 = cnt2+1; if h > h2 Then h2 = h; if l < l2 Then l2 = l; } if T != 1 and T[1] == 1 and cnt1[1] >= 3 and C[1] > O[1] Then { var1 = h1; TL_SetEnd(tl11[1],sdate[cnt1+1],stime[cnt1+1],var1[1]); tl11 = TL_New(d1,t1,h1,sdate[1],stime[1],h1); tl12 = TL_New(d1,t1,l1,sdate[1],stime[1],l1); tl13 = TL_New(d1,t1,h1,d1,t1,l1); tl14 = TL_New(sdate[1],stime[1],h1,sdate[1],stime[1],l1); TL_SetColor(Tl11,RED); TL_SetColor(Tl12,RED); TL_SetColor(Tl13,RED); TL_SetColor(Tl14,RED); } Else TL_SetEnd(tl11,sdate,stime,var1); if T != -1 and T[1] == -1 and cnt2[1] >= 3 and C[1] < O[1] then { var2 = l2; TL_SetEnd(tl22[1],sdate[cnt2+1],stime[cnt2+1],var2[1]); tl21 = TL_New(d2,t2,h2,sdate[1],stime[1],h2); tl22 = TL_New(d2,t2,l2,sdate[1],stime[1],l2); tl23 = TL_New(d2,t2,h2,d2,t2,l2); tl24 = TL_New(sdate[1],stime[1],h2,sdate[1],stime[1],l2); TL_SetColor(Tl21,BLUE); TL_SetColor(Tl22,BLUE); TL_SetColor(Tl23,BLUE); TL_SetColor(Tl24,BLUE); } Else TL_SetEnd(tl22,sdate,stime,var2); 참고수식) var1 = iff(C>O,abs(C-O),0); var2 = AccumN(var1,100); var3 = countif(C>O,100); var4 = var2/var3; if C > O and abs(C-O) >= var4*3 Then { value1 = c; } if C < O and abs(C-O) >= var4*3 Then { value2 = c; }