커뮤니티
수식변환부탁드립니다.
2005-03-22 04:37:10
1030
글번호 6895
사이보스트레이더의 수식입니다. EZ-YES로 변환 부탁드립니다.
len=0.37
atrlen=50
len1=3
len2=2.2
len3=2.9
break=3
level=0.5
big=8
'기초진입전략---------------------------------------------------------
Var1=highd(1)-lowd(1) '전일고저차
Cond1= tdate=exitdate(1) And position(1)=1 '최근청산날짜가 금일이고 직전이 매수
Cond2= tdate=exitdate(1) And position(1)=-1 '최근청산날짜가 금일이고 직전이 매도
If ttime<1500 Then
If Cond1=False Then
Call buy("매수",Atstop,Def,opend+var1*len) '지정가 상향돌파시 매수
End If
If Cond2=False Then
Call sell("매도",Atstop,Def,opend-var1*len)'지정가 하향돌파시 매도
End If
End If
'Range5Stop1매수청산전략-----------------------------------------------
Var2=high-low '고저차
Var3=mov(Var2,atrlen,s)
If position=1 Then
Var50 = HHV(1,High,BarnumsinceEntry +1)
Call exitlong("매수추적",Atstop,Var50-var3*len1)
Call exitlong("매수변동성",Atstop,close-var3*len2 )
If Var50>= Entryprice+var3*break Then
Call exitlong("매수손익분기",Atstop,Entryprice+var3*level)
Call exitlong("매수추적1",Atstop,Var50-var3*len3)
End If
If Var50>=Entryprice+var3*big Then
Call exitlong("매수초과수익",Atstop,llv(1,low,3))
End If
End If
'Range5Stop1매도청산전략-----------------------------------------------
If position=-1 Then
Var50 = llv(1,low,BarnumsinceEntry +1)
Call exitshort("매도추적",Atstop,Var50+var3*len1)
Call exitshort("매도변동성",Atstop,close+var3*len2)
If Var50<= Entryprice-var3*break Then
Call exitshort("매도손익분기",Atstop,Entryprice-var3*level)
Call exitshort("매도추적1",Atstop,Var50+var3*len3)
End If
If Var50<=Entryprice-var3*big Then
Call exitshort("매도초과수익",Atstop, hhv(1,high,3))
End If
End If
답변 0
다음글
이전글