커뮤니티
시스템 수식 부탁드립니다.
2015-12-28 18:03:07
151
글번호 93835
1분봉 챠트 적용
진입일자 지정
매수조건: 저점대비 +3% 상승시
진입 당일은 시초가를
상승시는 저점으로 하락시는 고점으로 인식
매도조건: 고점대비 -3% 하락시
상한가 매도
답변 1
예스스탁 예스스탁 답변
2015-12-29 10:42:51
안녕하세요
예스스탁입니다.
input : 진입일자(20151229),Left(3),Right(3);
var : T(0),HH(0),LL(0);
var : 상한가(0), UpLimit(0);
var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),Up7(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 sdate == 진입일자 and date != date[1] Then{
LL = O;
}
#진입일자 이후는
if sdate > 진입일자 Then{
#스윙로우 발생시 저점
if SwingLow(1,L,Left,Right,Left+Right+1) != -1 Then{
LL = L[right];
T = 1;
}
#스윙로우 발생시 고점
if SwingHigh(1,H,Left,Right,Left+Right+1) != -1 Then{
HH = H[right];
T = -1;
}
}
if sdate >= 진입일자 Then{
if T == 1 and NextBarOpen < LL*1.03 and LL > 0 Then
buy("b",AtStop,LL*1.03);
if MarketPosition == 1 and HH > 0 Then
ExitLong("bx",AtStop,HH*0.97);
exitlong("bx2",atlimit,상한가);
}
즐거운 하루되세요
> 승부사1 님이 쓴 글입니다.
> 제목 : 시스템 수식 부탁드립니다.
> 1분봉 챠트 적용
진입일자 지정
매수조건: 저점대비 +3% 상승시
진입 당일은 시초가를
상승시는 저점으로 하락시는 고점으로 인식
매도조건: 고점대비 -3% 하락시
상한가 매도