커뮤니티
수식 2개(^^) 부탁드립니다.
2014-10-15 09:30:43
171
글번호 79406
매수조건
1. 20ma가 60ma 위에 있고
2. 5ma가 20ma를 상향돌파
위 두조건 만족시 시장가 매수
매도조건
5ma가 20ma를 하향이탈하는 시장가 매도
손절매 5%
======================================
검색수식
1. 5일동안 한번이상 상한가간 종목
2. 5일동안 평균거래량 10만주 이상
3. 1ma가 120ma보다 크고 3% 이내
매매수식
1. 120ma에 닿을때 매수
2. 3% 수익 실현후 매도
손절매 3%
답변 1
예스스탁 예스스탁 답변
2014-10-15 11:12:03
안녕하세요
예스스탁입니다.
1.
var1 = ma(c,5);
var2 = ma(c,20);
var3 = ma(c,60);
if var2 > var3 and crossup(var1,var2) Then
buy();
if CrossDown(var1,var2) Then
sell();
SetStopLoss(5,PercentStop);
2.
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;
}
}
if countif(C>=상한가,5) >= 1 And
ma(V,5) >= 100000 And
ma(c,1) > ma(c,120) and ma(c,1) < ma(c,200)*1.03 Then
find(1);
3.
var1 = ma(c,120);
if crossup(c,var1) Then
buy();
SetStopProfittarget(3,PercentStop);
SetStoploss(3,PercentStop);
즐거운 하루되세요
> 승부사1 님이 쓴 글입니다.
> 제목 : 수식 2개(^^) 부탁드립니다.
> 매수조건
1. 20ma가 60ma 위에 있고
2. 5ma가 20ma를 상향돌파
위 두조건 만족시 시장가 매수
매도조건
5ma가 20ma를 하향이탈하는 시장가 매도
손절매 5%
======================================
검색수식
1. 5일동안 한번이상 상한가간 종목
2. 5일동안 평균거래량 10만주 이상
3. 1ma가 120ma보다 크고 3% 이내
매매수식
1. 120ma에 닿을때 매수
2. 3% 수익 실현후 매도
손절매 3%