커뮤니티
시스템식 문의드립니다.
2013-01-06 23:25:45
339
글번호 57854
안녕하세요
1분봉에서 사용하려합니다.
상한가 이고 다음날 시가가 상한가대비
7%이상 10%미만이면 바로 매수하는식 부탁드립니다.
이렇게 매수할경우 몇번째 봉에서 진입하는지요
감사합니다 수고하세요
답변 1
예스스탁 예스스탁 답변
2013-01-07 18:00:30
안녕하세요
예스스탁입니다.
식 2개 올려드립니다.
각 1분봉에 적용하시면 됩니다.
1번식은 시초가에 신호가 발생하게 작성된 식입니다.
시초가에 신호를 발생하기 위해서는
전일 마지막봉에 if문을 만족시켜 다음날 시가 수신시에
신호가 발생하게 해야 합니다.
만약 해당종목이 상한가 발생한날 마지막봉이
15시봉이 아니면 신호가 발생하지 않습니다.
2번식은 첫봉완성시 신호가 발생하는 식입니다.
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 stime == 150000 and dayhigh >= 상한가 and
NextBarOpen >= DayClose(1)*1.07 and
NextBarOpen < DayClose(1)*1.10 Then
buy("b",AtMarket);
2번식
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 dayindex == 0 and dayhigh(1) >= 상한가[1] and
DayOpen >= DayClose(1)*1.07 and
DayOpen < DayClose(1)*1.10 Then
buy("b");
즐거운 하루되세요
> 머신 님이 쓴 글입니다.
> 제목 : 시스템식 문의드립니다.
> 안녕하세요
1분봉에서 사용하려합니다.
상한가 이고 다음날 시가가 상한가대비
7%이상 10%미만이면 바로 매수하는식 부탁드립니다.
이렇게 매수할경우 몇번째 봉에서 진입하는지요
감사합니다 수고하세요