커뮤니티
수식 수정 부탁드립니다.
2012-01-03 10:58:01
353
글번호 46239
안녕하세요
새해복 많이 받으세요. 항상 감사합니다.
아래 조건을 첨부해서 다시 수식 수정 부탁드립니다.
<추가할 조건>
1. 선물로 시초가 대비 1.2% 이상 상승한 이후에는 (데이타2나 3이 시초가보다 크고) and 데이타4,5,6,7 중에서 2개아상이 시초가보다 작으면 매수금지
2. 선물로 시초가 대비 1.2% 이상 하락한 이후에는 (데이타2나 3이 시초가보다 작고) and 데이타4,5,6,7 중에서 2개아상이 시초가보다 크면 매도금지
var : PLR(0),XCommission(0,data1),XSlippage(0,data1),OpenPL(0,data1),dayPL(0,data1),count(0,data1),aa(0,data1);
var : mav1(0,data1),mav2(0,data1),mav3(0,data1),mav4(0,data1),cond(false,data1);
mav1 = data1(ma(c,5));
mav2 = data1(ma(c,10));
mav3 = data1(ma(c,20));
mav4 = data1(ma(c,60));
if data1(dayindex+1 >= 1 and dayindex+1 <= 30) and count < 3 and cond == false then{
if C > mav3 Then{
if data2(iff(C>O or (C==O and C>=C[1]),1,0))+
data3(iff(C>O or (C==O and C>=C[1]),1,0))+
data4(iff(C>O or (C==O and C>=C[1]),1,0)) >= 2 Then
buy("b2_1");
}
if C < mav3 Then{
if data2(iff(C<O or (C==O and C<C[1]),1,0))+
data3(iff(C<O or (C==O and C<C[1]),1,0))+
data4(iff(C<O or (C==O and C<C[1]),1,0)) >= 2 Then
Sell("s2_1");
}
if data1(dayindex+1 >= 1 and dayindex+1 <= 20) and count < 3 and cond == false then{
if C > mav2 Then{
if data2(countif(C>O or (C==O and C>=C[1]),2) == 2) and
data3(countif(C>O or (C==O and C>=C[1]),2) == 2) Then
buy("b2_2");
}
if C < mav2 Then{
if data2(countif(C<O or (C==O and C<C[1]),2) == 2) and
data3(countif(C<O or (C==O and C<C[1]),2) == 2) Then
Sell("s2_2");
}
}
답변 1
예스스탁 예스스탁 답변
2012-01-03 14:49:15
안녕하세요
예스스탁입니다.
var : PLR(0),XCommission(0,data1),XSlippage(0,data1),OpenPL(0,data1),dayPL(0,data1),count(0,data1),aa(0,data1);
var : mav1(0,data1),mav2(0,data1),mav3(0,data1),mav4(0,data1),cond(false,data1),Bcond(false,data1),Scond(false,data1);
mav1 = data1(ma(c,5));
mav2 = data1(ma(c,10));
mav3 = data1(ma(c,20));
mav4 = data1(ma(c,60));
Bcond = data1(C>=dayopen*1.012) and (data2(C>OpenD(0)) or data3(C>OpenD(0))) And
data4(iff(C<OpenD(0),1,0))+data5(iff(C<OpenD(0),1,0))+data6(iff(C<OpenD(0),1,0))+data7(iff(C<OpenD(0),1,0)) >= 2;
Scond = data1(C<=dayopen*0.988) and (data2(C<OpenD(0)) or data3(C<OpenD(0))) And
data4(iff(C>OpenD(0),1,0))+data5(iff(C>OpenD(0),1,0))+data6(iff(C>OpenD(0),1,0))+data7(iff(C>OpenD(0),1,0)) >= 2;
if data1(dayindex+1 >= 1 and dayindex+1 <= 30) and count < 3 and cond == false then{
if C > mav3 and Bcond == false Then{
if data2(iff(C>O or (C==O and C>=C[1]),1,0))+
data3(iff(C>O or (C==O and C>=C[1]),1,0))+
data4(iff(C>O or (C==O and C>=C[1]),1,0)) >= 2 Then
buy("b2_1");
}
if C < mav3 and Scond == false Then{
if data2(iff(C<O or (C==O and C<C[1]),1,0))+
data3(iff(C<O or (C==O and C<C[1]),1,0))+
data4(iff(C<O or (C==O and C<C[1]),1,0)) >= 2 Then
Sell("s2_1");
}
}
if data1(dayindex+1 >= 1 and dayindex+1 <= 20) and count < 3 and cond == false then{
if C > mav2 and Bcond == false Then{
if data2(countif(C>O or (C==O and C>=C[1]),2) == 2) and
data3(countif(C>O or (C==O and C>=C[1]),2) == 2) Then
buy("b2_2");
}
if C < mav2 and Bcond == false Then{
if data2(countif(C<O or (C==O and C<C[1]),2) == 2) and
data3(countif(C<O or (C==O and C<C[1]),2) == 2) Then
Sell("s2_2");
}
}
즐거운 하루되세요
> 강태공3 님이 쓴 글입니다.
> 제목 : 수식 수정 부탁드립니다.
> 안녕하세요
새해복 많이 받으세요. 항상 감사합니다.
아래 조건을 첨부해서 다시 수식 수정 부탁드립니다.
<추가할 조건>
1. 선물로 시초가 대비 1.2% 이상 상승한 이후에는 (데이타2나 3이 시초가보다 크고) and 데이타4,5,6,7 중에서 2개아상이 시초가보다 작으면 매수금지
2. 선물로 시초가 대비 1.2% 이상 하락한 이후에는 (데이타2나 3이 시초가보다 작고) and 데이타4,5,6,7 중에서 2개아상이 시초가보다 크면 매도금지
var : PLR(0),XCommission(0,data1),XSlippage(0,data1),OpenPL(0,data1),dayPL(0,data1),count(0,data1),aa(0,data1);
var : mav1(0,data1),mav2(0,data1),mav3(0,data1),mav4(0,data1),cond(false,data1);
mav1 = data1(ma(c,5));
mav2 = data1(ma(c,10));
mav3 = data1(ma(c,20));
mav4 = data1(ma(c,60));
if data1(dayindex+1 >= 1 and dayindex+1 <= 30) and count < 3 and cond == false then{
if C > mav3 Then{
if data2(iff(C>O or (C==O and C>=C[1]),1,0))+
data3(iff(C>O or (C==O and C>=C[1]),1,0))+
data4(iff(C>O or (C==O and C>=C[1]),1,0)) >= 2 Then
buy("b2_1");
}
if C < mav3 Then{
if data2(iff(C<O or (C==O and C<C[1]),1,0))+
data3(iff(C<O or (C==O and C<C[1]),1,0))+
data4(iff(C<O or (C==O and C<C[1]),1,0)) >= 2 Then
Sell("s2_1");
}
if data1(dayindex+1 >= 1 and dayindex+1 <= 20) and count < 3 and cond == false then{
if C > mav2 Then{
if data2(countif(C>O or (C==O and C>=C[1]),2) == 2) and
data3(countif(C>O or (C==O and C>=C[1]),2) == 2) Then
buy("b2_2");
}
if C < mav2 Then{
if data2(countif(C<O or (C==O and C<C[1]),2) == 2) and
data3(countif(C<O or (C==O and C<C[1]),2) == 2) Then
Sell("s2_2");
}
}
다음글
이전글