커뮤니티
원하는 그림이 나오지 않아 다시 한번....(35624)
2014-03-25 22:40:07
172
글번호 73850
손절,익절,필터링을 제외하고
매수,매도 신호만 주세요...
조건도 약간 수정합니다
input;kospiF1( 지정한 선물가격),kospiF2(0),kospiF3(0),kospiF4(0),kospiF5(0);
1.매수진입(10초봉 기준)
kospiF1+0.2P
.
.
kospiF5+0.2p 범위에서 종가or저가가 7개봉이상(연속되지않아도됨) 머무를때 시장가 매수
2.매도진입(10초봉 기준)
kospiF1-0.2P
.
.
kospiF5-0.2 범위에서 종가or고가가 7개봉이상(연속되지않아도됨) 머무를때 시장가 매도
답변 1
예스스탁 예스스탁 답변
2014-03-26 17:53:20
안녕하세요
예스스탁입니다.
2개 내용 참고하셔서 수정보완해 사용하시기 바랍니다.
1.
문의하신 내용이 최근 X개의 봉 중 조건만족한 봉이 N개이상이면 매수나 매도 진입이면
아래식 이용하시면 됩니다.
수식의 내용은 당일 X번째 봉부터
매수는
최근 X개의 봉 중 N개이상이 종가가 지정한 가격~+0.2 사이에 위치하거나
최근 X개의 봉 중 N개이상이 저가가 지정한 가격~+0.2 사이에 위치하면 매수
매도는
최근 X개의 봉 중 N개이상이 종가가 지정한 가격~-0.2 사이에 위치하거나
최근 X개의 봉 중 N개이상이 고가가 지정한 가격~-0.2 사이에 위치하면 매도하는 식입니다.
input:kospiF1(256),kospiF2(257),kospiF3(258),kospiF4(259),kospiF5(260),X(10),N(7);
if dayindex+1 >= X Then{
if countif(C>=kospiF1 and C <= kospiF1+0.2,X) >= N Or
countif(L>=kospiF1 and L <= kospiF1+0.2,X) >= N Then
buy("b1");
if countif(C>=kospiF2 and C <= kospiF2+0.2,X) >= N Or
countif(L>=kospiF2 and L <= kospiF2+0.2,X) >= N Then
buy("b2");
if countif(C>=kospiF3 and C <= kospiF3+0.2,X) >= N Or
countif(L>=kospiF3 and L <= kospiF3+0.2,X) >= N Then
buy("b3");
if countif(C>=kospiF4 and C <= kospiF4+0.2,X) >= N Or
countif(L>=kospiF4 and L <= kospiF4+0.2,X) >= N Then
buy("b4");
if countif(C>=kospiF5 and C <= kospiF5+0.2,X) >= N Or
countif(L>=kospiF5 and L <= kospiF5+0.2,X) >= N Then
buy("b5");
if countif(C<=kospiF1 and C >= kospiF1-0.2,X) >= N Or
countif(H<=kospiF1 and H <= kospiF1-0.2,X) >= N Then
sell("s1");
if countif(C<=kospiF2 and C >= kospiF2-0.2,X) >= N Or
countif(H<=kospiF2 and H <= kospiF2-0.2,X) >= N Then
sell("s2");
if countif(C<=kospiF3 and C >= kospiF3-0.2,X) >= N Or
countif(H<=kospiF3 and H <= kospiF3-0.2,X) >= N Then
sell("s3");
if countif(C<=kospiF4 and C >= kospiF4-0.2,X) >= N Or
countif(H<=kospiF4 and H <= kospiF4-0.2,8) >= N Then
sell("s4");
if countif(C<=kospiF5 and C >= kospiF5-0.2,X) >= N Or
countif(H<=kospiF5 and H <= kospiF5-0.2,X) >= N Then
sell("s5");
}
2.
종가나 저가가 위치한것을 합쳐서 N개 이상이면 매수
종가나 조가가 위치한것을 함쳐서 N개 이상이면 매도이면 아래식입니다.
input:kospiF1(256),kospiF2(257),kospiF3(258),kospiF4(259),kospiF5(260),X(10),N(7);
if dayindex+1 >= X Then{
if countif((C>=kospiF1 and C <= kospiF1+0.2) or (L>=kospiF1 and L <= kospiF1+0.2),X) >= N Then
buy("b1");
if countif((C>=kospiF2 and C <= kospiF2+0.2) or (L>=kospiF2 and L <= kospiF2+0.2),X) >= N Then
buy("b2");
if countif((C>=kospiF3 and C <= kospiF3+0.2) or (L>=kospiF3 and L <= kospiF3+0.2),X) >= N Then
buy("b3");
if countif((C>=kospiF4 and C <= kospiF4+0.2) or (L>=kospiF4 and L <= kospiF4+0.2),X) >= N Then
buy("b4");
if countif((C>=kospiF5 and C <= kospiF5+0.2) or (L>=kospiF5 and L <= kospiF5+0.2),X) >= N Then
buy("b5");
if countif((C<=kospiF1 and C >= kospiF1-0.2) or (H<=kospiF1 and H <= kospiF1-0.2),X) >= N Then
sell("s1");
if countif((C<=kospiF2 and C >= kospiF2-0.2) or (H<=kospiF2 and H <= kospiF2-0.2),X) >= N Then
sell("s2");
if countif((C<=kospiF3 and C >= kospiF3-0.2) or (H<=kospiF3 and H <= kospiF3-0.2),X) >= N Then
sell("s3");
if countif((C<=kospiF4 and C >= kospiF4-0.2) or (H<=kospiF4 and H <= kospiF4-0.2),X) >= N Then
sell("s4");
if countif((C<=kospiF5 and C >= kospiF5-0.2) or (H<=kospiF5 and H <= kospiF5-0.2),X) >= N Then
sell("s5");
}
3.
문의하신 내용이 최근 X개의 봉중에 N개가 아닌
단순 N개이상이면 N개를 새로 카운트하는 지점이 필요합니다.
아래식은 1번의 변형으로 당일날 조건만족횟수를 카운트해서 N개가 되면 매수나 매도를 하게 됩니다.
즉 N개를 카운트 하는 시작점이 당일 첫봉부터로 초기화 됩니다.
input:kospiF1(256),kospiF2(257),kospiF3(258),kospiF4(259),kospiF5(260),X(10),N(7);
var : Bcnt11(0),Bcnt12(0),Bcnt21(0),Bcnt22(0),Bcnt31(0),Bcnt32(0),Bcnt41(0),Bcnt42(0),Bcnt51(0),Bcnt52(0);
var : Scnt11(0),Scnt12(0),Scnt21(0),Scnt22(0),Scnt31(0),Scnt32(0),Scnt41(0),Scnt42(0),Scnt51(0),Scnt52(0);
if date != date[1] Then{
Bcnt11 = 0; Bcnt12 = 0;
Bcnt21 = 0; Bcnt22 = 0;
Bcnt31 = 0; Bcnt32 = 0;
Bcnt41 = 0; Bcnt42 = 0;
Bcnt51 = 0; Bcnt52 = 0;
Scnt11 = 0; Scnt12 = 0;
Scnt21 = 0; Scnt22 = 0;
Scnt31 = 0; Scnt32 = 0;
Scnt41 = 0; Scnt42 = 0;
Scnt51 = 0; Scnt52 = 0;
}
if C>=kospiF1 and C <= kospiF1+0.2 Then{
Bcnt11 = Bcnt11+1;
if Bcnt11 == N Then buy("b11");
}
if L>=kospiF1 and L <= kospiF1+0.2 Then{
Bcnt12 = Bcnt12+1;
if Bcnt12 == N Then buy("b12");
}
if C>=kospiF2 and C <= kospiF2+0.2 Then{
Bcnt21 = Bcnt21+1;
if Bcnt21 == N Then buy("b21");
}
if L>=kospiF2 and L <= kospiF2+0.2 Then{
Bcnt22 = Bcnt22+1;
if Bcnt22 == N Then buy("b22");
}
if C>=kospiF3 and C <= kospiF3+0.2 Then{
Bcnt31 = Bcnt31+1;
if Bcnt31 == N Then buy("b31");
}
if L>=kospiF3 and L <= kospiF3+0.2 Then{
Bcnt32 = Bcnt32+1;
if Bcnt32 == N Then buy("b32");
}
if C>=kospiF4 and C <= kospiF4+0.2 Then{
Bcnt41 = Bcnt41+1;
if Bcnt41 == N Then buy("b41");
}
if L>=kospiF4 and L <= kospiF4+0.2 Then{
Bcnt42 = Bcnt42+1;
if Bcnt42 == N Then buy("b42");
}
if C>=kospiF5 and C <= kospiF5+0.2 Then{
Bcnt51 = Bcnt51+1;
if Bcnt51 == N Then buy("b51");
}
if L>=kospiF5 and L <= kospiF5+0.2 Then{
Bcnt52 = Bcnt52+1;
if Bcnt52 == N Then buy("b52");
}
if C<=kospiF1 and C >= kospiF1-0.2 Then{
Scnt11 = Scnt11+1;
if Scnt11 == N Then Sell("s11");
}
if H <=kospiF1 and H >= kospiF1-0.2 Then{
Scnt12 = Scnt12+1;
if Scnt12 == N Then Sell("s12");
}
if C<=kospiF2 and C >= kospiF2-0.2 Then{
Scnt21 = Scnt21+1;
if Scnt21 == N Then Sell("s21");
}
if H <=kospiF2 and H >= kospiF2-0.2 Then{
Scnt22 = Scnt22+1;
if Scnt22 == N Then Sell("s22");
}
if C<=kospiF3 and C >= kospiF3-0.2 Then{
Scnt31 = Scnt31+1;
if Scnt31 == N Then Sell("s31");
}
if H <=kospiF3 and H >= kospiF3-0.2 Then{
Scnt32 = Scnt32+1;
if Scnt32 == N Then Sell("s32");
}
if C<=kospiF4 and C >= kospiF4-0.2 Then{
Scnt41 = Scnt41+1;
if Scnt41 == N Then Sell("s41");
}
if H <=kospiF4 and H >= kospiF4-0.2 Then{
Scnt42 = Scnt42+1;
if Scnt42 == N Then Sell("s42");
}
if C<=kospiF5 and C >= kospiF5-0.2 Then{
Scnt51 = Scnt51+1;
if Scnt51 == N Then Sell("s51");
}
if H <=kospiF5 and H >= kospiF5-0.2 Then{
Scnt52 = Scnt52+1;
if Scnt52 == N Then Sell("s52");
}
4.
2번 내용을 3번과 같이 당일 발생횟수로 카운트한 식입니다.
input:kospiF1(256),kospiF2(257),kospiF3(258),kospiF4(259),kospiF5(260),N(7);
var : Bcnt1(0),Bcnt2(0),Bcnt3(0),Bcnt4(0),Bcnt5(0);
var : Scnt1(0),Scnt2(0),Scnt3(0),Scnt4(0),Scnt5(0);
if date != date[1] Then{
Bcnt1 = 0;
Bcnt2 = 0;
Bcnt3 = 0;
Bcnt4 = 0;
Bcnt5 = 0;
Scnt1 = 0;
Scnt2 = 0;
Scnt3 = 0;
Scnt4 = 0;
Scnt5 = 0;
}
if (C>=kospiF1 and C <= kospiF1+0.2) or (L>=kospiF1 and L <= kospiF1+0.2) Then{
Bcnt1 = Bcnt1+1;
if Bcnt1 == N Then buy("b1");
}
if (C>=kospiF2 and C <= kospiF2+0.2) or (L>=kospiF2 and L <= kospiF2+0.2) Then{
Bcnt2 = Bcnt2+1;
if Bcnt2 == N Then buy("b2");
}
if (C>=kospiF3 and C <= kospiF3+0.2) or (L>=kospiF3 and L <= kospiF3+0.2) Then{
Bcnt3 = Bcnt3+1;
if Bcnt3 == N Then buy("b3");
}
if (C>=kospiF4 and C <= kospiF4+0.2) or (L>=kospiF4 and L <= kospiF4+0.2) Then{
Bcnt4 = Bcnt4+1;
if Bcnt4 == N Then buy("b4");
}
if (C>=kospiF5 and C <= kospiF5+0.2) or (L>=kospiF5 and L <= kospiF5+0.2) Then{
Bcnt5 = Bcnt5+1;
if Bcnt5 == N Then buy("b5");
}
if (C<=kospiF1 and C >= kospiF1-0.2) or (H <=kospiF1 and H >= kospiF1-0.2) Then{
Scnt1 = Scnt1+1;
if Scnt1 == N Then Sell("s1");
}
if (C<=kospiF2 and C >= kospiF2-0.2) or (H <=kospiF2 and H >= kospiF2-0.2) Then{
Scnt2 = Scnt2+1;
if Scnt2 == N Then Sell("s2");
}
if (C<=kospiF3 and C >= kospiF3-0.2) or (H <=kospiF3 and H >= kospiF3-0.2) Then{
Scnt3 = Scnt3+1;
if Scnt3 == N Then Sell("s3");
}
if (C<=kospiF4 and C >= kospiF4-0.2) or (H <=kospiF4 and H >= kospiF4-0.2) Then{
Scnt4 = Scnt4+1;
if Scnt4 == N Then Sell("s4");
}
if (C<=kospiF5 and C >= kospiF5-0.2) or (H <=kospiF5 and H >= kospiF5-0.2) Then{
Scnt5 = Scnt5+1;
if Scnt5 == N Then Sell("s5");
}
즐거운 하루되세요
> 하늘거지 님이 쓴 글입니다.
> 제목 : 원하는 그림이 나오지 않아 다시 한번....(35624)
>
손절,익절,필터링을 제외하고
매수,매도 신호만 주세요...
조건도 약간 수정합니다
input;kospiF1( 지정한 선물가격),kospiF2(0),kospiF3(0),kospiF4(0),kospiF5(0);
1.매수진입(10초봉 기준)
kospiF1+0.2P
.
.
kospiF5+0.2p 범위에서 종가or저가가 7개봉이상(연속되지않아도됨) 머무를때 시장가 매수
2.매도진입(10초봉 기준)
kospiF1-0.2P
.
.
kospiF5-0.2 범위에서 종가or고가가 7개봉이상(연속되지않아도됨) 머무를때 시장가 매도