커뮤니티
문의 드립니다
2016-02-14 14:37:26
126
글번호 95363
하루 중에 상한가를 쳤다가 풀리고 다시 상한가에 진입한 종목을 찾고 싶습니다.
변수를 n으로 해서 찾고싶고, 며칠전의 종목 까지 찾을 수 있는지 궁금합니다.
답변 1
예스스탁 예스스탁 답변
2016-02-15 14:00:47
안녕하세요
예스스탁입니다.
N이 당일 상한가 달성횟수 있습니다.
nday로 일자를 지정하시면 됩니다.
0은 당일 , 1은 전일, 2는 전전일순입니다.
종목검색은 최대 500봉까지만 제공됩니다.
분봉에서 검색하셔야 하며
종목검색 속성에서 검색에 필요한 최소기간에 500으로
지정하고 검색하시기 바랍니다.
수식에서는 9일전까지 계산되게 되어 있지만
수식은 제공되는 봉 안에서만 검색이 됩니다.
봉수의 문제로 너무 긴 과거일은 검색이 되지 않습니다.
input : N(2);
input : nday(0);
var : 상한가(0), UpLimit(0),cnt(0);
var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),Up7(0);
Array : count[10](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 date != date[1] Then{
count[0] = 0;
if H >= 상한가 Then
count[0] = 0;
for cnt = 1 to 9{
count[cnt] = count[cnt-1][1];
}
}
if date == date[1] and H >= 상한가 and H[1] < 상한가 Then
count[0] = count[0]+1;
if count[nday] >= N Then
find(1);
즐거운 하루되세요
> rayleigh 님이 쓴 글입니다.
> 제목 : 문의 드립니다
> 하루 중에 상한가를 쳤다가 풀리고 다시 상한가에 진입한 종목을 찾고 싶습니다.
변수를 n으로 해서 찾고싶고, 며칠전의 종목 까지 찾을 수 있는지 궁금합니다.