커뮤니티

문의드립니다

프로필 이미지
뉴스타트
2017-10-12 08:51:16
112
글번호 113312
답변완료
안녕하세요 1분봉차트에서 5분봉과 15분봉의 스토케스틱(5,3,3 단순이평사용)을 date2,date3를 사용하지않고 직접 표시하는 식을 부탁드립니다.
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2017-10-12 17:33:58

안녕하세요 예스스탁입니다 input : ntime1(5), ntime2(15),sto1(10), sto2(6), sto3(6); var : S1(0),D1(0),TM(0),TF2(0),TF3(0),cnt(0); var : highVal2(0), lowVal2(0),Stok2(0),StoD2(0),sum21(0),sum22(0); Array : H2[50](0),L2[50](0),FK2[50](0),SK2[50](0); var : highVal3(0), lowVal3(0),Stok3(0),StoD3(0),sum31(0),sum32(0); Array : H3[50](0),L3[50](0),FK3[50](0),SK3[50](0); if Bdate != Bdate[1] Then{ S1 = TimeToMinutes(stime); D1 = sdate; } if D1 > 0 then{ if sdate == D1 Then TM = TimeToMinutes(stime)-S1; Else TM = TimeToMinutes(stime)+1440-S1; TF2 = TM%ntime1; if Bdate != bdate[1] or (bdate == bdate[1] and TF2 < TF2[1] ) Then{ H2[0] = H; L2[0] = L; for cnt = 1 to 49{ H2[cnt] = H2[cnt-1][1]; L2[cnt] = L2[cnt-1][1]; FK2[cnt] = FK2[cnt-1][1]; SK2[cnt] = SK2[cnt-1][1]; } } if H > H2[0] Then H2[0] = H; if L < L2[0] Then L2[0] = L; if H2[sto1] > 0 Then{ highVal2 = H2[0]; lowVal2 = L2[0]; for cnt = 0 to sto1-1 { if H2[cnt] > highVal2 then highVal2 = H2[cnt]; if L2[cnt] < lowVal2 then lowVal2 = L2[cnt]; } FK2[0] = (C-lowVal2)/(highVal2-lowVal2)*100; } if FK2[sto2] > 0 Then{ sum21 = 0; for cnt = 0 to sto2-1 { sum21 = sum21+FK2[cnt]; } SK2[0] = sum21/sto2; Stok2 = SK2[0]; } if StoK2[sto3] > 0 Then{ sum22 = 0; for cnt = 0 to sto3-1 { sum22 = sum22+SK2[cnt]; } StoD2 = sum22/sto2; } TF3 = TM%ntime2; if Bdate != bdate[1] or (bdate == bdate[1] and TF3 < TF3[1] ) Then{ H3[0] = H; L3[0] = L; for cnt = 1 to 49{ H3[cnt] = H3[cnt-1][1]; L3[cnt] = L3[cnt-1][1]; FK3[cnt] = FK3[cnt-1][1]; SK3[cnt] = SK3[cnt-1][1]; } } if H > H3[0] Then H3[0] = H; if L < L3[0] Then L3[0] = L; if H3[sto1] > 0 Then{ highVal3 = H3[0]; lowVal3 = L3[0]; for cnt = 0 to sto1-1 { if H3[cnt] > highVal3 then highVal3 = H3[cnt]; if L3[cnt] < lowVal3 then lowVal3 = L3[cnt]; } FK3[0] = (C-lowVal3)/(highVal3-lowVal3)*100; } if FK3[sto2] > 0 Then{ sum31 = 0; for cnt = 0 to sto2-1 { sum31 = sum31+FK3[cnt]; } SK3[0] = sum31/sto2; Stok3 = SK3[0]; } if SK3[sto3] > 0 Then{ sum32 = 0; for cnt = 0 to sto3-1 { sum32 = sum32+SK3[cnt]; } StoD3 = sum32/sto3; } } plot1(StoK2); plot2(StoD2); plot3(StoK3); plot4(StoD3); PlotBaseLine1(20); PlotBaseLine2(80); 즐거운 하루되세요 > 뉴스타트 님이 쓴 글입니다. > 제목 : 문의드립니다 > 안녕하세요 1분봉차트에서 5분봉과 15분봉의 스토케스틱(5,3,3 단순이평사용)을 date2,date3를 사용하지않고 직접 표시하는 식을 부탁드립니다.