커뮤니티
추가문의
2013-05-29 17:03:47
186
글번호 63756
안녕하세요
30570 지난 답변 감사드리구요.
추가로 문의드렸습니다.
답변 1
예스스탁 예스스탁 답변
2013-05-29 17:21:09
안녕하세요
예스스탁입니다.
직전거래의 포지션 확인이 잘못되어 수정했습니다.
아래식으로 테스트해 보시고 의도와 다른 부분 있으시면
다시 글 올려주시거나 02-3453-1060으로 전화주시기 바랍니다.
input : X(0),Y(0);
var : Xcond(false),Ycond(0),YY(0);
var : UPA1(0),DnA1(0),UPA2(0),DnA2(0),UPA3(0),DnA3(0),UPA4(0),DnA4(0);
var : UPB1(0),DnB1(0),UPB2(0),DnB2(0),UPB3(0),DnB3(0),UPB4(0),DnB4(0);
UpA1 = iff(A1 > A1[1],1,0);
UpA2 = iff(A2 > A2[1],1,0);
UpA3 = iff(A3 > A3[1],1,0);
UpA4 = iff(A4 > A4[1],1,0);
UpB1 = iff(B1 > B1[1],1,0);
UpB2 = iff(B2 > B2[1],1,0);
UpB3 = iff(B3 > B3[1],1,0);
UpB4 = iff(B4 > B4[1],1,0);
DnA1 = iff(A1 < A1[1],1,0);
DnA2 = iff(A2 < A2[1],1,0);
DnA3 = iff(A3 < A3[1],1,0);
DnA4 = iff(A4 < A4[1],1,0);
DnB1 = iff(B1 < B1[1],1,0);
DnB2 = iff(B2 < B2[1],1,0);
DnB3 = iff(B3 < B3[1],1,0);
DnB4 = iff(B4 < B4[1],1,0);
XCond = X == 0 and MarketPosition == 0 and ExitDate(1) == sdate and (IsExitName("BL",1) or IsExitName("SL",1));
Ycond = 0;
if MarketPosition == 0 and ExitDate(1) == sdate and (IsExitName("BP1",1) or IsExitName("BP2",1) or IsExitName("SP1",1) or IsExitName("SP2",1)) Then{
if Y == 0 Then
Ycond = 99;
if Y != 0 and MarketPosition(1) == 1 Then
Ycond = 1;
if Y != 0 and MarketPosition(1) == -1 Then
Ycond = -1;
}
if Xcond == false and stime >= 90500 and stime < 143000 then{
if (Ycond == 0 or Ycond == -1) and (UpA1+UpA2+UpA3+UpA4) >= 3 and (UpB1+UpB2+UpB3+UpB4) >= 3 Then
buy();
if (Ycond == 0 or Ycond == 1) and (DnA1+DnA2+DnA3+DnA4) >= 3 and (DnB1+DnB2+DnB3+DnB4) >= 3 Then
sell();
}
if (DnA1+DnA2+DnA3+DnA4) >= 2 and (DnB1+DnB2+DnB3+DnB4) >= 2 Then
ExitLong("bx");
if (UpA1+UpA2+UpA3+UpA4) >= 2 and (UpB1+UpB2+UpB3+UpB4) >= 2 Then
ExitShort("sx");
if MarketPosition == 1 Then{
ExitLong("BL",AtStop,daylow[BarsSinceEntry]-PriceScale*2);
if EntryTime < 93000 Then
ExitLong("BP1",atlimit,daylow*1.01);
Else
ExitLong("BP2",atlimit,EntryPrice*1.005);
}
if MarketPosition == -1 Then{
ExitShort("SL",AtStop,DayHigh[BarsSinceEntry]+PriceScale*2);
if EntryTime < 93000 Then
ExitShort("SP1",atlimit,DayHigh*0.99);
Else
ExitShort("SP2",atlimit,EntryPrice*0.995);
}
SetStopEndofday(150000);
즐거운 하루되세요
> HI_jhy6835 님이 쓴 글입니다.
> 제목 : 추가문의
> 안녕하세요
30570 지난 답변 감사드리구요.
추가로 문의드렸습니다.
다음글