커뮤니티

37815번 60일 이내 에 연속상한가가 1번 이상 종목검색 수식이 틀리네요

프로필 이미지
회원
2014-08-27 23:13:01
174
글번호 78143
답변완료
37815번 60일 이내 에 연속상한가가 1번 이상 종목검색 수식이 틀리네요 가르쳐 주신 수식으로 검색된 종목이 틀리게 나오네요 그리고 60일 이내 2개이상 상한가 가 아니라 60일 이내에 연속으로 상한가가 있는 종목을 검색 부탁드립니다
종목검색
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2014-08-28 11:01:26

안녕하세요 예스스탁입니다. 해당식 60일 이내에 2일이상 연속상한가가 발생한적이 있는 종목을 찾는 식이 맞습니다. 다만 식에서 상한가 발생을 고가 까지로 지정했습니다. 만약 종가기준으로 판단하시면 아래와 같이 변경하시면 됩니다. input : NN(60); var : 상한가(0), UpLimit(0); var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),Up7(0); if date >= 19981207 then { if date < 20050328 && CodeCategory() == 2 then UpLimit = (BP[0] * 1.12); Else UpLimit = (BP[0] * 1.15); if CodeCategory() == 2 then { if date >= 20030721 then { up1 = int(UpLimit/100+0.00001)*100; up2 = int(UpLimit/100+0.00001)*100; up3 = int(UpLimit/100+0.00001)*100; up4 = int(UpLimit/50+0.00001)*50; up5 = int(UpLimit/10+0.00001)*10; up6 = int(UpLimit/5+0.00001)*5; up7 = int(UpLimit/1+0.00001)*1; } else { up1 = int(UpLimit/1000+0.00001)*1000; up2 = int(UpLimit/500+0.00001)*500; up3 = int(UpLimit/100+0.00001)*100; up4 = int(UpLimit/50+0.00001)*50; up5 = int(UpLimit/10+0.00001)*10; up6 = int(UpLimit/10+0.00001)*10; up7 = int(UpLimit/1+0.00001)*1; } } Else { up1 = int(UpLimit/1000+0.00001)*1000; up2 = int(UpLimit/500+0.00001)*500; up3 = int(UpLimit/100+0.00001)*100; up4 = int(UpLimit/50+0.00001)*50; up5 = int(UpLimit/10+0.00001)*10; up6 = int(UpLimit/5+0.00001)*5; up7 = int(UpLimit/1+0.00001)*1; } if CodeCategory() == 1 || CodeCategory() == 2 then { if sdate < 20101004 Then{ If BP >= 500000 Then 상한가 = up1; Else If BP >= 100000 Then 상한가 = iff(up2>=500000, up1, up2); Else If BP >= 50000 Then 상한가 = iff(up3>=100000, up2, up3); Else If BP >= 10000 Then 상한가 = iff(up4>=50000, up3, up4); Else If BP >= 5000 Then 상한가 = iff(up5>=10000, up4, up5); Else If BP >= 1000 Then 상한가 = iff(up5>=5000, up5, up6); Else 상한가 = iff(up6>=1000, up6, up6); } Else{ If BP >= 500000 Then 상한가 = up1; Else If BP >= 100000 Then 상한가 = iff(up2>=500000, up1, up2); Else If BP >= 50000 Then 상한가 = iff(up3>=100000, up2, up3); Else If BP >= 10000 Then 상한가 = iff(up4>=50000, up3, up4); Else If BP >= 5000 Then 상한가 = iff(up5>=10000, up4, up5); Else If BP >= 1000 Then 상한가 = iff(up5>=5000, up5, up6); Else 상한가 = iff(up6>=1000, up6, up7); } } else if CodeCategory() == 8 || CodeCategory() == 9 then { // ETF 상한가 = up6; } } Condition1 = countif(c >= 상한가,2) == 2; if countif(Condition1 == true,60) >= 1 Then find(1); 즐거운 하루되세요 > HI_yh**** 님이 쓴 글입니다. > 제목 : 37815번 60일 이내 에 연속상한가가 1번 이상 종목검색 수식이 틀리네요 > 37815번 60일 이내 에 연속상한가가 1번 이상 종목검색 수식이 틀리네요 가르쳐 주신 수식으로 검색된 종목이 틀리게 나오네요 그리고 60일 이내 2개이상 상한가 가 아니라 60일 이내에 연속으로 상한가가 있는 종목을 검색 부탁드립니다