커뮤니티

수식부탁합니다.

프로필 이미지
피트
2013-04-22 11:26:10
184
글번호 62316
답변완료
언제나 친절하게 수식작성해주셔서 감사합니다. 대신 랭귀지입니다. 예스트레이더로 쓸수있게 수정부탁드립니다. 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 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 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
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2013-04-22 18:30:51

안녕하세요 예스스탁입니다. INPUT : atrlen(10),Len(10),len1(10),len2(10),len3(10),break(2),level(2),big(4); var : cond1(false),cond2(false); Var1 = DayHigh(1)-DayLow(1); Cond1 = sdate==exitdate(1) And MarketPosition(1)==1 ; Cond2 = sdate==exitdate(1) And MarketPosition(1)==-1 ; If stime < 150000 then{ If Cond1==False then{ buy("매수",Atstop,dayopen(0)+var1*len); } If Cond2==False then{ sell("매도",Atstop,dayopen(0)-var1*len); } } Var2=high-low; Var3=mA(Var2,atrlen); If MarketPosition==1 then{ Var50 = highest(High,BarsSinceEntry +1); exitlong("매수추적",Atstop,Var50-var3*len1); exitlong("매수변동성",Atstop,close-var3*len2 ); If Var50>= Entryprice+var3*break then{ exitlong("매수손익분기",Atstop,Entryprice+var3*level); exitlong("매수추적1",Atstop,Var50-var3*len3); } If Var50>=Entryprice+var3*big then{ exitlong("매수초과수익",Atstop,lowest(low,3)); } } If MarketPosition==-1 then{ Var50 = lowest(low,BarsSinceEntry+1); exitshort("매도추적",Atstop,Var50+var3*len1); exitshort("매도변동성",Atstop,close+var3*len2); If Var50<= Entryprice-var3*break then{ exitshort("매도손익분기",Atstop,Entryprice-var3*level); exitshort("매도추적1",Atstop,Var50+var3*len3); } If Var50<=Entryprice-var3*big then{ exitshort("매도초과수익",Atstop, Highest(high,3)); } } 즐거운 하루되세요 > 피트 님이 쓴 글입니다. > 제목 : 수식부탁합니다. > 언제나 친절하게 수식작성해주셔서 감사합니다. 대신 랭귀지입니다. 예스트레이더로 쓸수있게 수정부탁드립니다. 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 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 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