예스스탁
예스스탁 답변
2012-02-08 18:59:01
안녕하세요
예스스탁입니다.
죄송합니다. 수식에 오타가 있었습니다.
if date != date[1] Then{
Condition1 = false;
Condition2 = false;
}
if MarketPosition == 0 and ExitDate(1) == sdate and IsExitName("bx",1) == true and C < ma(c,60) Then
Condition1 = true;
if MarketPosition == 0 and ExitDate(1) == sdate and IsExitName("sx",1) == true and C > ma(c,60) Then
Condition2 = true;
if data1(dayindex+1 >= 1 and dayindex+1 <= 20) then{
if (MarketPosition == 0 and ExitDate(1) != sdate) or
MarketPosition == -1 or
(MarketPosition == 0 and ExitDate(1) == sdate and Condition1 == false) Then{
if C > Max(mav1,mav2,mav3) and
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("b3_1");
}
if (MarketPosition == 0 and ExitDate(1) != sdate) or
MarketPosition == 1 or
(MarketPosition == 0 and ExitDate(1) == sdate and Condition2 == false) then{
if C < Min(mav1,mav2,mav3) and
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("s3_1");
}
}
if MarketPosition == 1 Then{
exitlong("bx",Atlimit,lowest(L,BarsSinceEntry)*1.0042);
}
if MarketPosition == -1 Then{
ExitShort("sx",Atlimit,Highest(H,BarsSinceEntry)*0.9958);
}
예 진입식이 여러개 일경우 매수전입식에
if (MarketPosition == 0 and ExitDate(1) != sdate) or
MarketPosition == -1 or
(MarketPosition == 0 and ExitDate(1) == sdate and Condition1 == false) Then{
매도진입식에
if (MarketPosition == 0 and ExitDate(1) != sdate) or
MarketPosition == 1 or
(MarketPosition == 0 and ExitDate(1) == sdate and Condition2 == false) then{
내용을 포함해 주시면 됩니다.
즐거운 하루되세요
> 강태공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:130%; margin-top:0; margin-bottom:0;">안녕하세요</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">항상 노고가 많으십니다.</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;"> </p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">앞 22848 번 문의
내용 관련하여 다시 문의드립니다.</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;"> </p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">일단 내가 청산으로
구현하고자 하는 것은 첨부파일에서 설정한 것을 </p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">수식을 표현하는
것인데 아래 두가지로 해보았지만 모두 결과값이 엄청나게 차이가 납니다.</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">첨부파일의 설정값은
풀이해주시고 다시 수식으로 좀 부탁드립니다.</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;"> </p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">if MarketPosition
== 1 Then{</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;"> exitlong("bx",Atlimit,lowest(L,BarsSinceEntry)*1.0042);</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">}</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">if MarketPosition
== -1 Then{</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;"> ExitShort("sx",Atlimit,Highest(H,BarsSinceEntry)*0.9958);</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">}</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;"> </p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">만약 0.42% 청산이
매수진입이휴의 최고가, 매도진입 이후의 최저가를 시면 청산식을 아래 내용으로
사용하시면 됩니다.</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;"> </p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">if MarketPosition
== 1 Then{</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;"> exitlong("bx",AtStop,Highest(H,BarsSinceEntry)*0.9958);</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">}</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">if MarketPosition
== -1 Then{</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;"> ExitShort("sx",AtStop,Lowest(L,BarsSinceEntry)*1.0042);</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">}</p>
<p> </p>
<p> </p>
<p style="line-height:145%; margin-top:0; margin-bottom:0;">그리고 아래에 뭔가
잘못된듯 합니다.</p>
<p style="line-height:145%; margin-top:0; margin-bottom:0;">빨간색 글자로 표시한
부분요 다시 한번 봐주세요.</p>
<p style="line-height:145%; margin-top:0; margin-bottom:0;">그리고 수식이 여러개일
경우에 </p>
<p style="line-height:145%; margin-top:0; margin-bottom:0;"><font color="black"> if (MarketPosition == 0 and ExitDate(1) != sdate) or <BR> MarketPosition == -1 or<BR> (MarketPosition == 0 and ExitDate(1) == false and Condition1 == false) Then{</font></p>
<p style="line-height:145%; margin-top:0; margin-bottom:0;">이부분만 수식마다
더 넣어주면 되나요?</p>
<p> </p>
<p>if date != date[1] Then{<BR> Condition1 = false;<BR> Condition2 = false;<BR>}<BR><BR>if MarketPosition == 0 and ExitDate(1) == sdate and IsExitName("bx",1) == true and C < ma(c,60) Then<BR> Condition1 = true;<BR>if MarketPosition == 0 and ExitDate(1) == sdate and IsExitName("sx",1) == true and C > ma(c,60) Then<BR> Condition2 = true;<BR><BR>if data1(dayindex+1 >= 1 and dayindex+1 <= 20) then{<BR> if (MarketPosition == 0 and ExitDate(1) != sdate) or <BR> MarketPosition ==<b><font color="red"> -1</font></b> or<BR> (MarketPosition == 0 and ExitDate(1) ==<b><font color="red"> false</font></b> and Condition1 == false) Then{<BR> if C > Max(mav1,mav2,mav3) and<BR> data2(iff(C>O or (C==O and C>=C[1]),1,0))+<BR> data3(iff(C>O or (C==O and C>=C[1]),1,0))+<BR> data4(iff(C>O or (C==O and C>=C[1]),1,0)) >= 2 Then<BR> buy("b3_1");<BR> }<BR> <BR> if (MarketPosition == 0 and ExitDate(1) != sdate) or <BR> MarketPosition == <font color="red"><b>-1 </b></font>or<BR> (MarketPosition == 0 and ExitDate(1) == <font color="red"><b>sdate</b></font> and Condition2 == false) then{<BR> if C < Min(mav1,mav2,mav3) and<BR> data2(iff(C<O or (C==O and C<C[1]),1,0))+<BR> data3(iff(C<O or (C==O and C<C[1]),1,0))+<BR> data4(iff(C<O or (C==O and C<C[1]),1,0)) >= 2 Then<BR> Sell("s3_1");<BR> <BR> }<BR>} <BR></p>
<p> </p>
<p> </p>
<p> </p>
</body>
</html>
첨부파일에 대한 답변이 빠졌네요.
html 로 올리니 내용에 그림이 니오지 않아서 잊으신것 같네요.
부탁드립니다.
첨부파일의 내용이 의미하는 것은 무엇이며 그것을 수식으로 표현부탁드립니다.
아래의 두 청산수식은 첨부파일의 설정값과는 맞지 않습니다.
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 수식 문의드립니다.
> 안녕하세요
예스스탁입니다.
죄송합니다. 수식에 오타가 있었습니다.
if date != date[1] Then{
Condition1 = false;
Condition2 = false;
}
if MarketPosition == 0 and ExitDate(1) == sdate and IsExitName("bx",1) == true and C < ma(c,60) Then
Condition1 = true;
if MarketPosition == 0 and ExitDate(1) == sdate and IsExitName("sx",1) == true and C > ma(c,60) Then
Condition2 = true;
if data1(dayindex+1 >= 1 and dayindex+1 <= 20) then{
if (MarketPosition == 0 and ExitDate(1) != sdate) or
MarketPosition == -1 or
(MarketPosition == 0 and ExitDate(1) == sdate and Condition1 == false) Then{
if C > Max(mav1,mav2,mav3) and
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("b3_1");
}
if (MarketPosition == 0 and ExitDate(1) != sdate) or
MarketPosition == 1 or
(MarketPosition == 0 and ExitDate(1) == sdate and Condition2 == false) then{
if C < Min(mav1,mav2,mav3) and
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("s3_1");
}
}
if MarketPosition == 1 Then{
exitlong("bx",Atlimit,lowest(L,BarsSinceEntry)*1.0042);
}
if MarketPosition == -1 Then{
ExitShort("sx",Atlimit,Highest(H,BarsSinceEntry)*0.9958);
}
예 진입식이 여러개 일경우 매수전입식에
if (MarketPosition == 0 and ExitDate(1) != sdate) or
MarketPosition == -1 or
(MarketPosition == 0 and ExitDate(1) == sdate and Condition1 == false) Then{
매도진입식에
if (MarketPosition == 0 and ExitDate(1) != sdate) or
MarketPosition == 1 or
(MarketPosition == 0 and ExitDate(1) == sdate and Condition2 == false) then{
내용을 포함해 주시면 됩니다.
즐거운 하루되세요
> 강태공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:130%; margin-top:0; margin-bottom:0;">안녕하세요</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">항상 노고가 많으십니다.</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;"> </p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">앞 22848 번 문의
내용 관련하여 다시 문의드립니다.</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;"> </p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">일단 내가 청산으로
구현하고자 하는 것은 첨부파일에서 설정한 것을 </p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">수식을 표현하는
것인데 아래 두가지로 해보았지만 모두 결과값이 엄청나게 차이가 납니다.</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">첨부파일의 설정값은
풀이해주시고 다시 수식으로 좀 부탁드립니다.</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;"> </p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">if MarketPosition
== 1 Then{</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;"> exitlong("bx",Atlimit,lowest(L,BarsSinceEntry)*1.0042);</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">}</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">if MarketPosition
== -1 Then{</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;"> ExitShort("sx",Atlimit,Highest(H,BarsSinceEntry)*0.9958);</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">}</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;"> </p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">만약 0.42% 청산이
매수진입이휴의 최고가, 매도진입 이후의 최저가를 시면 청산식을 아래 내용으로
사용하시면 됩니다.</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;"> </p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">if MarketPosition
== 1 Then{</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;"> exitlong("bx",AtStop,Highest(H,BarsSinceEntry)*0.9958);</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">}</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">if MarketPosition
== -1 Then{</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;"> ExitShort("sx",AtStop,Lowest(L,BarsSinceEntry)*1.0042);</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">}</p>
<p> </p>
<p> </p>
<p style="line-height:145%; margin-top:0; margin-bottom:0;">그리고 아래에 뭔가
잘못된듯 합니다.</p>
<p style="line-height:145%; margin-top:0; margin-bottom:0;">빨간색 글자로 표시한
부분요 다시 한번 봐주세요.</p>
<p style="line-height:145%; margin-top:0; margin-bottom:0;">그리고 수식이 여러개일
경우에 </p>
<p style="line-height:145%; margin-top:0; margin-bottom:0;"><font color="black"> if (MarketPosition == 0 and ExitDate(1) != sdate) or <BR> MarketPosition == -1 or<BR> (MarketPosition == 0 and ExitDate(1) == false and Condition1 == false) Then{</font></p>
<p style="line-height:145%; margin-top:0; margin-bottom:0;">이부분만 수식마다
더 넣어주면 되나요?</p>
<p> </p>
<p>if date != date[1] Then{<BR> Condition1 = false;<BR> Condition2 = false;<BR>}<BR><BR>if MarketPosition == 0 and ExitDate(1) == sdate and IsExitName("bx",1) == true and C < ma(c,60) Then<BR> Condition1 = true;<BR>if MarketPosition == 0 and ExitDate(1) == sdate and IsExitName("sx",1) == true and C > ma(c,60) Then<BR> Condition2 = true;<BR><BR>if data1(dayindex+1 >= 1 and dayindex+1 <= 20) then{<BR> if (MarketPosition == 0 and ExitDate(1) != sdate) or <BR> MarketPosition ==<b><font color="red"> -1</font></b> or<BR> (MarketPosition == 0 and ExitDate(1) ==<b><font color="red"> false</font></b> and Condition1 == false) Then{<BR> if C > Max(mav1,mav2,mav3) and<BR> data2(iff(C>O or (C==O and C>=C[1]),1,0))+<BR> data3(iff(C>O or (C==O and C>=C[1]),1,0))+<BR> data4(iff(C>O or (C==O and C>=C[1]),1,0)) >= 2 Then<BR> buy("b3_1");<BR> }<BR> <BR> if (MarketPosition == 0 and ExitDate(1) != sdate) or <BR> MarketPosition == <font color="red"><b>-1 </b></font>or<BR> (MarketPosition == 0 and ExitDate(1) == <font color="red"><b>sdate</b></font> and Condition2 == false) then{<BR> if C < Min(mav1,mav2,mav3) and<BR> data2(iff(C<O or (C==O and C<C[1]),1,0))+<BR> data3(iff(C<O or (C==O and C<C[1]),1,0))+<BR> data4(iff(C<O or (C==O and C<C[1]),1,0)) >= 2 Then<BR> Sell("s3_1");<BR> <BR> }<BR>} <BR></p>
<p> </p>
<p> </p>
<p> </p>
</body>
</html>
예스스탁
예스스탁 답변
2012-02-09 15:47:17
안녕하세요
예스스탁입니다.
첨부하신 그림과 같이
최대수익대비 하락은 %수익이후만 설정하시고
나머지를 0으로 하시면 단지 목표수익을 0.42% 설정하신 것과 같고
특별히 다른 의미가 있는 것은 아닙니다.
아래식으로 기준 청산식 변경하시면 됩니다.
if MarketPosition == 1 Then
exitlong("bx",Atlimit,EntryPrice*1.0042);
if MarketPosition == -1 Then
ExitShort("sx",Atlimit,EntryPrice*0.9958);
즐거운 하루되세요
> 강태공3 님이 쓴 글입니다.
> 제목 : Re : Re : 답변이 일부 빠졌네요.
> 첨부파일에 대한 답변이 빠졌네요.
html 로 올리니 내용에 그림이 니오지 않아서 잊으신것 같네요.
부탁드립니다.
첨부파일의 내용이 의미하는 것은 무엇이며 그것을 수식으로 표현부탁드립니다.
아래의 두 청산수식은 첨부파일의 설정값과는 맞지 않습니다.
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 수식 문의드립니다.
> 안녕하세요
예스스탁입니다.
죄송합니다. 수식에 오타가 있었습니다.
if date != date[1] Then{
Condition1 = false;
Condition2 = false;
}
if MarketPosition == 0 and ExitDate(1) == sdate and IsExitName("bx",1) == true and C < ma(c,60) Then
Condition1 = true;
if MarketPosition == 0 and ExitDate(1) == sdate and IsExitName("sx",1) == true and C > ma(c,60) Then
Condition2 = true;
if data1(dayindex+1 >= 1 and dayindex+1 <= 20) then{
if (MarketPosition == 0 and ExitDate(1) != sdate) or
MarketPosition == -1 or
(MarketPosition == 0 and ExitDate(1) == sdate and Condition1 == false) Then{
if C > Max(mav1,mav2,mav3) and
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("b3_1");
}
if (MarketPosition == 0 and ExitDate(1) != sdate) or
MarketPosition == 1 or
(MarketPosition == 0 and ExitDate(1) == sdate and Condition2 == false) then{
if C < Min(mav1,mav2,mav3) and
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("s3_1");
}
}
if MarketPosition == 1 Then{
exitlong("bx",Atlimit,lowest(L,BarsSinceEntry)*1.0042);
}
if MarketPosition == -1 Then{
ExitShort("sx",Atlimit,Highest(H,BarsSinceEntry)*0.9958);
}
예 진입식이 여러개 일경우 매수전입식에
if (MarketPosition == 0 and ExitDate(1) != sdate) or
MarketPosition == -1 or
(MarketPosition == 0 and ExitDate(1) == sdate and Condition1 == false) Then{
매도진입식에
if (MarketPosition == 0 and ExitDate(1) != sdate) or
MarketPosition == 1 or
(MarketPosition == 0 and ExitDate(1) == sdate and Condition2 == false) then{
내용을 포함해 주시면 됩니다.
즐거운 하루되세요
> 강태공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:130%; margin-top:0; margin-bottom:0;">안녕하세요</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">항상 노고가 많으십니다.</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;"> </p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">앞 22848 번 문의
내용 관련하여 다시 문의드립니다.</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;"> </p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">일단 내가 청산으로
구현하고자 하는 것은 첨부파일에서 설정한 것을 </p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">수식을 표현하는
것인데 아래 두가지로 해보았지만 모두 결과값이 엄청나게 차이가 납니다.</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">첨부파일의 설정값은
풀이해주시고 다시 수식으로 좀 부탁드립니다.</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;"> </p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">if MarketPosition
== 1 Then{</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;"> exitlong("bx",Atlimit,lowest(L,BarsSinceEntry)*1.0042);</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">}</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">if MarketPosition
== -1 Then{</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;"> ExitShort("sx",Atlimit,Highest(H,BarsSinceEntry)*0.9958);</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">}</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;"> </p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">만약 0.42% 청산이
매수진입이휴의 최고가, 매도진입 이후의 최저가를 시면 청산식을 아래 내용으로
사용하시면 됩니다.</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;"> </p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">if MarketPosition
== 1 Then{</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;"> exitlong("bx",AtStop,Highest(H,BarsSinceEntry)*0.9958);</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">}</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">if MarketPosition
== -1 Then{</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;"> ExitShort("sx",AtStop,Lowest(L,BarsSinceEntry)*1.0042);</p>
<p style="line-height:130%; margin-top:0; margin-bottom:0;">}</p>
<p> </p>
<p> </p>
<p style="line-height:145%; margin-top:0; margin-bottom:0;">그리고 아래에 뭔가
잘못된듯 합니다.</p>
<p style="line-height:145%; margin-top:0; margin-bottom:0;">빨간색 글자로 표시한
부분요 다시 한번 봐주세요.</p>
<p style="line-height:145%; margin-top:0; margin-bottom:0;">그리고 수식이 여러개일
경우에 </p>
<p style="line-height:145%; margin-top:0; margin-bottom:0;"><font color="black"> if (MarketPosition == 0 and ExitDate(1) != sdate) or <BR> MarketPosition == -1 or<BR> (MarketPosition == 0 and ExitDate(1) == false and Condition1 == false) Then{</font></p>
<p style="line-height:145%; margin-top:0; margin-bottom:0;">이부분만 수식마다
더 넣어주면 되나요?</p>
<p> </p>
<p>if date != date[1] Then{<BR> Condition1 = false;<BR> Condition2 = false;<BR>}<BR><BR>if MarketPosition == 0 and ExitDate(1) == sdate and IsExitName("bx",1) == true and C < ma(c,60) Then<BR> Condition1 = true;<BR>if MarketPosition == 0 and ExitDate(1) == sdate and IsExitName("sx",1) == true and C > ma(c,60) Then<BR> Condition2 = true;<BR><BR>if data1(dayindex+1 >= 1 and dayindex+1 <= 20) then{<BR> if (MarketPosition == 0 and ExitDate(1) != sdate) or <BR> MarketPosition ==<b><font color="red"> -1</font></b> or<BR> (MarketPosition == 0 and ExitDate(1) ==<b><font color="red"> false</font></b> and Condition1 == false) Then{<BR> if C > Max(mav1,mav2,mav3) and<BR> data2(iff(C>O or (C==O and C>=C[1]),1,0))+<BR> data3(iff(C>O or (C==O and C>=C[1]),1,0))+<BR> data4(iff(C>O or (C==O and C>=C[1]),1,0)) >= 2 Then<BR> buy("b3_1");<BR> }<BR> <BR> if (MarketPosition == 0 and ExitDate(1) != sdate) or <BR> MarketPosition == <font color="red"><b>-1 </b></font>or<BR> (MarketPosition == 0 and ExitDate(1) == <font color="red"><b>sdate</b></font> and Condition2 == false) then{<BR> if C < Min(mav1,mav2,mav3) and<BR> data2(iff(C<O or (C==O and C<C[1]),1,0))+<BR> data3(iff(C<O or (C==O and C<C[1]),1,0))+<BR> data4(iff(C<O or (C==O and C<C[1]),1,0)) >= 2 Then<BR> Sell("s3_1");<BR> <BR> }<BR>} <BR></p>
<p> </p>
<p> </p>
<p> </p>
</body>
</html>