커뮤니티
원하는 주문이 발생하지 않습니다.
2010-02-09 13:35:30
701
글번호 27955
/* 아래식에서 2000년 08월 17일 09시 15분에
23번째 라인을 주석처리하면 5분봉에서 매도2가 발생하고, 그렇지 않으면 매도2 발생하지 않음, 그러나 3분봉에서는 매도2가 발생함
왜 그럴까요? */
input : len(4.8), len1(0.34),SPeriod(800),MPeriod(2400);
if(Dayindex==0) Then{
If dayOpen>dayClose(1) then {
Var1=(dayHigh(1)+dayClose(1)+2*dayLow(1))/2-dayLow(1);
Var2=(dayHigh(1)+dayClose(1)+2*dayLow(1))/2-dayHigh(1);
}
Else if dayOpen<dayClose(1) then {
Var1=(2*dayHigh(1)+dayClose(1)+dayLow(1))/2-dayLow(1);
Var2=(2*dayHigh(1)+dayClose(1)+dayLow(1))/2-dayHigh(1);
}
Else {
Var1=(dayHigh(1)+2*dayClose(1)+dayLow(1))/2-dayLow(1);
Var2=(dayHigh(1)+2*dayClose(1)+dayLow(1))/2-dayHigh(1);
}
Var4=Var1-Var2;
}
Condition2= date==exitdate(1) And marketposition(1)==-1;
If stime < 150000 then {
If Condition2==False and MarketPosition == 0 then {
If dayOpen>var1 then{
if ma(C[1],SPeriod) < ma(C[1],MPeriod) then //주석처리부분
sell("매도1",Atstop,Var1);
}
If dayOpen<var2 then {
sell("매도2",Atstop,dayOpen-Var4*len1);
}
}
}
if(sdate == 20000817 and stime == 091500) Then{
MessageLog("Open:%.2f, Close:%.2f, High:%.2f, Low:%.2f, 조건:%.2f",
O,C,H,Low,dayOpen-Var4*len1);
}
답변 1
예스스탁 예스스탁 답변
2010-02-09 14:30:45
> 안양초보 님이 쓴 글입니다.
> 제목 : 원하는 주문이 발생하지 않습니다.
> /* 아래식에서 2000년 08월 17일 09시 15분에
23번째 라인을 주석처리하면 5분봉에서 매도2가 발생하고, 그렇지 않으면 매도2 발생하지 않음, 그러나 3분봉에서는 매도2가 발생함
왜 그럴까요? */
input : len(4.8), len1(0.34),SPeriod(800),MPeriod(2400);
if(Dayindex==0) Then{
If dayOpen>dayClose(1) then {
Var1=(dayHigh(1)+dayClose(1)+2*dayLow(1))/2-dayLow(1);
Var2=(dayHigh(1)+dayClose(1)+2*dayLow(1))/2-dayHigh(1);
}
Else if dayOpen<dayClose(1) then {
Var1=(2*dayHigh(1)+dayClose(1)+dayLow(1))/2-dayLow(1);
Var2=(2*dayHigh(1)+dayClose(1)+dayLow(1))/2-dayHigh(1);
}
Else {
Var1=(dayHigh(1)+2*dayClose(1)+dayLow(1))/2-dayLow(1);
Var2=(dayHigh(1)+2*dayClose(1)+dayLow(1))/2-dayHigh(1);
}
Var4=Var1-Var2;
}
Condition2= date==exitdate(1) And marketposition(1)==-1;
If stime < 150000 then {
If Condition2==False and MarketPosition == 0 then {
If dayOpen>var1 then{
if ma(C[1],SPeriod) < ma(C[1],MPeriod) then //주석처리부분
sell("매도1",Atstop,Var1);
}
If dayOpen<var2 then {
sell("매도2",Atstop,dayOpen-Var4*len1);
}
}
}
if(sdate == 20000817 and stime == 091500) Then{
MessageLog("Open:%.2f, Close:%.2f, High:%.2f, Low:%.2f, 조건:%.2f",
O,C,H,Low,dayOpen-Var4*len1);
}
다음글
이전글