커뮤니티

수식 수정 부탁드립니다.

프로필 이미지
강태공3
2019-06-27 13:41:18
201
글번호 129806
답변완료
안녕하세요. 수식 보완 수정 좀 부탁드립니다. 아래 수식에서 주식 상장한지 얼마 안되어서 총 형성된 봉의 숫자가 30봉부터 83봉 사이 밖에 되지 않더라도 아래 (aa<cc or bb>aa) and aa>dd and (bb>C or cc>C) 조건을 만족하면 종목이 검색되도록 수정 부탁드립니다. input : ndate(20181203); var : aa(0),bb(0),cc(0),dd(0), ll(0),cnt(0); aa = lowest(L,3); bb = lowest(L,57)[27]; dd = lowest(L,27)[3]; cc = L[84]; for cnt = 84 to index { if cnt <= 170 and L[cnt] < cc Then cc = L[cnt]; if cnt > 170 Then cnt = index+1; } if sdate == ndate and (aa<cc or bb>aa) and aa>dd and (bb>C or cc>C) Then Condition1 = true; if Condition1 == true then find(1);
검색
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2019-06-27 15:25:29

안녕하세요 예스스탁입니다. aa = lowest(L,3); bb = lowest(L,57)[27]; dd = lowest(L,27)[3]; 위와 같이 수식에 봉수가 특정되어 있으면 수식에서 해당 수식 계산에 필요한 봉수로 체크됩니다. 해당 내용을 피하기 위해서 아래와 같이 for문으로 수행해 값을 계산하셔야 합니다. input : ndate(20181203); var : aa(0),bb(0),cc(0),dd(0), ll(0),cnt(0); aa = 0; bb = 0; dd = 0; cc = 0; for cnt = 0 to index { if cnt >= 0 and cnt < 3 and (aa == 0 or aa > 0 and L[cnt] < aa) Then aa = L[cnt]; if cnt >= 27 and cnt < 84 and (bb == 0 or bb > 0 and L[cnt] < bb) Then bb = L[cnt]; if cnt >= 3 and cnt < 30 and (dd == 0 or dd > 0 and L[cnt] < dd) Then dd = L[cnt]; if cnt >= 84 and cnt <= 170 and (cc == 0 or cc > 0 and L[cnt] < cc) Then cc = L[cnt]; if cnt > 170 Then cnt = index+1; } if sdate == ndate and (aa<cc or bb>aa) and aa>dd and (bb>C or cc>C) Then Condition1 = true; if Condition1 == true then find(1); 즐거운 하루되세요 > 강태공3 님이 쓴 글입니다. > 제목 : 수식 수정 부탁드립니다. > 안녕하세요. 수식 보완 수정 좀 부탁드립니다. 아래 수식에서 주식 상장한지 얼마 안되어서 총 형성된 봉의 숫자가 30봉부터 83봉 사이 밖에 되지 않더라도 아래 (aa<cc or bb>aa) and aa>dd and (bb>C or cc>C) 조건을 만족하면 종목이 검색되도록 수정 부탁드립니다. input : ndate(20181203); var : aa(0),bb(0),cc(0),dd(0), ll(0),cnt(0); aa = lowest(L,3); bb = lowest(L,57)[27]; dd = lowest(L,27)[3]; cc = L[84]; for cnt = 84 to index { if cnt <= 170 and L[cnt] < cc Then cc = L[cnt]; if cnt > 170 Then cnt = index+1; } if sdate == ndate and (aa<cc or bb>aa) and aa>dd and (bb>C or cc>C) Then Condition1 = true; if Condition1 == true then find(1);