커뮤니티

항셍지표문의3

프로필 이미지
카카
2019-04-19 12:17:37
221
글번호 127974
답변완료
안녕하세요 관리자님 아래의 보내주신 지표 잘받았습니다. 여기에 오늘의 주가를 넣고 싶습니다. 수정부탁드립니다. 제가 할려고 하니 안되네요. 부탁드립니다. - 아 래 - input : P(520); var : OO(0),CC(0),ww(0),cnt(0); var : sum(0),mav(0),sumsqrt(0),stdv(0); Array : W1[600](-9999999),W2[600](-9999999),W3[600](-9999999),W4[600](-9999999),W5[600](-9999999); if (sdate != sdate[1] and stime >= 101500) or (sdate == sdate[1] and stime >= 101500 and stime[1] < 101500) Then { ww = DayOfWeek(sdate); TL_new(sdate,stime,999999999,sdate,stime,0); OO = O; if ww == 1 then { for cnt = 1 to 599 { W1[cnt] = W1[cnt-1][1]; } } if ww == 2 then { for cnt = 1 to 599 { W2[cnt] = W1[cnt-1][1]; } } if ww == 3 then { for cnt = 1 to 599 { W3[cnt] = W1[cnt-1][1]; } } if ww == 4 then { for cnt = 1 to 599 { W4[cnt] = W1[cnt-1][1]; } } if ww == 5 then { for cnt = 1 to 599 { W5[cnt] = W1[cnt-1][1]; } } } if stime >= 101500 or stime <= 20000 Then CC = C; if ww == 1 Then { W1[0] = OO-CC; if W1[p] != -9999999 then { sum = 0; for cnt = 0 to P-1 { sum = sum + W1[cnt]; } mav = sum/P; SumSqrt = 0; For cnt = 0 To P - 1 { SumSqrt = SumSqrt + (W1[cnt]-mav)^2; } Stdv = SquareRoot(SumSqrt / P); plot1(mav); plot2(mav+stdv*2); plot3(mav+stdv*1); plot4(mav-stdv*1); plot5(mav-stdv*2); } } if ww == 2 Then { W2[0] = OO-CC; if W2[p] != -9999999 then { sum = 0; for cnt = 0 to P-1 { sum = sum + W2[cnt]; } mav = sum/P; SumSqrt = 0; For cnt = 0 To P - 1 { SumSqrt = SumSqrt + (W2[cnt]-mav)^2; } Stdv = SquareRoot(SumSqrt / P); plot1(mav); plot2(mav+stdv*2); plot3(mav+stdv*1); plot4(mav-stdv*1); plot5(mav-stdv*2); } } if ww == 3 Then { W3[0] = OO-CC; if W3[p] != -9999999 then { sum = 0; for cnt = 0 to P-1 { sum = sum + W3[cnt]; } mav = sum/P; SumSqrt = 0; For cnt = 0 To P - 1 { SumSqrt = SumSqrt + (W3[cnt]-mav)^2; } Stdv = SquareRoot(SumSqrt / P); plot1(mav); plot2(mav+stdv*2); plot3(mav+stdv*1); plot4(mav-stdv*1); plot5(mav-stdv*2); } } if ww == 4 Then { W4[0] = OO-CC; if W4[p] != -9999999 then { sum = 0; for cnt = 0 to P-1 { sum = sum + W4[cnt]; } mav = sum/P; SumSqrt = 0; For cnt = 0 To P - 1 { SumSqrt = SumSqrt + (W4[cnt]-mav)^2; } Stdv = SquareRoot(SumSqrt / P); plot1(mav); plot2(mav+stdv*2); plot3(mav+stdv*1); plot4(mav-stdv*1); plot5(mav-stdv*2); } } if ww == 5 Then { W5[0] = OO-CC; if W5[p] != -9999999 then { sum = 0; for cnt = 0 to P-1 { sum = sum + W5[cnt]; } mav = sum/P; SumSqrt = 0; For cnt = 0 To P - 1 { SumSqrt = SumSqrt + (W5[cnt]-mav)^2; } Stdv = SquareRoot(SumSqrt / P); plot1(mav); plot2(mav+stdv*2); plot3(mav+stdv*1); plot4(mav-stdv*1); plot5(mav-stdv*2); } }
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2019-04-22 11:04:48

