커뮤니티

부탁 드립니다.

프로필 이미지
뮬리
2019-12-17 17:01:37
167
글번호 134474
답변완료
도움에 감사 드립니다. 미리 감사 드립니다. 다음수식에서 해선 당일부터 시작이 아닌 1)지정된 일시 이후에 계산을 시작 하는 식과 2)변수로 입력된 봉수(n)로 부터 계산 시작 하는 식 부탁 드립니다. Var : h1(0),h2(0),h3(0); Var : l1(0),l2(0),l3(0); if bdate != bdate[1] then { h1 = h; h2 = 0; h3 = 0; l1 = l; l2 = 0; l3 = 0; } else { if h > h1 Then { h1 = h; h2 = h1[1]; h3 = h2[1]; } if h > h2 and h < h1 Then { h2 = h; h3 = h2[1]; } if h > h3 and h < h2 Then { h3 = h; } if l < l1 Then { l1 = l; l2 = l1[1]; l3 = l2[1]; } if l < l2 and l > l1 Then { l2 = l; l3 = l2[1]; } if l < l3 and l > l2 Then { h3 = l; } } if h1 > 0 Then plot1(h1); if h2 > 0 Then plot2(h2); if h3 > 0 Then plot3(h3); if l1 > 0 Then plot4(l1); if l2 > 0 Then plot5(l2); if l3 > 0 Then plot6(l3);
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2019-12-18 10:45:34

안녕하세요 예스스탁입니다. 1 input : ndate(20191218),ntime(90000); Var : h1(0),h2(0),h3(0); Var : l1(0),l2(0),l3(0); if sdate == ndate and stime >= ntime Then Condition1 = true; if Condition1 == true and condition1[1] == false then { h1 = h; h2 = 0; h3 = 0; l1 = l; l2 = 0; l3 = 0; } if Condition1 == true and Condition1[1] == true then { if h > h1 Then { h1 = h; h2 = h1[1]; h3 = h2[1]; } if h > h2 and h < h1 Then { h2 = h; h3 = h2[1]; } if h > h3 and h < h2 Then { h3 = h; } if l < l1 Then { l1 = l; l2 = l1[1]; l3 = l2[1]; } if l < l2 and l > l1 Then { l2 = l; l3 = l2[1]; } if l < l3 and l > l2 Then { h3 = l; } } if h1 > 0 Then plot1(h1); if h2 > 0 Then plot2(h2); if h3 > 0 Then plot3(h3); if l1 > 0 Then plot4(l1); if l2 > 0 Then plot5(l2); if l3 > 0 Then plot6(l3); 2 input : n(10); var : cnt(0); Var : h1(0),h2(0),h3(0); Var : l1(0),l2(0),l3(0); h1 = 0; l1 = 0; for cnt = 0 to n-1 { if h1 == 0 or (h1 > 0 and h[cnt] > h1) Then h1 = h[cnt]; if l1 == 0 or (l1 > 0 and l[cnt] < l1) Then l1 = l[cnt]; } h2 = 0; l2 = 0; for cnt = 0 to n-1 { if h[cnt] < h1 and (h2 == 0 or (h2 > 0 and h[cnt] > h2)) Then h2 = h[cnt]; if l[cnt] > l1 and (l2 == 0 or (l2 > 0 and l[cnt] < l2)) Then l2 = l[cnt]; } h3 = 0; l3 = 0; for cnt = 0 to n-1 { if h[cnt] < h2 and (h3 == 0 or (h3 > 0 and h[cnt] > h3)) Then h3 = h[cnt]; if l[cnt] > l2 and (l3 == 0 or (l3 > 0 and l[cnt] < l3)) Then l3 = l[cnt]; } if h1 > 0 Then plot1(h1); if h2 > 0 Then plot2(h2); if h3 > 0 Then plot3(h3); if l1 > 0 Then plot4(l1); if l2 > 0 Then plot5(l2); if l3 > 0 Then plot6(l3); 즐거운 하루되세요 > 뮬리 님이 쓴 글입니다. > 제목 : 부탁 드립니다. > 도움에 감사 드립니다. 미리 감사 드립니다. 다음수식에서 해선 당일부터 시작이 아닌 1)지정된 일시 이후에 계산을 시작 하는 식과 2)변수로 입력된 봉수(n)로 부터 계산 시작 하는 식 부탁 드립니다. Var : h1(0),h2(0),h3(0); Var : l1(0),l2(0),l3(0); if bdate != bdate[1] then { h1 = h; h2 = 0; h3 = 0; l1 = l; l2 = 0; l3 = 0; } else { if h > h1 Then { h1 = h; h2 = h1[1]; h3 = h2[1]; } if h > h2 and h < h1 Then { h2 = h; h3 = h2[1]; } if h > h3 and h < h2 Then { h3 = h; } if l < l1 Then { l1 = l; l2 = l1[1]; l3 = l2[1]; } if l < l2 and l > l1 Then { l2 = l; l3 = l2[1]; } if l < l3 and l > l2 Then { h3 = l; } } if h1 > 0 Then plot1(h1); if h2 > 0 Then plot2(h2); if h3 > 0 Then plot3(h3); if l1 > 0 Then plot4(l1); if l2 > 0 Then plot5(l2); if l3 > 0 Then plot6(l3);