커뮤니티
시스템식문의
2012-11-13 15:19:41
293
글번호 56471
매수
2연상 이상의 연속상한가 발생 다음날 당일과
전일의 고가(연속상한가의 마지막 상한가)를 비교해서 더 높은 고가기준
-7%에 금액 a 만큼
-10%에 금액 b 만큼
-14%에 금액 c 만큼
-20%에 금액 d 만큼
분할매수
매도
이후 저점대비 (4번의 분할매수가 되지 않고 맨처음 -7%에서만 매수되었다해도) e % 만큼 상승시 전량매도
손절
손절 = 고가대비 -f %
감사합니다.
답변 1
예스스탁 예스스탁 답변
2012-11-13 19:10:33
안녕하세요
예스스탁입니다.
분봉차트에 적용하시면 됩니다.
input : entry1(-7),entry2(-10),entry3(-14),entry4(-20),e(10),f(40);
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 date != date[1] Then{
Condition1 = false;
Condition2 = Condition1[1];
Condition3 = Condition2[1];
}
if H >= 상한가 Then
Condition1 = true;
value1 = max(dayhigh,dayhigh(1));
if Condition2 == true and Condition3 == true Then{
if MarketPosition == 0 Then
buy("b1",AtStop,value1*(1+entry1/100));
}
if MarketPosition == 1 Then{
if CurrentContracts == MaxContracts Then{
buy("b2",AtStop,value1[BarsSinceEntry]*(1+entry2/100));
buy("b3",AtStop,value1[BarsSinceEntry]*(1+entry3/100));
buy("b4",AtStop,value1[BarsSinceEntry]*(1+entry4/100));
}
exitlong("bx1",atlimit,lowest(L,BarsSinceEntry)*(1+e/100));
exitlong("bx2",atlimit,value1[BarsSinceEntry]*(1-f/100));
}
즐거운 하루되세요
> gara0210 님이 쓴 글입니다.
> 제목 : 시스템식문의
> 매수
2연상 이상의 연속상한가 발생 다음날 당일과
전일의 고가(연속상한가의 마지막 상한가)를 비교해서 더 높은 고가기준
-7%에 금액 a 만큼
-10%에 금액 b 만큼
-14%에 금액 c 만큼
-20%에 금액 d 만큼
분할매수
매도
이후 저점대비 (4번의 분할매수가 되지 않고 맨처음 -7%에서만 매수되었다해도) e % 만큼 상승시 전량매도
손절
손절 = 고가대비 -f %
감사합니다.
다음글
이전글