안녕하세요 예스스탁입니다. input : P(520); var : OO(0),CC(0),ww(0),cnt(0); var : sum(0),mav(0),sumsqrt(0),stdv(0); Array : W1[600](-9999999),W2[600](-9999999),W3[600](-9999999),W4[600](-9999999),W5[600](-9999999); if (sdate != sdate[1] and stime >= 101500) or (sdate == sdate[1] and stime >= 101500 and stime[1] < 101500) Then { ww = DayOfWeek(sdate); TL_new(sdate,stime,999999999,sdate,stime,0); OO = O; if ww == 1 then { for cnt = 1 to 599 { W1[cnt] = W1[cnt-1][1]; } } if ww == 2 then { for cnt = 1 to 599 { W2[cnt] = W1[cnt-1][1]; } } if ww == 3 then { for cnt = 1 to 599 { W3[cnt] = W1[cnt-1][1]; } } if ww == 4 then { for cnt = 1 to 599 { W4[cnt] = W1[cnt-1][1]; } } if ww == 5 then { for cnt = 1 to 599 { W5[cnt] = W1[cnt-1][1]; } } } if stime >= 101500 or stime <= 20000 Then CC = C; if ww == 1 Then { W1[0] = OO-CC; if W1[p] != -9999999 then { sum = 0; for cnt = 0 to P-1 { sum = sum + W1[cnt]; } mav = sum/P; SumSqrt = 0; For cnt = 0 To P - 1 { SumSqrt = SumSqrt + (W1[cnt]-mav)^2; } Stdv = SquareRoot(SumSqrt / P); plot1(mav); plot2(mav+stdv*2); plot3(mav+stdv*1); plot4(mav-stdv*1); plot5(mav-stdv*2); } } if ww == 2 Then { W2[0] = OO-CC; if W2[p] != -9999999 then { sum = 0; for cnt = 0 to P-1 { sum = sum + W2[cnt]; } mav = sum/P; SumSqrt = 0; For cnt = 0 To P - 1 { SumSqrt = SumSqrt + (W2[cnt]-mav)^2; } Stdv = SquareRoot(SumSqrt / P); plot1(mav); plot2(mav+stdv*2); plot3(mav+stdv*1); plot4(mav-stdv*1); plot5(mav-stdv*2); } } if ww == 3 Then { W3[0] = OO-CC; if W3[p] != -9999999 then { sum = 0; for cnt = 0 to P-1 { sum = sum + W3[cnt]; } mav = sum/P; SumSqrt = 0; For cnt = 0 To P - 1 { SumSqrt = SumSqrt + (W3[cnt]-mav)^2; } Stdv = SquareRoot(SumSqrt / P); plot1(mav); plot2(mav+stdv*2); plot3(mav+stdv*1); plot4(mav-stdv*1); plot5(mav-stdv*2); } } if ww == 4 Then { W4[0] = OO-CC; if W4[p] != -9999999 then { sum = 0; for cnt = 0 to P-1 { sum = sum + W4[cnt]; } mav = sum/P; SumSqrt = 0; For cnt = 0 To P - 1 { SumSqrt = SumSqrt + (W4[cnt]-mav)^2; } Stdv = SquareRoot(SumSqrt / P); plot1(mav); plot2(mav+stdv*2); plot3(mav+stdv*1); plot4(mav-stdv*1); plot5(mav-stdv*2); } } if ww == 5 Then { W5[0] = OO-CC; if W5[p] != -9999999 then { sum = 0; for cnt = 0 to P-1 { sum = sum + W5[cnt]; } mav = sum/P; SumSqrt = 0; For cnt = 0 To P - 1 { SumSqrt = SumSqrt + (W5[cnt]-mav)^2; } Stdv = SquareRoot(SumSqrt / P); plot1(mav); plot2(mav+stdv*2); plot3(mav+stdv*1); plot4(mav-stdv*1); plot5(mav-stdv*2); } } plot6(c,"현재가"); 즐거운 하루되세요 > 카카 님이 쓴 글입니다. > 제목 : 항셍지표문의3 > 안녕하세요 관리자님 아래의 보내주신 지표 잘받았습니다. 여기에 오늘의 주가를 넣고 싶습니다. 수정부탁드립니다. 제가 할려고 하니 안되네요. 부탁드립니다. - 아 래 - input : P(520); var : OO(0),CC(0),ww(0),cnt(0); var : sum(0),mav(0),sumsqrt(0),stdv(0); Array : W1[600](-9999999),W2[600](-9999999),W3[600](-9999999),W4[600](-9999999),W5[600](-9999999); if (sdate != sdate[1] and stime >= 101500) or (sdate == sdate[1] and stime >= 101500 and stime[1] < 101500) Then { ww = DayOfWeek(sdate); TL_new(sdate,stime,999999999,sdate,stime,0); OO = O; if ww == 1 then { for cnt = 1 to 599 { W1[cnt] = W1[cnt-1][1]; } } if ww == 2 then { for cnt = 1 to 599 { W2[cnt] = W1[cnt-1][1]; } } if ww == 3 then { for cnt = 1 to 599 { W3[cnt] = W1[cnt-1][1]; } } if ww == 4 then { for cnt = 1 to 599 { W4[cnt] = W1[cnt-1][1]; } } if ww == 5 then { for cnt = 1 to 599 { W5[cnt] = W1[cnt-1][1]; } } } if stime >= 101500 or stime <= 20000 Then CC = C; if ww == 1 Then { W1[0] = OO-CC; if W1[p] != -9999999 then { sum = 0; for cnt = 0 to P-1 { sum = sum + W1[cnt]; } mav = sum/P; SumSqrt = 0; For cnt = 0 To P - 1 { SumSqrt = SumSqrt + (W1[cnt]-mav)^2; } Stdv = SquareRoot(SumSqrt / P); plot1(mav); plot2(mav+stdv*2); plot3(mav+stdv*1); plot4(mav-stdv*1); plot5(mav-stdv*2); } } if ww == 2 Then { W2[0] = OO-CC; if W2[p] != -9999999 then { sum = 0; for cnt = 0 to P-1 { sum = sum + W2[cnt]; } mav = sum/P; SumSqrt = 0; For cnt = 0 To P - 1 { SumSqrt = SumSqrt + (W2[cnt]-mav)^2; } Stdv = SquareRoot(SumSqrt / P); plot1(mav); plot2(mav+stdv*2); plot3(mav+stdv*1); plot4(mav-stdv*1); plot5(mav-stdv*2); } } if ww == 3 Then { W3[0] = OO-CC; if W3[p] != -9999999 then { sum = 0; for cnt = 0 to P-1 { sum = sum + W3[cnt]; } mav = sum/P; SumSqrt = 0; For cnt = 0 To P - 1 { SumSqrt = SumSqrt + (W3[cnt]-mav)^2; } Stdv = SquareRoot(SumSqrt / P); plot1(mav); plot2(mav+stdv*2); plot3(mav+stdv*1); plot4(mav-stdv*1); plot5(mav-stdv*2); } } if ww == 4 Then { W4[0] = OO-CC; if W4[p] != -9999999 then { sum = 0; for cnt = 0 to P-1 { sum = sum + W4[cnt]; } mav = sum/P; SumSqrt = 0; For cnt = 0 To P - 1 { SumSqrt = SumSqrt + (W4[cnt]-mav)^2; } Stdv = SquareRoot(SumSqrt / P); plot1(mav); plot2(mav+stdv*2); plot3(mav+stdv*1); plot4(mav-stdv*1); plot5(mav-stdv*2); } } if ww == 5 Then { W5[0] = OO-CC; if W5[p] != -9999999 then { sum = 0; for cnt = 0 to P-1 { sum = sum + W5[cnt]; } mav = sum/P; SumSqrt = 0; For cnt = 0 To P - 1 { SumSqrt = SumSqrt + (W5[cnt]-mav)^2; } Stdv = SquareRoot(SumSqrt / P); plot1(mav); plot2(mav+stdv*2); plot3(mav+stdv*1); plot4(mav-stdv*1); plot5(mav-stdv*2); } }