커뮤니티
수식 요청
2007-04-11 17:03:30
1110
글번호 12313
저희가 해결하기 넘힘들어서 요청드립니다 예스차트3 시스템 사용코저 합니다
아래수식을 수정해서 yang12133 @ empal.com 으로 답변부탁드립니다
대단히감사합니다
malen1=5
malen2=20
malen3=60
s3=0.37
s2=4.0
Var1=highd(1)-open(1) '전일고가 당일시가차
Cond1= tdate=exitdate(1) And position(1)=-1 '최근청산날짜가 금일이고 직전이 매도
Cond2= tdate=exitdate(1) And position(1)=1 '최근청산날짜가 금일이고 직전이 매수
'이평 필터
If malen1*1.5 <= malen2 And malen2*1.5 <= malen3 Then '이평 기간값 비교
Var10=mov(high,malen1,s)
Var11=mov(open,malen2,s)
Var12=mov(close,malen3,s)
Cond10=var10<var11 And Var11<var12
Cond11=var10>var11 And Var11>var12
'진입
If ttime<1500 And position=0 Then
If Cond10 Then
If Cond1=False Then
Call sell("매도",Atstop,Def,opend-var1*S1)'지정가 저가 상향돌파시 매도
End If
End If
If Cond11 Then
If Cond2=False Then
Call buy("매수",Atstop,Def,opend+var1*s3) '지정가 고가 돌파 매수
End If
End If
If Cond10 =False And Cond11 =False Then
If Cond1=False Then
Call sell("매도",Atstop,Def,opend-var1*s3)'지정가 저가 상향돌파시 매도
End If
End If
If Cond10=False And Cond11=False Then
If Cond2=False Then
Call buy("매수",Atstop,Def,opend+var1*s1) '지정가 고가 돌파 매수
End If
End If
End If
End If
'청산
If position<>0 Then
Call exitshort("매도추적스탑",Atstop,hhv(1,high,Pos+1)+atr(9)*S3)
Call exitlong("매수추적스탑",Atstop,llv(1,low,pos+1)-atr(9)*s3)
End If
If ttime=1449 Then
Call exitshort("매도청산",Atmarket)
Call exitlong("매수청산",Atmarket)
End If
감사합니다
답변 1
예스스탁 예스스탁 답변
2007-04-11 10:19:01
> CJ_yang1130 님이 쓴 글입니다.
> 제목 : 수식 요청
> 저희가 해결하기 넘힘들어서 요청드립니다 예스차트3 시스템 사용코저 합니다
아래수식을 수정해서 yang12133 @ empal.com 으로 답변부탁드립니다
대단히감사합니다
malen1=5
malen2=20
malen3=60
s3=0.37
s2=4.0
Var1=highd(1)-open(1) '전일고저차
Cond1= tdate=exitdate(1) And position(1)=-1 '최근청산날짜가 금일이고 직전이 매도
Cond2= tdate=exitdate(1) And position(1)=1 '최근청산날짜가 금일이고 직전이 매수
'이평 필터
If malen1*1.5 <= malen2 And malen2*1.5 <= malen3 Then '이평 기간값 비교
Var10=mov(high,malen1,s)
Var11=mov(open,malen2,s)
Var12=mov(close,malen3,s)
Cond10=var10<var11 And Var11<var12
Cond11=var10>var11 And Var11>var12
'진입
If ttime<1500 And position=0 Then
If Cond10 Then
If Cond1=False Then
Call sell("매도",Atstop,Def,opend-var1*S1)'지정가 저가 상향돌파시 매도
End If
End If
If Cond11 Then
If Cond2=False Then
Call buy("매수",Atstop,Def,opend+var1*s3) '지정가 고가 돌파 매수
End If
End If
If Cond10 =False And Cond11 =False Then
If Cond1=False Then
Call sell("매도",Atstop,Def,opend-var1*s3)'지정가 저가 상향돌파시 매도
End If
End If
If Cond10=False And Cond11=False Then
If Cond2=False Then
Call buy("매수",Atstop,Def,opend+var1*s1) '지정가 고가 돌파 매수
End If
End If
End If
End If
'청산
If position<>0 Then
Call exitshort("매도추적스탑",Atstop,hhv(1,high,Pos+1)+atr(9)*S3)
Call exitlong("매수추적스탑",Atstop,llv(1,low,pos+1)-atr(9)*s3)
End If
If ttime=1449 Then
Call exitshort("매도청산",Atmarket)
Call exitlong("매수청산",Atmarket)
End If
감사합니다