커뮤니티
아까답변받았는데
2019-03-27 07:11:04
341
글번호 127410
키움 검색과 동일하게 했는데 종목검색의 결과가 나오질 않습니다.
한번 검토 부탁드립니다.
아래 검색식에서
and countif(H < O*1.10,60)[2] == 0 #2일봉전 기준 60봉 이내에서 시가대비 고가 10% 미만
and V[1] >= ma(V,60)[2]*5 #2일봉전부터 60일봉 기간내 평균거래량보다 1봉전 거래량이 500%이상
이 두가지 조건을 주석처리 하면 종목이 나오긴 하는데
두가지 중 하나라도 넣으면 종목이 뜨질 않습니다.
2일봉전 기준으로 60봉 동안 시가 고가 (또는 고가 시가) 등락이 각각 10%미만
2일봉전 기준으로 60일 일 평균 거래량보다 1일전 거래량이 5배
입니다.
var : 상한가(0), UpLimit(0), 전일상한가(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 if date >= 20050328 and date < 20150615 Then
UpLimit = (BP[0] * 1.15);
Else
UpLimit = (BP[0] * 1.30);
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;
}
}
if C < 상한가 //and C[1] < 상한가[1] //1일전 및 2일전 상한가가 아닐것
and C[1] >= O[1]*1.05 //1일봉전 시가대비 1일봉전 종가 등락률이 5%이상
and C[2] <= C[3]*1.05 //3일봉전 종가대비 2일봉전 종가 등락률이 5%이하
and H[1] >= C[2]*1.10 //2일봉전 종가 대비 1봉전 고가등락률이 10% 이상
and countif(H < O*1.10,60)[2] == 0 #2일봉전 기준 60봉 이내에서 시가대비 고가 10% 미만
and V[1] >= ma(V,60)[2]*5 #2일봉전부터 60일봉 기간내 평균거래량보다 1봉전 거래량이 500%이상
Then
find(1);
답변 1
예스스탁 예스스탁 답변
2019-03-27 11:46:29
안녕하세요
예스스탁입니다.
죄송합니다. 조건을 반대로 지정한 부분이 있었습니다.
var : 상한가(0), UpLimit(0), 전일상한가(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 if date >= 20050328 and date < 20150615 Then
UpLimit = (BP[0] * 1.15);
Else
UpLimit = (BP[0] * 1.30);
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;
}
}
if C < 상한가 //and C[1] < 상한가[1] //1일전 및 2일전 상한가가 아닐것
and C[1] >= O[1]*1.05 //1일봉전 시가대비 1일봉전 종가 등락률이 5%이상
and C[2] <= C[3]*1.05 //3일봉전 종가대비 2일봉전 종가 등락률이 5%이하
and H[1] >= C[2]*1.10 //2일봉전 종가 대비 1봉전 고가등락률이 10% 이상
and countif(H > O*1.10,60)[2] == 0 #2일봉전 기준 60봉 이내에서 시가대비 고가 10% 미만
and V[1] >= ma(V,60)[2]*5 #2일봉전부터 60일봉 기간내 평균거래량보다 1봉전 거래량이 500%이상
Then
find(1);
즐거운 하루되세요
> 가이츠 님이 쓴 글입니다.
> 제목 : 아까답변받았는데
> 키움 검색과 동일하게 했는데 종목검색의 결과가 나오질 않습니다.
한번 검토 부탁드립니다.
아래 검색식에서
and countif(H < O*1.10,60)[2] == 0 #2일봉전 기준 60봉 이내에서 시가대비 고가 10% 미만
and V[1] >= ma(V,60)[2]*5 #2일봉전부터 60일봉 기간내 평균거래량보다 1봉전 거래량이 500%이상
이 두가지 조건을 주석처리 하면 종목이 나오긴 하는데
두가지 중 하나라도 넣으면 종목이 뜨질 않습니다.
2일봉전 기준으로 60봉 동안 시가 고가 (또는 고가 시가) 등락이 각각 10%미만
2일봉전 기준으로 60일 일 평균 거래량보다 1일전 거래량이 5배
입니다.
var : 상한가(0), UpLimit(0), 전일상한가(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 if date >= 20050328 and date < 20150615 Then
UpLimit = (BP[0] * 1.15);
Else
UpLimit = (BP[0] * 1.30);
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;
}
}
if C < 상한가 //and C[1] < 상한가[1] //1일전 및 2일전 상한가가 아닐것
and C[1] >= O[1]*1.05 //1일봉전 시가대비 1일봉전 종가 등락률이 5%이상
and C[2] <= C[3]*1.05 //3일봉전 종가대비 2일봉전 종가 등락률이 5%이하
and H[1] >= C[2]*1.10 //2일봉전 종가 대비 1봉전 고가등락률이 10% 이상
and countif(H < O*1.10,60)[2] == 0 #2일봉전 기준 60봉 이내에서 시가대비 고가 10% 미만
and V[1] >= ma(V,60)[2]*5 #2일봉전부터 60일봉 기간내 평균거래량보다 1봉전 거래량이 500%이상
Then
find(1);
이전글