커뮤니티
시스템 수식 부탁드립니다.
2015-04-01 22:10:39
170
글번호 84650
진입방법 : 수량
090000 시초가 이후
100000 의 가격이 090000보다 낮으면 매수
090000보다 높고(and) 평단가 보다 1% 이상 높으면 매도
110000 의 가격이 100000보다 낮으면 매수
100000보다 높고(and) 평단가 보다 1% 이상 높으면 매도
120000 의 가격이 110000보다 낮으면 매수
110000보다 높고(and) 평단가 보다 1% 이상 높으면 매도
130000 의 가격이 120000보다 낮으면 매수
120000보다 높고(and) 평단가 보다 1% 이상 높으면 매도
140000 의 가격이 130000보다 낮으면 매수
130000보다 높고(and) 평단가 보다 1% 이상 높으면 매도
144800 의 가격이 140000보다 낮으면 매수
140000보다 높고(and) 평단가 보다 1% 이상 높으면 매도
상한가 도달시 전량 매도
답변 1
예스스탁 예스스탁 답변
2015-04-02 09:25:25
안녕하세요
예스스스탁입니다.
피라미딩을 모든진입신호허용으로 설정하고 적용하시면 됩니다.
시간간격에 분수를 지정하시면 됩니다.
input : vol(10),시간간격(60);
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
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;
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;
}
}
var1 = TimeToMinutes(stime)%시간간격;
if dayindex == 0 Then
var2 = var1;
if dayindex == 0 or (var1<var1[1]and stime > stime[1]) Then
{
value1 = C;
value2 = value1[1];
if TimeToMinutes(stime) >= var1+시간간격 and stime < 144800 Then
{
if value1 < value2 Then
buy("b",OnClose,def,vol);
if value1 > value2 and C >= AvgEntryPrice*1.01 Then
exitlong("bx",OnClose,def,"",vol,2);
}
}
if stime == 144800 or (stime > 144800 and stime[1] < 144800) Then
{
if C < value1 Then
buy("b1",OnClose,def,vol);
if C > value1 and C >= AvgEntryPrice*1.01 Then
exitlong("bx1",OnClose,def,"",vol,2);
}
if MarketPosition == 1 Then
ExitLong("bx2",atlimit,상한가);
즐거운 하루되세요
> HI_so****** 님이 쓴 글입니다.
> 제목 : 시스템 수식 부탁드립니다.
> 진입방법 : 수량
090000 시초가 이후
100000 의 가격이 090000보다 낮으면 매수
090000보다 높고(and) 평단가 보다 1% 이상 높으면 매도
110000 의 가격이 100000보다 낮으면 매수
100000보다 높고(and) 평단가 보다 1% 이상 높으면 매도
120000 의 가격이 110000보다 낮으면 매수
110000보다 높고(and) 평단가 보다 1% 이상 높으면 매도
130000 의 가격이 120000보다 낮으면 매수
120000보다 높고(and) 평단가 보다 1% 이상 높으면 매도
140000 의 가격이 130000보다 낮으면 매수
130000보다 높고(and) 평단가 보다 1% 이상 높으면 매도
144800 의 가격이 140000보다 낮으면 매수
140000보다 높고(and) 평단가 보다 1% 이상 높으면 매도
상한가 도달시 전량 매도
다음글
이전글