커뮤니티

문의

프로필 이미지
레전드
2024-06-27 09:35:08
771
글번호 181021
답변완료
input : StartTime(1015000),EndTime(130000); var : Tcond(false),cnt(0); Array : DO[20](0),DH[20](0),DL[20](0),DC[20](0); if (sdate != sdate[1] and stime >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { Tcond = true; for cnt = 19 downto 1 { DO[cnt] = DO[cnt-1]; DH[cnt] = DH[cnt-1]; DL[cnt] = DL[cnt-1]; DC[cnt] = DC[cnt-1]; } DO[0] = O; DH[0] = H; DL[0] = L; } if (sdate != sdate[1] and stime >= EndTime) or (sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then { Tcond = False; } if Tcond == true Then { DC[0] = C; if H > DH[0] Then DH[0] = H; if L < DL[0] Then DL[0] = L; } plot1(DO[1],"1일전시가"); plot2(DH[1],"1일전고가"); plot3(DL[1],"1일전저가"); plot4(DO[2],"2일전시가"); plot5(DH[2],"2일전고가"); plot6(DL[2],"2일전저가"); plot7(DO[3],"3일전시가"); plot8(DH[3],"3일전고가"); plot9(DL[3],"3일전저가"); 전에 만들어주신 식 모두0으로 나옵니다.
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2024-06-27 14:40:48

안녕하세요 예스스탁입니다. input : StartTime(1015000),EndTime(130000); StartTime이 잘못지정 되어 있었습니다. 101500으로 수정해 드립니다. input : StartTime(101500),EndTime(130000); var : Tcond(false),cnt(0); Array : DO[20](0),DH[20](0),DL[20](0),DC[20](0); if (sdate != sdate[1] and stime >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { Tcond = true; for cnt = 19 downto 1 { DO[cnt] = DO[cnt-1]; DH[cnt] = DH[cnt-1]; DL[cnt] = DL[cnt-1]; DC[cnt] = DC[cnt-1]; } DO[0] = O; DH[0] = H; DL[0] = L; } if (sdate != sdate[1] and stime >= EndTime) or (sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then { Tcond = False; } if Tcond == true Then { DC[0] = C; if H > DH[0] Then DH[0] = H; if L < DL[0] Then DL[0] = L; } plot1(DO[1],"1일전시가"); plot2(DH[1],"1일전고가"); plot3(DL[1],"1일전저가"); plot4(DO[2],"2일전시가"); plot5(DH[2],"2일전고가"); plot6(DL[2],"2일전저가"); plot7(DO[3],"3일전시가"); plot8(DH[3],"3일전고가"); plot9(DL[3],"3일전저가"); 즐거운 하루되세요 > 레전드 님이 쓴 글입니다. > 제목 : 문의 > input : StartTime(1015000),EndTime(130000); var : Tcond(false),cnt(0); Array : DO[20](0),DH[20](0),DL[20](0),DC[20](0); if (sdate != sdate[1] and stime >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { Tcond = true; for cnt = 19 downto 1 { DO[cnt] = DO[cnt-1]; DH[cnt] = DH[cnt-1]; DL[cnt] = DL[cnt-1]; DC[cnt] = DC[cnt-1]; } DO[0] = O; DH[0] = H; DL[0] = L; } if (sdate != sdate[1] and stime >= EndTime) or (sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then { Tcond = False; } if Tcond == true Then { DC[0] = C; if H > DH[0] Then DH[0] = H; if L < DL[0] Then DL[0] = L; } plot1(DO[1],"1일전시가"); plot2(DH[1],"1일전고가"); plot3(DL[1],"1일전저가"); plot4(DO[2],"2일전시가"); plot5(DH[2],"2일전고가"); plot6(DL[2],"2일전저가"); plot7(DO[3],"3일전시가"); plot8(DH[3],"3일전고가"); plot9(DL[3],"3일전저가"); 전에 만들어주신 식 모두0으로 나옵니다.