예스스탁
예스스탁 답변
2022-01-26 13:49:28
안녕하세요
예스스탁입니다.
최근상장한 종목도 검색이 됩니다.
상한가감색식을 어떤 내용으로 작성하셨는지 모르겠지만
최근 n일안에 상한가종목을 검색한다면 n일을 지정하는 방법때문에
수식에서 요구되는 봉수를 충족하지 않아 검색되지 않을 수 있습니다.
아래 내용은 최근 10일안에 상한가종목을 검색하는 식입니다.
검색하시면 오토앤과 같이 최근 상장해서 상한가를 기록했던 종목도 검색이 됩니다.
var : 상한가(0), UpLimit(0);
var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),Up7(0);
var : idx(-1);
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 H >= 상한가 Then
idx = Index;
if idx >= 0 and Index < idx+10 Then
Find(1);
즐거운 하루되세요
> 소어드 님이 쓴 글입니다.
> 제목 : 최근 상장주 중에 상한가 검색방법
> 수고가 많으십니다.
상한가 검색시 최근 상장주는 검색이 안되는데...
방법이 없나요???
예스스탁
예스스탁 답변
2022-01-26 14:46:04
안녕하세요
예스스탁입니다.
1
종목검색을 하실때
속성에서 [검색에 필요한 최소기간]에 봉수를 넉넉히 지정하고 검색하셔야 합니다.
해당 옵션을 설정하지 않으면 종목검색은 최소의 데이타만으로 검색하기에
실제 수식에서 요구되는 봉수보다 작게 지정되어 종목이 검색되지 않을 수 있습니다.
특정종목이 상장한기간이 짧아 해당봉수만큼 과거봉이 없으면
있는 기간까지만 조회해서 검색을 하므로
봉수를 넉넉히 지정하고 검색하시면 됩니다.
2
if idx >= 0 and Index < idx+10 Then
Find(1);
작성해 드린 수식은 10일이내입니다.
해당 일수를 변경하면 그에 맞춰서 속성에서 봉수를 n개보다 크게 지정하시면 됩니다.
즐거운 하루되세요
> 소어드 님이 쓴 글입니다.
> 제목 : 최근상장주 안나옵니다...ㅠㅠ
>
안나옵니다...ㅠㅠ
케이옥션,오토앤,지아이텍,비트나인,아모센스....안나옵니다.
설정 에서 잘못 된건지요???