커뮤니티
연속상한가
2011-12-06 00:02:58
489
글번호 45497
늘 감사합니다.
1. 6개월이내 연속상한3회이상 종목검색
2. 일봉기준 최고점일 전일종가대비 %로 하락시 검색
2-1 실시간으로 띄울수있다면 이것도 부탁드립니다.(따로따로만들어주시면감사해요)
두개 검색식 부탁드립니다. 언제쯤 맘대로 만들수있는날이올지.ㅠㅠ
답변 1
예스스탁 예스스탁 답변
2011-12-06 13:12:13
안녕하세요
예스스탁입니다.
1.
var : 상한가(0), UpLimit(0);
var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(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;
}
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;
}
}
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;
}
if CodeCategory() == 1 || CodeCategory() == 2 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
상한가 = iff(up6>=5000, up5, up6);
}
else if CodeCategory() == 8 || CodeCategory() == 9 then { // ETF
상한가 = up6;
}
}
if C >= 상한가 and C[1] >= 상한가[1] and C[2] < 상한가[2] Then
var1 = 1;
Else
var1 = 0;
#60일 동안 연속 상한가 3번 이상 기록한 종목
if AccumN(var1,60) >= 3 Then
find(1);
2,
문의하신 내용이 정확히 이해되지 않습니다.
전일종가가 N일간 최고가 대비 P%이상 하락한 종목을 찾는 식입니다.
input : N(20),P(10);
if C[1] <= highest(H,N)[1]*(1-P/100) Then
find(1);
3.
2번식 당일기준으로 만든식입니다.
input : N(20),P(10);
if C <= highest(H,N)*(1-P/100) Then
find(1);
즐거운 하루되세요
> WT_dapass 님이 쓴 글입니다.
> 제목 : 연속상한가
> 늘 감사합니다.
1. 6개월이내 연속상한3회이상 종목검색
2. 일봉기준 최고점일 전일종가대비 %로 하락시 검색
2-1 실시간으로 띄울수있다면 이것도 부탁드립니다.(따로따로만들어주시면감사해요)
두개 검색식 부탁드립니다. 언제쯤 맘대로 만들수있는날이올지.ㅠㅠ