예스스탁
예스스탁 답변
2011-02-15 11:24:17
안녕하세요
예스스탁입니다.
var : Di(0,data1),exitcond(false,data1),entryx1_1(0,data1),entryx1_2(0,data1),entryX2(false,data1),entrylimit(0,data1),
entryx3(0,data1),entryx4(0,data1),entryx5(0,data1),va1(0,data1),va2(0,data2),entryx6(0,data1);
di = data1(dayindex+1);
exitcond = ExitDate(1) == sdate and
(IsExitName("bx2",1) or IsExitName("bx4",1) or IsExitName("bx6",1) or IsExitName("bx7",1) or IsExitName("bx8",1) Or
IsExitName("sx2",1) or IsExitName("sx4",1) or IsExitName("sx6",1) or IsExitName("sx7",1) or IsExitName("sx8",1));
#진입제한 1
if data1(date != date[1]) Then{
entryX1_1 = 0;
entryx1_2 = 0;
}
if di >= 1 and di <= 10 Then{
if (MarketPosition == 1 and MarketPosition[1] != 1) or (MarketPosition == -1 and MarketPosition[1] != -1) Then
entryX1_1 = entryx1_1+1;
}
if di >= 11 and di <= 80 Then{
if (data3(C>OpenD(0)) and data4(C<OpenD(0)) and data5(C<OpenD(0))) Or
(data3(C<OpenD(0)) and data4(C>OpenD(0)) and data5(C>OpenD(0))) Then
entrylimit = 2;
Else
entrylimit = 3;
if (MarketPosition == 1 and MarketPosition[1] != 1) or (MarketPosition == -1 and MarketPosition[1] != -1) Then
entryx1_2 = entryx1_2+1;
}
#진입제한 2
if data1(date != date[1]) Then
entryx2 = false;
if stime == 111000 and data1(Highest(c,dayindex+1)- lowest(C,dayindex+1)) < 3 Then
entryX2 = True;
#진입제한 3
if di < 11 or di > 30 Then{
entryX3 = 0;
}
if di >= 11 and di <=30 Then{
if data4(C<=OpenD(0)) and data5(C<=OpenD(0)) and data9(c) == max(data9(c),data10(c),data11(c)) Then
entryX3 = 1;
if data4(C>=OpenD(0)) and data5(C>=OpenD(0)) and data9(c) == Min(data9(c),data10(c),data11(c)) Then
entryX3 = -1;
}
#진입제한 4
if Di == 1 Then
entryX4 = 0;
if data4(highD(0)<=OpenD(0)*0.972) or data5(highD(0)<=OpenD(0)*0.972) Then
entryX4 = 1;
if data4(highD(0)>=OpenD(0)*1.028) or data5(highD(0)>=OpenD(0)*1.028) Then
entryX4 = -1;
#진입제한 5
if di < 11 or di > 80 Then{
entryX5 = 0;
}
if di >= 11 and di <=80 Then{
if data4(C<=OpenD(0) and C > ma(C,40)) and data5(C<=OpenD(0) and C > ma(c,40)) Then
entryX5 = 1;
if data4(C>=OpenD(0) and c < ma(C,40)) and data5(C>=OpenD(0) and c< ma(C,40)) Then
entryX5 = -1;
}
#진입제한 6
va1 = data1(date - int(date/100)*100);
va1 = data1(DayOfWeek(date));
if va1 >= 8 and va1 <= 14 and va2 == 4 then{
if di <= 20 and dayhigh-daylow <= 2.5 Then
entryx6 = 20;
Else
entryx6 = 1;
SetStopEndofday(144600);
}
Else{
entryx6 = 1;
SetStopEndofday(150000);
}
if exitcond == false and Di >= entryx6 and
((di >= 1 and di <= 10 and entryx1_1 < 1) or (di >= 11 and di <= 80 and entryx1_2 < entrylimit) or (stime > 111000 and entryx2 == false)) Then{
if entryX3 != 1 and entryx4 != 1 and entryx5 != 1 Then{
if di >= 1 and di <= 10 and C > O and C < DayLow+3.6 and data2(C > ma(C,20)+0.4) Then
buy("b1");
if di >= 11 and di <= 80 and C < DayLow+3.6 and data2(C > ma(C,20)+0.4) Then
buy("b2_1");
if di >= 11 and di <= 80 and C > O and data3(C == highest(C,dayindex+1)) and data6(C > ma(C,40)) Then
buy("b2_2");
if di >= 18 and di <= 80 and C < daylow+3.6 and data5(C>ma(C,60) and C > OpenD(0)) Then
buy("b3");
if data3(dayindex==0 and C >= O*1.002) and data4(dayindex==0 and C >= O*1.002) Then
buy("b4");
if di >= 8 and di <= 15 and C > dayopen and data7(C>=O and C > ma(C,40)) Then
buy("b5");
}
if entryX3 != 1 and entryx4 != 1 and entryx5 != 1 Then{
if di >= 1 and di <= 10 and C < O and C > DayHigh-3.6 and data2(C < ma(C,20)-0.4) Then
Sell("S1");
if di >= 11 and di <= 80 and C > DayHigh-3.6 and data2(C < ma(C,20)-0.4) Then
Sell("S2_1");
if di >= 11 and di <= 80 and C < O and data3(C == Lowest(C,dayindex+1)) and data6(C < ma(C,40)) Then
Sell("S2_2");
if di >= 18 and di <= 80 and C > DayHigh-3.6 and data5(C<ma(C,60) and C < OpenD(0)) Then
Sell("S3");
if data3(dayindex==0 and C <= O*0.998) and data4(dayindex==0 and C <= O*0.998) Then
Sell("S4");
if di >= 8 and di <= 15 and C < dayopen and data7(C>=O and C < ma(C,40)) Then
Sell("S5");
}
}
if MarketPosition == 1 Then{
if C < ma(C,60)-0.05 and data2(C<ma(C,60)-0.04) Then
exitlong("bx1");
if TimeToMinutes(stime) >= TimeToMinutes(EntryTime)+180 and C < ma(C,60)-0.05 and data5(C<ma(C,40)-0.04) and C > EntryPrice Then
exitlong("bx2");
if data3(L <= OpenD(0)*0.965) Then
exitlong("bx4",atlimit,EntryPrice+2.1);
if data9(c) == max(data9(c),data10(c),data11(C)) and (data4(C<opend(0)) or data5(c<opend(0)) or data6(c<opend(0))) and stime >= 123000 and c >= EntryPrice+2.3 Then
ExitLong("bx6");
if data9(c) == max(data9(c),data10(c),data11(C)) and highest(H,BarsSinceEntry) >= EntryPrice+1.7 Then
ExitLong("bx7",AtStop,EntryPrice);
if di >= 20 and di <= 40 and data9(c) == max(data9(c),data10(c),data11(C)) Then
exitlong("bx8",atlimit,EntryPrice+2.2);
if di >= 50 Then
ExitLong("bx9",atlimit,EntryPrice+2.9);
}
if MarketPosition == -1 Then{
if C > ma(C,60)+0.05 and data2(C>ma(C,60)+0.04) Then
ExitShort("sx1");
if TimeToMinutes(stime) >= TimeToMinutes(EntryTime)+180 and C > ma(C,60)+0.05 and data5(C>ma(C,40)-0.04) and C < EntryPrice Then
ExitShort("sx2");
if data3(H <= OpenD(0)*1.035) Then
ExitShort("sx4",atlimit,EntryPrice-2.1);
if data9(c) == min(data9(c),data10(c),data11(C)) and (data4(C>=opend(0)) or data5(c>=opend(0)) or data6(c>=opend(0))) and stime >= 123000 and c <= EntryPrice-2.3 Then
ExitShort("sx6");
if data9(c) == min(data9(c),data10(c),data11(C)) and Lowest(L,BarsSinceEntry) <= EntryPrice-1.7 Then
ExitShort("sx7",AtStop,EntryPrice);
if di >= 20 and di <= 40 and data9(c) == min(data9(c),data10(c),data11(C)) Then
ExitShort("sx8",atlimit,EntryPrice-2.2);
if di >= 50 Then
ExitShort("sx9",atlimit,EntryPrice-2.9);
}
if stime > 111000 and entryx2 == false Then{
if MarketPosition == -1 Then{
if di >= 1 and di <= 10 and C > O and C < DayLow+3.6 and data2(C > ma(C,20)+0.4) Then
ExitShort("resx1");
if di >= 11 and di <= 80 and C < DayLow+3.6 and data2(C > ma(C,20)+0.4) Then
ExitShort("resx2_1");
if di >= 11 and di <= 80 and C > O and data3(C == highest(C,dayindex+1)) and data6(C > ma(C,40)) Then
ExitShort("resx2_2");
if di >= 18 and di <= 80 and C < daylow+3.6 and data5(C>ma(C,60) and C > OpenD(0)) Then
ExitShort("resx3");
if data3(dayindex==0 and C >= O*1.002) and data4(dayindex==0 and C >= O*1.002) Then
ExitShort("resx4");
if di >= 8 and di <= 15 and C > dayopen and data7(C>=O and C > ma(C,40)) Then
ExitShort("resx5");
}
if MarketPosition == 1 Then{
if di >= 1 and di <= 10 and C < O and C > DayHigh-3.6 and data2(C < ma(C,20)-0.4) Then
ExitLong("rebx1");
if di >= 11 and di <= 80 and C > DayHigh-3.6 and data2(C < ma(C,20)-0.4) Then
ExitLong("rebx2_1");
if di >= 11 and di <= 80 and C < O and data3(C == Lowest(C,dayindex+1)) and data6(C < ma(C,40)) Then
ExitLong("rebx2_2");
if di >= 18 and di <= 80 and C > DayHigh-3.6 and data5(C<ma(C,60) and C < OpenD(0)) Then
ExitLong("rebx3");
if data3(dayindex==0 and C <= O*0.998) and data4(dayindex==0 and C <= O*0.998) Then
ExitLong("rebx4");
if di >= 8 and di <= 15 and C < dayopen and data7(C>=O and C < ma(C,40)) Then
ExitLong("rebx5");
}
}
즐거운 하루되세요
> 강태공3 님이 쓴 글입니다.
> 제목 : 문의드립니다.
> <html>
<head>
<title>안녕하세요.</title>
<meta name="generator" content="Namo WebEditor v4.0">
</head>
<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> </p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">안녕하세요.</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">수식이 좀 길고 복잡한데 천천히 답변 주셔도 좋으니 잘 부탁드립니다.</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> </p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b><font color="red"><span style="font-size:14pt;">매수조건</span></font></b></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b>1. 금일 1봉부터 10봉까지</b></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> (1). 선물이 양봉이고 현재종가<금일 최저가+3.6p 이고
데이타2가 20이평+0.4 보다 크면 매수</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b>2. 금일 11봉부터 80봉까지</b></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b> </b>(1) 현재종가<금일 최저가+3.6p 이고 데이타2가 20이평+0.4
보다 크면 매수</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> (2) 선물이 양봉이고 데이타3이 금일
종가로 최고가(종가끼리만 비교해서)이고 데이타6이 40이평보다 크면 매수</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b>3. 금일 18봉부터 80봉까지</b></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> (1). 현재종가<금일 최저가+3.6p 이고 데이타5가 60 이평보다
크고 금일 시초가보다 크면 매수</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b>4. 금일 첫봉에서</b></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> (1). 데아타3과 4가 양봉이고 각각 양봉의 봉길이가 금일
시초가*0.002 보다 크면 매수</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b>5. 금일 8봉부터 15봉까지</b></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> (1). 선물은 시초가보다 크고 데이타7이 도지이거나 양봉이면서 40
이평보다 크면 매수</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b> </b></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b><font color="red">매수진입후 청산조건</font></b></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">1. 선물이 60이평-0.05 보다 작고 데이타2가 60 이평-0.04보다
작으면 청산</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">2. 진입후 3시간 이후이고 선물이 60이평-0.05 보다 작고 데이타5가 40이평보다
작고 현재 수익이면 청산후 금일 매매종료</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">3. 12시 이후이고 현재 2.2p이상 수익이고 데이타9,10,11 중에서 데이타9가 가장작으면
14시 10분까지는 종가로 본절이나 </p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> 손실오기 전에는 청산금지.</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">4. 진입후 데이타3 이 금일 시초가 대비 3.5% 이하 하락이면 2.1p 이상 수익시
스탑으로 익절하고 금일 매매종료</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">6. 진입후 데이타9,10,11 중에서 데이타9가 가장크고 데이타4,5,6중에서 한개라도
시초가보다 작거나 같고 현재</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> 12시 30분이후이고 수익이 2.3p 이상이면 청산후 금일 매매종료
</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">7, 진입후 현재 데이타9,10,11중에서 데이타9가 가장크면 1.7p 이상 수익후는
본절에 스탑으로 청산하고 금일 매매종료</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">8. 금일 20봉부터 40봉사이에 데이타9,10,11중에서 데이타9가 가장크면
2.2p 수익에 익절후 금일 매매종료</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> </p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b><font color="blue"><span style="font-size:14pt;">매도조건</span></font></b></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b>1. 금일 1봉부터 10봉까지</b></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> (1). 선물이 음봉이고 현재종가>금일 최고가-3.6p 이고
데이타2가 20이평-0.4 보다 작으면 매도</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b>2. 금일 11봉부터 80봉까지</b></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b> </b>(1) 현재종가>금일 최고가-3.6p 이고 데이타2가 20이평-0.4 보다 작으면 매도</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> (2) 선물이 음봉이고 데이타3이 금일
종가로 최저가(종가끼리만 비교해서)이고 데이타6이 40이평보다 작으면 매도</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b>3. 금일 18봉부터 80봉까지</b></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> (1). 현재종가>금일 최고가-3.6p 이고 데이타5가 60 이평보다
작고 금일 시초가보다 작으면 매도</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b>4. 금일 첫봉에서</b></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> (1). 데아타3과 4가 음봉이고 각각 음봉의 봉길이가 금일
시초가*0.002 보다 크면 매도</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b>5. 금일 8봉부터 15봉까지</b></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> (1). 선물은 시초가보다 작고 데이타7이 도지이거나 음봉이면서 40
이평보다 작으면 매도</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> </p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b><font color="blue">매도진입후 청산조건</font></b></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">1. 선물이 60이평+0.05 보다 크고 데이타2가 60 이평+0.04보다 크면 청산</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">2. 진입후 3시간 이후이고 선물이 60이평+0.05 보다 크고 데이타5가 40이평보다
크고 현재 수익이면 청산후 금일 매매종료</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">3. 12시 이후이고 현재 2.2p이상 수익이고 데이타9,10,11 중에서 데이타9가 가장
크면
14시 10분까지는 종가로 본절이나 </p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> 손실오기 전에는 청산금지.</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">4. 진입후 데이타3 이 금일 시초가 대비 3.5% 이상 상승이면 2.1p 이상 수익시
스탑으로 익절하고 금일 매매종료</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">6. 진입후 데이타9,10,11 중에서 데이타9가 가장 작고 데이타4,5,6중에서 한개라도
시초가보다 크거나 같고 현재</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> 12시 30분이후이고 수익이 2.3p 이상이면 청산후 금일 매매종료
</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">7, 진입후 현재 데이타9,10,11중에서 데이타9가 가장 작으면 1.7p 이상 수익후는
본절에 스탑으로 청산하고 금일 매매종료</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">8. 금일 20봉부터 40봉사이에 데이타9,10,11중에서 데이타9가 가장
작으면
2.2p 수익에 익절후 금일 매매종료</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> </p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b><font color="red"><span style="font-size:14pt;">진입제한 조건</span></font></b></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">1. 금일 1봉부터 10봉까지는 무조건 총 진입횟수가 1회 (진입후
반대 신호시 청산만 함)</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> 금일 11봉부터 80봉까지는 [데이타3이
시초가보다 크고 데이타4와5가 시초가보다 작거나] or [ 데이타3이 시초가보다</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> 작고
데이타4와5가 시초가보다 크면]
신규진입은 총 2회만(반대 신호시 청산만 함) 진입하고 그외에는 신규 진입을 총</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> 3회까지만
(총 3회 진입이후 반대신호시 청산만 함)
함</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">2. 금일 종가로 11시 10분까지의 최고가-최저가 의 값이
3p 이내이면 11시 10분 이후 신규진입 금지하고 포지션 있으면 </p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> 반대 신호시 청산 </p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">3. 장시작후 11봉부터 30봉까지는 </p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> (1) 데이타4와 5가 시초가보다 작거나 같고 데이타9,10,11 중에서
데이타9가 가장 크면 매수진입금지</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> (2) 데이타4와 5가 시초가보다 크거나 같고 데이타9,10,11 중에서
데이타9가 가장 작으면 매도진입금지</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">4. 데이타4나 5나 6중에서 힌개라도 시초가 대비 현재 2.8% 이상 상승했으면 매도진입
금지이고</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> 이중에서 한개라도 시초가대비 -2.8%이하 하락했으면
매수진입금지</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">5. 금일 11봉부터 80봉까지는</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> (1) 데이타4와 5가 모두 시초가보다 크거나 같고 둘다 40
이평보다 크면 매도진입금지</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> (2) 데이타4와 5가 모두 시초가보다 작거나 같고 둘다 40
이평보다 작으면 매수진입금지</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">6. 옵션만기일은 금일 첫봉부터 20봉까지의 최고가-최저가의
절대값이 2.5p 이하이면 금일 20번째봉부터 진입가능</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> 하고 14시 46분에는 무조건 청산하고 금일매매종료</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b> </b></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><font color="green"><span style="font-size:14pt;"><b>공통 청산조건</b></span></font></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">1. 진입후 금일시초가*0.0095 이상 수익후는 봉의 종가로 본절이나 손실시 청산</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">2. 현재 장시작하고 50봉이후이면 2.9p 이상 수익시 익절후 금일 매매종료.</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> </p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">문의사항이 있으시면 연락주세요. 010-3044-6622</p>
<p> </p>
<p> </p>
</body>
</html>
안녕하세요.
말씀드린데로 청산조건 3번을 뺀대신에 청산조건 1번을 이렇게 제한해주세요.
매수진입후 청산조건
1. 선물이 60이평-0.05 보다 작고 데이타2가 60 이평-0.04보다 작으면 청산
( 단 이때 현재 시간이 14시이후이고 진입후 최고수익이 한번이라도 2.1p이상 난 경우이고 데이타9,10,11 중에서 데이타9가 가장 작은 상태로 유지되면 청산금지하고 한번이라고 데이타9가 가장 작지 않고 위 청산조건에 들어가면 청산해야함- 하지만 공통청산조건 1번이 나오면 당연히 청산함)
매도진입후 청산조건
1. 선물이 60이평+0.05 보다 크고 데이타2가 60 이평+0.04보다 크면 청산
( 단 이때 현재 시간이 14시이후이고 진입후 최고수익이 한번이라도 2.1p이상 난 경우이고 데이타9,10,11 중에서 데이타9가 가장 큰상태로 유지되면 청산금지하고 한번이라고 데이타9가 가장 크지 않고 위 청산조건에 들어가면 청산해야함- 하지만 공통청산조건 1번이 나오면 당연히 청산함)
번거롭게 해드려서 죄송합니다.
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 문의드립니다.
> 안녕하세요
예스스탁입니다.
var : Di(0,data1),exitcond(false,data1),entryx1_1(0,data1),entryx1_2(0,data1),entryX2(false,data1),entrylimit(0,data1),
entryx3(0,data1),entryx4(0,data1),entryx5(0,data1),va1(0,data1),va2(0,data2),entryx6(0,data1);
di = data1(dayindex+1);
exitcond = ExitDate(1) == sdate and
(IsExitName("bx2",1) or IsExitName("bx4",1) or IsExitName("bx6",1) or IsExitName("bx7",1) or IsExitName("bx8",1) Or
IsExitName("sx2",1) or IsExitName("sx4",1) or IsExitName("sx6",1) or IsExitName("sx7",1) or IsExitName("sx8",1));
#진입제한 1
if data1(date != date[1]) Then{
entryX1_1 = 0;
entryx1_2 = 0;
}
if di >= 1 and di <= 10 Then{
if (MarketPosition == 1 and MarketPosition[1] != 1) or (MarketPosition == -1 and MarketPosition[1] != -1) Then
entryX1_1 = entryx1_1+1;
}
if di >= 11 and di <= 80 Then{
if (data3(C>OpenD(0)) and data4(C<OpenD(0)) and data5(C<OpenD(0))) Or
(data3(C<OpenD(0)) and data4(C>OpenD(0)) and data5(C>OpenD(0))) Then
entrylimit = 2;
Else
entrylimit = 3;
if (MarketPosition == 1 and MarketPosition[1] != 1) or (MarketPosition == -1 and MarketPosition[1] != -1) Then
entryx1_2 = entryx1_2+1;
}
#진입제한 2
if data1(date != date[1]) Then
entryx2 = false;
if stime == 111000 and data1(Highest(c,dayindex+1)- lowest(C,dayindex+1)) < 3 Then
entryX2 = True;
#진입제한 3
if di < 11 or di > 30 Then{
entryX3 = 0;
}
if di >= 11 and di <=30 Then{
if data4(C<=OpenD(0)) and data5(C<=OpenD(0)) and data9(c) == max(data9(c),data10(c),data11(c)) Then
entryX3 = 1;
if data4(C>=OpenD(0)) and data5(C>=OpenD(0)) and data9(c) == Min(data9(c),data10(c),data11(c)) Then
entryX3 = -1;
}
#진입제한 4
if Di == 1 Then
entryX4 = 0;
if data4(highD(0)<=OpenD(0)*0.972) or data5(highD(0)<=OpenD(0)*0.972) Then
entryX4 = 1;
if data4(highD(0)>=OpenD(0)*1.028) or data5(highD(0)>=OpenD(0)*1.028) Then
entryX4 = -1;
#진입제한 5
if di < 11 or di > 80 Then{
entryX5 = 0;
}
if di >= 11 and di <=80 Then{
if data4(C<=OpenD(0) and C > ma(C,40)) and data5(C<=OpenD(0) and C > ma(c,40)) Then
entryX5 = 1;
if data4(C>=OpenD(0) and c < ma(C,40)) and data5(C>=OpenD(0) and c< ma(C,40)) Then
entryX5 = -1;
}
#진입제한 6
va1 = data1(date - int(date/100)*100);
va1 = data1(DayOfWeek(date));
if va1 >= 8 and va1 <= 14 and va2 == 4 then{
if di <= 20 and dayhigh-daylow <= 2.5 Then
entryx6 = 20;
Else
entryx6 = 1;
SetStopEndofday(144600);
}
Else{
entryx6 = 1;
SetStopEndofday(150000);
}
if exitcond == false and Di >= entryx6 and
((di >= 1 and di <= 10 and entryx1_1 < 1) or (di >= 11 and di <= 80 and entryx1_2 < entrylimit) or (stime > 111000 and entryx2 == false)) Then{
if entryX3 != 1 and entryx4 != 1 and entryx5 != 1 Then{
if di >= 1 and di <= 10 and C > O and C < DayLow+3.6 and data2(C > ma(C,20)+0.4) Then
buy("b1");
if di >= 11 and di <= 80 and C < DayLow+3.6 and data2(C > ma(C,20)+0.4) Then
buy("b2_1");
if di >= 11 and di <= 80 and C > O and data3(C == highest(C,dayindex+1)) and data6(C > ma(C,40)) Then
buy("b2_2");
if di >= 18 and di <= 80 and C < daylow+3.6 and data5(C>ma(C,60) and C > OpenD(0)) Then
buy("b3");
if data3(dayindex==0 and C >= O*1.002) and data4(dayindex==0 and C >= O*1.002) Then
buy("b4");
if di >= 8 and di <= 15 and C > dayopen and data7(C>=O and C > ma(C,40)) Then
buy("b5");
}
if entryX3 != 1 and entryx4 != 1 and entryx5 != 1 Then{
if di >= 1 and di <= 10 and C < O and C > DayHigh-3.6 and data2(C < ma(C,20)-0.4) Then
Sell("S1");
if di >= 11 and di <= 80 and C > DayHigh-3.6 and data2(C < ma(C,20)-0.4) Then
Sell("S2_1");
if di >= 11 and di <= 80 and C < O and data3(C == Lowest(C,dayindex+1)) and data6(C < ma(C,40)) Then
Sell("S2_2");
if di >= 18 and di <= 80 and C > DayHigh-3.6 and data5(C<ma(C,60) and C < OpenD(0)) Then
Sell("S3");
if data3(dayindex==0 and C <= O*0.998) and data4(dayindex==0 and C <= O*0.998) Then
Sell("S4");
if di >= 8 and di <= 15 and C < dayopen and data7(C>=O and C < ma(C,40)) Then
Sell("S5");
}
}
if MarketPosition == 1 Then{
if C < ma(C,60)-0.05 and data2(C<ma(C,60)-0.04) Then
exitlong("bx1");
if TimeToMinutes(stime) >= TimeToMinutes(EntryTime)+180 and C < ma(C,60)-0.05 and data5(C<ma(C,40)-0.04) and C > EntryPrice Then
exitlong("bx2");
if data3(L <= OpenD(0)*0.965) Then
exitlong("bx4",atlimit,EntryPrice+2.1);
if data9(c) == max(data9(c),data10(c),data11(C)) and (data4(C<opend(0)) or data5(c<opend(0)) or data6(c<opend(0))) and stime >= 123000 and c >= EntryPrice+2.3 Then
ExitLong("bx6");
if data9(c) == max(data9(c),data10(c),data11(C)) and highest(H,BarsSinceEntry) >= EntryPrice+1.7 Then
ExitLong("bx7",AtStop,EntryPrice);
if di >= 20 and di <= 40 and data9(c) == max(data9(c),data10(c),data11(C)) Then
exitlong("bx8",atlimit,EntryPrice+2.2);
if di >= 50 Then
ExitLong("bx9",atlimit,EntryPrice+2.9);
}
if MarketPosition == -1 Then{
if C > ma(C,60)+0.05 and data2(C>ma(C,60)+0.04) Then
ExitShort("sx1");
if TimeToMinutes(stime) >= TimeToMinutes(EntryTime)+180 and C > ma(C,60)+0.05 and data5(C>ma(C,40)-0.04) and C < EntryPrice Then
ExitShort("sx2");
if data3(H <= OpenD(0)*1.035) Then
ExitShort("sx4",atlimit,EntryPrice-2.1);
if data9(c) == min(data9(c),data10(c),data11(C)) and (data4(C>=opend(0)) or data5(c>=opend(0)) or data6(c>=opend(0))) and stime >= 123000 and c <= EntryPrice-2.3 Then
ExitShort("sx6");
if data9(c) == min(data9(c),data10(c),data11(C)) and Lowest(L,BarsSinceEntry) <= EntryPrice-1.7 Then
ExitShort("sx7",AtStop,EntryPrice);
if di >= 20 and di <= 40 and data9(c) == min(data9(c),data10(c),data11(C)) Then
ExitShort("sx8",atlimit,EntryPrice-2.2);
if di >= 50 Then
ExitShort("sx9",atlimit,EntryPrice-2.9);
}
if stime > 111000 and entryx2 == false Then{
if MarketPosition == -1 Then{
if di >= 1 and di <= 10 and C > O and C < DayLow+3.6 and data2(C > ma(C,20)+0.4) Then
ExitShort("resx1");
if di >= 11 and di <= 80 and C < DayLow+3.6 and data2(C > ma(C,20)+0.4) Then
ExitShort("resx2_1");
if di >= 11 and di <= 80 and C > O and data3(C == highest(C,dayindex+1)) and data6(C > ma(C,40)) Then
ExitShort("resx2_2");
if di >= 18 and di <= 80 and C < daylow+3.6 and data5(C>ma(C,60) and C > OpenD(0)) Then
ExitShort("resx3");
if data3(dayindex==0 and C >= O*1.002) and data4(dayindex==0 and C >= O*1.002) Then
ExitShort("resx4");
if di >= 8 and di <= 15 and C > dayopen and data7(C>=O and C > ma(C,40)) Then
ExitShort("resx5");
}
if MarketPosition == 1 Then{
if di >= 1 and di <= 10 and C < O and C > DayHigh-3.6 and data2(C < ma(C,20)-0.4) Then
ExitLong("rebx1");
if di >= 11 and di <= 80 and C > DayHigh-3.6 and data2(C < ma(C,20)-0.4) Then
ExitLong("rebx2_1");
if di >= 11 and di <= 80 and C < O and data3(C == Lowest(C,dayindex+1)) and data6(C < ma(C,40)) Then
ExitLong("rebx2_2");
if di >= 18 and di <= 80 and C > DayHigh-3.6 and data5(C<ma(C,60) and C < OpenD(0)) Then
ExitLong("rebx3");
if data3(dayindex==0 and C <= O*0.998) and data4(dayindex==0 and C <= O*0.998) Then
ExitLong("rebx4");
if di >= 8 and di <= 15 and C < dayopen and data7(C>=O and C < ma(C,40)) Then
ExitLong("rebx5");
}
}
즐거운 하루되세요
> 강태공3 님이 쓴 글입니다.
> 제목 : 문의드립니다.
> <html>
<head>
<title>안녕하세요.</title>
<meta name="generator" content="Namo WebEditor v4.0">
</head>
<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> </p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">안녕하세요.</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">수식이 좀 길고 복잡한데 천천히 답변 주셔도 좋으니 잘 부탁드립니다.</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> </p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b><font color="red"><span style="font-size:14pt;">매수조건</span></font></b></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b>1. 금일 1봉부터 10봉까지</b></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> (1). 선물이 양봉이고 현재종가<금일 최저가+3.6p 이고
데이타2가 20이평+0.4 보다 크면 매수</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b>2. 금일 11봉부터 80봉까지</b></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b> </b>(1) 현재종가<금일 최저가+3.6p 이고 데이타2가 20이평+0.4
보다 크면 매수</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> (2) 선물이 양봉이고 데이타3이 금일
종가로 최고가(종가끼리만 비교해서)이고 데이타6이 40이평보다 크면 매수</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b>3. 금일 18봉부터 80봉까지</b></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> (1). 현재종가<금일 최저가+3.6p 이고 데이타5가 60 이평보다
크고 금일 시초가보다 크면 매수</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b>4. 금일 첫봉에서</b></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> (1). 데아타3과 4가 양봉이고 각각 양봉의 봉길이가 금일
시초가*0.002 보다 크면 매수</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b>5. 금일 8봉부터 15봉까지</b></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> (1). 선물은 시초가보다 크고 데이타7이 도지이거나 양봉이면서 40
이평보다 크면 매수</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b> </b></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b><font color="red">매수진입후 청산조건</font></b></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">1. 선물이 60이평-0.05 보다 작고 데이타2가 60 이평-0.04보다
작으면 청산</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">2. 진입후 3시간 이후이고 선물이 60이평-0.05 보다 작고 데이타5가 40이평보다
작고 현재 수익이면 청산후 금일 매매종료</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">3. 12시 이후이고 현재 2.2p이상 수익이고 데이타9,10,11 중에서 데이타9가 가장작으면
14시 10분까지는 종가로 본절이나 </p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> 손실오기 전에는 청산금지.</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">4. 진입후 데이타3 이 금일 시초가 대비 3.5% 이하 하락이면 2.1p 이상 수익시
스탑으로 익절하고 금일 매매종료</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">6. 진입후 데이타9,10,11 중에서 데이타9가 가장크고 데이타4,5,6중에서 한개라도
시초가보다 작거나 같고 현재</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> 12시 30분이후이고 수익이 2.3p 이상이면 청산후 금일 매매종료
</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">7, 진입후 현재 데이타9,10,11중에서 데이타9가 가장크면 1.7p 이상 수익후는
본절에 스탑으로 청산하고 금일 매매종료</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">8. 금일 20봉부터 40봉사이에 데이타9,10,11중에서 데이타9가 가장크면
2.2p 수익에 익절후 금일 매매종료</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> </p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b><font color="blue"><span style="font-size:14pt;">매도조건</span></font></b></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b>1. 금일 1봉부터 10봉까지</b></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> (1). 선물이 음봉이고 현재종가>금일 최고가-3.6p 이고
데이타2가 20이평-0.4 보다 작으면 매도</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b>2. 금일 11봉부터 80봉까지</b></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b> </b>(1) 현재종가>금일 최고가-3.6p 이고 데이타2가 20이평-0.4 보다 작으면 매도</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> (2) 선물이 음봉이고 데이타3이 금일
종가로 최저가(종가끼리만 비교해서)이고 데이타6이 40이평보다 작으면 매도</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b>3. 금일 18봉부터 80봉까지</b></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> (1). 현재종가>금일 최고가-3.6p 이고 데이타5가 60 이평보다
작고 금일 시초가보다 작으면 매도</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b>4. 금일 첫봉에서</b></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> (1). 데아타3과 4가 음봉이고 각각 음봉의 봉길이가 금일
시초가*0.002 보다 크면 매도</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b>5. 금일 8봉부터 15봉까지</b></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> (1). 선물은 시초가보다 작고 데이타7이 도지이거나 음봉이면서 40
이평보다 작으면 매도</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> </p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b><font color="blue">매도진입후 청산조건</font></b></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">1. 선물이 60이평+0.05 보다 크고 데이타2가 60 이평+0.04보다 크면 청산</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">2. 진입후 3시간 이후이고 선물이 60이평+0.05 보다 크고 데이타5가 40이평보다
크고 현재 수익이면 청산후 금일 매매종료</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">3. 12시 이후이고 현재 2.2p이상 수익이고 데이타9,10,11 중에서 데이타9가 가장
크면
14시 10분까지는 종가로 본절이나 </p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> 손실오기 전에는 청산금지.</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">4. 진입후 데이타3 이 금일 시초가 대비 3.5% 이상 상승이면 2.1p 이상 수익시
스탑으로 익절하고 금일 매매종료</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">6. 진입후 데이타9,10,11 중에서 데이타9가 가장 작고 데이타4,5,6중에서 한개라도
시초가보다 크거나 같고 현재</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> 12시 30분이후이고 수익이 2.3p 이상이면 청산후 금일 매매종료
</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">7, 진입후 현재 데이타9,10,11중에서 데이타9가 가장 작으면 1.7p 이상 수익후는
본절에 스탑으로 청산하고 금일 매매종료</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">8. 금일 20봉부터 40봉사이에 데이타9,10,11중에서 데이타9가 가장
작으면
2.2p 수익에 익절후 금일 매매종료</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> </p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b><font color="red"><span style="font-size:14pt;">진입제한 조건</span></font></b></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">1. 금일 1봉부터 10봉까지는 무조건 총 진입횟수가 1회 (진입후
반대 신호시 청산만 함)</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> 금일 11봉부터 80봉까지는 [데이타3이
시초가보다 크고 데이타4와5가 시초가보다 작거나] or [ 데이타3이 시초가보다</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> 작고
데이타4와5가 시초가보다 크면]
신규진입은 총 2회만(반대 신호시 청산만 함) 진입하고 그외에는 신규 진입을 총</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> 3회까지만
(총 3회 진입이후 반대신호시 청산만 함)
함</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">2. 금일 종가로 11시 10분까지의 최고가-최저가 의 값이
3p 이내이면 11시 10분 이후 신규진입 금지하고 포지션 있으면 </p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> 반대 신호시 청산 </p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">3. 장시작후 11봉부터 30봉까지는 </p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> (1) 데이타4와 5가 시초가보다 작거나 같고 데이타9,10,11 중에서
데이타9가 가장 크면 매수진입금지</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> (2) 데이타4와 5가 시초가보다 크거나 같고 데이타9,10,11 중에서
데이타9가 가장 작으면 매도진입금지</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">4. 데이타4나 5나 6중에서 힌개라도 시초가 대비 현재 2.8% 이상 상승했으면 매도진입
금지이고</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> 이중에서 한개라도 시초가대비 -2.8%이하 하락했으면
매수진입금지</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">5. 금일 11봉부터 80봉까지는</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> (1) 데이타4와 5가 모두 시초가보다 크거나 같고 둘다 40
이평보다 크면 매도진입금지</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> (2) 데이타4와 5가 모두 시초가보다 작거나 같고 둘다 40
이평보다 작으면 매수진입금지</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">6. 옵션만기일은 금일 첫봉부터 20봉까지의 최고가-최저가의
절대값이 2.5p 이하이면 금일 20번째봉부터 진입가능</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> 하고 14시 46분에는 무조건 청산하고 금일매매종료</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><b> </b></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"><font color="green"><span style="font-size:14pt;"><b>공통 청산조건</b></span></font></p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">1. 진입후 금일시초가*0.0095 이상 수익후는 봉의 종가로 본절이나 손실시 청산</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">2. 현재 장시작하고 50봉이후이면 2.9p 이상 수익시 익절후 금일 매매종료.</p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;"> </p>
<p style="line-height:190%; margin-top:0; margin-bottom:0;">문의사항이 있으시면 연락주세요. 010-3044-6622</p>
<p> </p>
<p> </p>
</body>
</html>
예스스탁
예스스탁 답변
2011-02-15 16:29:17
안녕하세요
예스스탁입니다.
var : Di(0,data1),exitcond(false,data1),entryx1_1(0,data1),entryx1_2(0,data1),entryX2(false,data1),entrylimit(0,data1),
entryx3(0,data1),entryx4(0,data1),entryx5(0,data1),va1(0,data1),va2(0,data2),entryx6(0,data1);
di = data1(dayindex+1);
exitcond = ExitDate(1) == sdate and
(IsExitName("bx2",1) or IsExitName("bx4",1) or IsExitName("bx6",1) or IsExitName("bx7",1) or IsExitName("bx8",1) Or
IsExitName("sx2",1) or IsExitName("sx4",1) or IsExitName("sx6",1) or IsExitName("sx7",1) or IsExitName("sx8",1));
#진입제한 1
if data1(date != date[1]) Then{
entryX1_1 = 0;
entryx1_2 = 0;
}
if di >= 1 and di <= 10 Then{
if (MarketPosition == 1 and MarketPosition[1] != 1) or (MarketPosition == -1 and MarketPosition[1] != -1) Then
entryX1_1 = entryx1_1+1;
}
if di >= 11 and di <= 80 Then{
if (data3(C>OpenD(0)) and data4(C<OpenD(0)) and data5(C<OpenD(0))) Or
(data3(C<OpenD(0)) and data4(C>OpenD(0)) and data5(C>OpenD(0))) Then
entrylimit = 2;
Else
entrylimit = 3;
if (MarketPosition == 1 and MarketPosition[1] != 1) or (MarketPosition == -1 and MarketPosition[1] != -1) Then
entryx1_2 = entryx1_2+1;
}
#진입제한 2
if data1(date != date[1]) Then
entryx2 = false;
if stime == 111000 and data1(Highest(c,dayindex+1)- lowest(C,dayindex+1)) < 3 Then
entryX2 = True;
#진입제한 3
if di < 11 or di > 30 Then{
entryX3 = 0;
}
if di >= 11 and di <=30 Then{
if data4(C<=OpenD(0)) and data5(C<=OpenD(0)) and data9(c) == max(data9(c),data10(c),data11(c)) Then
entryX3 = 1;
if data4(C>=OpenD(0)) and data5(C>=OpenD(0)) and data9(c) == Min(data9(c),data10(c),data11(c)) Then
entryX3 = -1;
}
#진입제한 4
if Di == 1 Then
entryX4 = 0;
if data4(highD(0)<=OpenD(0)*0.972) or data5(highD(0)<=OpenD(0)*0.972) Then
entryX4 = 1;
if data4(highD(0)>=OpenD(0)*1.028) or data5(highD(0)>=OpenD(0)*1.028) Then
entryX4 = -1;
#진입제한 5
if di < 11 or di > 80 Then{
entryX5 = 0;
}
if di >= 11 and di <=80 Then{
if data4(C<=OpenD(0) and C > ma(C,40)) and data5(C<=OpenD(0) and C > ma(c,40)) Then
entryX5 = 1;
if data4(C>=OpenD(0) and c < ma(C,40)) and data5(C>=OpenD(0) and c< ma(C,40)) Then
entryX5 = -1;
}
#진입제한 6
va1 = data1(date - int(date/100)*100);
va1 = data1(DayOfWeek(date));
if va1 >= 8 and va1 <= 14 and va2 == 4 then{
if di <= 20 and dayhigh-daylow <= 2.5 Then
entryx6 = 20;
Else
entryx6 = 1;
SetStopEndofday(144600);
}
Else{
entryx6 = 1;
SetStopEndofday(150200);
}
if exitcond == false and Di >= entryx6 and
((di >= 1 and di <= 10 and entryx1_1 < 1) or (di >= 11 and di <= 80 and entryx1_2 < entrylimit) or (stime > 111000 and entryx2 == false)) Then{
if entryX3 != 1 and entryx4 != 1 and entryx5 != 1 Then{
if di >= 1 and di <= 10 and C > O and C < DayLow+3.6 and data2(C > ma(C,20)+0.4) Then
buy("b1");
if di >= 11 and di <= 80 and C < DayLow+3.6 and data2(C > ma(C,20)+0.4) Then
buy("b2_1");
if di >= 11 and di <= 80 and C > O and data3(C == highest(C,dayindex+1)) and data6(C > ma(C,40)) Then
buy("b2_2");
if di >= 18 and di <= 80 and C < daylow+3.6 and data5(C>ma(C,60) and C > OpenD(0)) Then
buy("b3");
if data3(dayindex==0 and C >= O*1.002) and data4(dayindex==0 and C >= O*1.002) Then
buy("b4");
if di >= 8 and di <= 15 and C > dayopen and data7(C>=O and C > ma(C,40)) Then
buy("b5");
}
if entryX3 != 1 and entryx4 != 1 and entryx5 != 1 Then{
if di >= 1 and di <= 10 and C < O and C > DayHigh-3.6 and data2(C < ma(C,20)-0.4) Then
Sell("S1");
if di >= 11 and di <= 80 and C > DayHigh-3.6 and data2(C < ma(C,20)-0.4) Then
Sell("S2_1");
if di >= 11 and di <= 80 and C < O and data3(C == Lowest(C,dayindex+1)) and data6(C < ma(C,40)) Then
Sell("S2_2");
if di >= 18 and di <= 80 and C > DayHigh-3.6 and data5(C<ma(C,60) and C < OpenD(0)) Then
Sell("S3");
if data3(dayindex==0 and C <= O*0.998) and data4(dayindex==0 and C <= O*0.998) Then
Sell("S4");
if di >= 8 and di <= 15 and C < dayopen and data7(C>=O and C < ma(C,40)) Then
Sell("S5");
}
}
if MarketPosition == 1 Then{
if C < ma(C,60)-0.05 and data2(C<ma(C,60)-0.04) Then
exitlong("bx1");
if TimeToMinutes(stime) >= TimeToMinutes(EntryTime)+180 and C < ma(C,60)-0.05 and data5(C<ma(C,40)-0.04) and C > EntryPrice Then
exitlong("bx2");
if C < ma(C,60)-0.05 and data2(C <= ma(C,60)-0.04) and stime >= 140000 and EntryTime < 140000 and
highest(h,BarsSinceEntry) >= EntryPrice+2.1 and CountIF(data9(c) > min(data9(c),data10(c),data11(c)),BarsSinceEntry) >= 1 Then
ExitLong("bx3");
if data3(L <= OpenD(0)*0.965) Then
exitlong("bx4",atlimit,EntryPrice+2.1);
if data9(c) == max(data9(c),data10(c),data11(C)) and (data4(C<opend(0)) or data5(c<opend(0)) or data6(c<opend(0))) and stime >= 123000 and c >= EntryPrice+2.3 Then
ExitLong("bx6");
if data9(c) == max(data9(c),data10(c),data11(C)) and highest(H,BarsSinceEntry) >= EntryPrice+1.7 Then
ExitLong("bx7",AtStop,EntryPrice);
if di >= 20 and di <= 40 and data9(c) == max(data9(c),data10(c),data11(C)) Then
exitlong("bx8",atlimit,EntryPrice+2.2);
if di >= 50 Then
ExitLong("bx9",atlimit,EntryPrice+2.9);
}
if MarketPosition == -1 Then{
if C > ma(C,60)+0.05 and data2(C>ma(C,60)+0.04) Then
ExitShort("sx1");
if TimeToMinutes(stime) >= TimeToMinutes(EntryTime)+180 and C > ma(C,60)+0.05 and data5(C>ma(C,40)-0.04) and C < EntryPrice Then
ExitShort("sx2");
if C > ma(C,60)+0.05 and data2(C >= ma(C,60)+0.04) and stime >= 140000 and EntryTime < 140000 and
Lowest(L,BarsSinceEntry) <= EntryPrice-2.1 and CountIF(data9(c) < max(data9(c),data10(c),data11(c)),BarsSinceEntry) >= 1 Then
ExitShort("sx3");
if data3(H <= OpenD(0)*1.035) Then
ExitShort("sx4",atlimit,EntryPrice-2.1);
if data9(c) == min(data9(c),data10(c),data11(C)) and (data4(C>=opend(0)) or data5(c>=opend(0)) or data6(c>=opend(0))) and stime >= 123000 and c <= EntryPrice-2.3 Then
ExitShort("sx6");
if data9(c) == min(data9(c),data10(c),data11(C)) and Lowest(L,BarsSinceEntry) <= EntryPrice-1.7 Then
ExitShort("sx7",AtStop,EntryPrice);
if di >= 20 and di <= 40 and data9(c) == min(data9(c),data10(c),data11(C)) Then
ExitShort("sx8",atlimit,EntryPrice-2.2);
if di >= 50 Then
ExitShort("sx9",atlimit,EntryPrice-2.9);
}
if stime > 111000 and entryx2 == false Then{
if MarketPosition == -1 Then{
if di >= 1 and di <= 10 and C > O and C < DayLow+3.6 and data2(C > ma(C,20)+0.4) Then
ExitShort("resx1");
if di >= 11 and di <= 80 and C < DayLow+3.6 and data2(C > ma(C,20)+0.4) Then
ExitShort("resx2_1");
if di >= 11 and di <= 80 and C > O and data3(C == highest(C,dayindex+1)) and data6(C > ma(C,40)) Then
ExitShort("resx2_2");
if di >= 18 and di <= 80 and C < daylow+3.6 and data5(C>ma(C,60) and C > OpenD(0)) Then
ExitShort("resx3");
if data3(dayindex==0 and C >= O*1.002) and data4(dayindex==0 and C >= O*1.002) Then
ExitShort("resx4");
if di >= 8 and di <= 15 and C > dayopen and data7(C>=O and C > ma(C,40)) Then
ExitShort("resx5");
}
if MarketPosition == 1 Then{
if di >= 1 and di <= 10 and C < O and C > DayHigh-3.6 and data2(C < ma(C,20)-0.4) Then
ExitLong("rebx1");
if di >= 11 and di <= 80 and C > DayHigh-3.6 and data2(C < ma(C,20)-0.4) Then
ExitLong("rebx2_1");
if di >= 11 and di <= 80 and C < O and data3(C == Lowest(C,dayindex+1)) and data6(C < ma(C,40)) Then
ExitLong("rebx2_2");
if di >= 18 and di <= 80 and C > DayHigh-3.6 and data5(C<ma(C,60) and C < OpenD(0)) Then
ExitLong("rebx3");
if data3(dayindex==0 and C <= O*0.998) and data4(dayindex==0 and C <= O*0.998) Then
ExitLong("rebx4");
if di >= 8 and di <= 15 and C < dayopen and data7(C>=O and C < ma(C,40)) Then
ExitLong("rebx5");
}
}
즐거운 하루되세요