커뮤니티

ct시스템식을 yt로 변경 부탁 드립니다.

프로필 이미지
rlaxoeh
2012-04-06 20:06:53
440
글번호 49818
답변완료
안녕 하세요 4개의 ct시스템식을 yt로 변경 부탁 드립니다. 1번째 Input: s1(0.37), s2(2.7), s3(0.37), malen1(3), malen2(8), malen3(15) Var1=highd(1)-lowd(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(close,malen1,S) Var11=mov(close,malen2,S) Var12=mov(close,malen3,S) Cond10=var10>var11 And Var11>var12 Cond11=var10<var11 And Var11<var12 If ttime<1500 Then If Cond10 Then If Cond1=False Then Call buy("매수",Atstop,Def,opend+var1*s1) End If End If If Cond11 Then If Cond2=False Then Call sell("매도",Atstop,Def,opend-var1*S1) End If End if If Cond10 =False And Cond11 =False Then If Cond1=False Then Call buy("매수",Atstop,Def,opend+var1*s3) End If If Cond2=False Then Call sell("매도",Atstop,Def,opend-var1*S3) End If End If End If End If If position<>0 Then Call exitlong("매수추적스탑",Atstop,hhv(1,high,barnumsinceentry+1)-atr(20)*S2) Call exitshort("매도추적스탑",Atstop,llv(1,low,barnumsinceentry+1)+atr(20)*S2) End If 2번째 Input: len1(25), len2(6), s1(0.37), s2(2.7), level(50) Var1=slowk(len1,len2) If tdate<>tdate(1) Then Var10=9999999 Var11=0 Var50=currententrynum Cond1=False Cond2=False End If If crossup(Var1,level) Then Var10=high End If If crossdn(Var1,level) Then Var11=low End If Cond1=crossup(Var1, level) Cond2=crossdn(Var1, level) If currententrynum-var50=0 Then If ttime<1500 Then If opend< closed(1) Then Call buy("매수",Atstop,Def,Var10) End If If opend> closed(1) Then Call sell("매도", Atstop,Def,Var11) End If If Var1>level Then Call buy("매수1",Atstop,Def,opend+(highd(1)-lowd(1))*s1) End If If Var1<level Then Call sell("매도1",Atstop,Def,opend-(highd(1)-lowd(1))*s1) End If End If End If If position<>0 Then Call exitlong("매수추적",Atstop,hhv(1,high,barnumsinceentry+1) - atr(20)*s2) Call exitshort("매도추적",Atstop,llv(1,low,barnumsinceentry+1)+atr(20)*S2) End If If Cond2 Then Call exitlong("지표청산",Atstop,llv(1,low,3)) End If If Cond1 Then Call exitshort("지표청산",Atstop,hhv(1,high,3)) End If 3번째 Input:, len1(7), len2(10), ob1(90), os1(10), ob2(70), os2(30), level(0.01), s2(2.7) Var1=fastk(len1) Var2=fastk(len2) Cond1=var1>ob1 And Var2>ob2 '과매수 Cond2=var1<os1 And Var2<ob2 '과매도 Cond50= tdate=exitdate(1) And position(1)=1 Cond49= tdate=exitdate(1) And position(1)=-1 If ttime<1500 Then If Cond50=False Then If Cond1 Then If opend<close Then Call buy("매수",Atstop,Def,high+Atr(20)*level) End If End If End If If Cond49=False Then If Cond2 Then If opend>close Then Call sell("매도",Atstop,Def,low-Atr(20)*level) End If End If End If End If If position<>0 Then Call exitlong("추적스탑",Atstop,hhv(1,high,barnumsinceentry+1)-atr(20)*s2) Call exitshort("추적스탑",Atstop,llv(1,low,barnumsinceentry+1)+atr(20)*S2) End If 4번째 Input: len1(14), len2(50), delay(4), level(0.16), s1(0.37), s2(2.7) Var1=rsi(close,len1) If Var1>llv(1,Var1,len2) And low<=llv(1,low,len2) Then Var11=1 Else Var11=-1 End If If Var1<hhv(1,Var1,len2) And high>=hhv(1,high,len2) Then Var12=1 Else Var12=-1 End If Cond1=hhv(1,Var11,delay)=1 And Var1>llv(1,Var1,len2) And Var1<60 Cond2=hhv(1,Var12,delay)=1 And Var1<hhv(1,Var1,len2) And Var1>40 If tdate<>tdate(1) Then Var50=currententrynum End If If currententrynum-var50=0 Then If ttime<1500 Then If Var1>40 And Cond2=False Then Call buy("매수1",Atstop,Def,opend+(Highd(1)-lowd(1))*s1) End If If Var1<60 And Cond1=False Then Call sell("매도1",Atstop,Def,opend-(Highd(1)-lowd(1))*s1) End If End If End If If currententrynum-var50<=2 Then If ttime<1500 Then If Cond1 And opend-(highd(1)-lowd(1))*level < close Then Call buy("매수",Atstop,Def,hhv(1,high,2)) End If If Cond2 And opend+(highd(1)-lowd(1))*level>close then Call sell("매도",Atstop,Def,llv(1,low,2)) End If End If End If If position<>0 Then Call exitlong("매수추적",Atstop,hhv(1,high,barnumsinceentry+1)-atr(20)*S2) Call exitshort("매도추적",Atstop,llv(1,low,barnumsinceentry+1)+atr(20)*S2) End If 부탁 드립니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2012-04-09 09:53:42

안녕하세요 예스스탁입니다. 1. Input: s1(0.37), s2(2.7), s3(0.37), malen1(3), malen2(8), malen3(15); var :cond1(false),cond2(false),cond10(false),cond11(false); Var1 = highd(1)-lowd(1); Cond1 = sdate==exitdate(1) And marketposition(1)==1; Cond2 = sdate==exitdate(1) And marketposition(1)==-1; If malen1*1.5 <=malen2 And malen2*1.5<=malen3 then { Var10=ma(close,malen1); Var11=ma(close,malen2); Var12=ma(close,malen3); Cond10=var10>var11 And Var11>var12; Cond11=var10<var11 And Var11<var12; If stime<150000 then { If Cond10 then { If Cond1==False then { buy("매수1",Atstop,opend(0)+var1*s1); } } If Cond11 then { If Cond2==False then { sell("매도1",Atstop,opend(0)-var1*S1); } } If Cond10 == False And Cond11 == False then { If Cond1==False then { buy("매수2",Atstop,opend(0)+var1*s3); } If Cond2==False then { sell("매도",Atstop,opend(0)-var1*S3); } } } } If marketposition<>0 then { exitlong("매수추적스탑",Atstop,highest(high,barssinceentry+1)-atr(20)*S2); exitshort("매도추적스탑",Atstop,lowest(low,barssinceentry+1)+atr(20)*S2); } 2, Input: len1(25), len2(6), s1(0.37), s2(2.7), level(50); var : cond1(false),cond2(false); Var1=slowk(len1,len2); If sdate<>sdate[1] then{ Var10=9999999; Var11=0; Var50=totaltrades; Cond1=False; Cond2=False; } If crossup(Var1,level) then{ Var10=high; } If crossdown(Var1,level) then{ Var11=low; } Cond1=crossup(Var1, level); Cond2=CrossDown(Var1, level); If totaltrades-var50==0 then{ If stime<150000 then{ If opend(0)< closed(1) then{ buy("매수",Atstop,Var10); } If opend(0)> closed(1) then{ sell("매도", Atstop,Var11); } If Var1>level then{ buy("매수1",Atstop,opend(0)+(highd(1)-lowd(1))*s1); } If Var1<level then{ sell("매도1",Atstop,opend(0)-(highd(1)-lowd(1))*s1); } } } If MarketPosition<>0 then{ exitlong("매수추적",Atstop,Highest(high,barssinceentry+1) - atr(20)*s2); exitshort("매도추적",Atstop,Lowest(low,barssinceentry+1)+atr(20)*S2); } If Cond2 then{ exitlong("지표청산1",Atstop,lowest(low,3)); } If Cond1 then{ exitshort("지표청산2",Atstop,highest(high,3)); } 3. Input:, len1(7), len2(10), ob1(90), os1(10), ob2(70), os2(30), level(0.01), s2(2.7); var : cond1(false),cond2(false),cond50(false),cond49(false); Var1=fastk(len1); Var2=fastk(len2); Cond1=var1>ob1 And Var2>ob2;# '과매수 Cond2=var1<os1 And Var2<ob2;# '과매도 Cond50= sdate==exitdate(1) And MarketPosition(1)==1; Cond49= sdate==exitdate(1) And MarketPosition(1)==-1; If stime<150000 Then{ If Cond50==False Then{ If Cond1 Then{ If opend(0)<close Then{ buy("매수",Atstop,high+Atr(20)*level); } } } If Cond49==False Then{ If Cond2 Then{ If opend(0)>close Then{ sell("매도",Atstop,low-Atr(20)*level); } } } } If MarketPosition<>0 Then{ exitlong("추적스탑1",Atstop,Highest(high,barssinceentry+1)-atr(20)*s2); exitshort("추적스탑2",Atstop,lowest(low,barssinceentry+1)+atr(20)*S2); } 4. Input: len1(14), len2(50), delay(4), level(0.16), s1(0.37), s2(2.7); var : cond1(false),cond2(false); Var1=rsi(len1); If Var1>lowest(Var1,len2) And low<=lowest(low,len2) then Var11=1; Else Var11=-1; If Var1<highest(Var1,len2) And high>=lowest(high,len2) then Var12=1; Else Var12=-1; Cond1=highest(Var11,delay)==1 And Var1>lowest(Var1,len2) And Var1<60; Cond2=highest(Var12,delay)==1 And Var1<highest(Var1,len2) And Var1>40; If sdate<>sdate[1] then{ Var50=totaltrades; } If totaltrades-var50==0 then{ If stime<150000 then{ If Var1>40 And Cond2==False then{ buy("매수1",Atstop,opend(0)+(Highd(1)-lowd(1))*s1); } If Var1<60 And Cond1==False then{ sell("매도1",Atstop,opend(0)-(Highd(1)-lowd(1))*s1); } } } If totaltrades-var50<=2 then{ If stime<150000 then{ If Cond1 And opend(0)-(highd(1)-lowd(1))*level < close then{ buy("매수",Atstop,highest(high,2)); } If Cond2 And opend(0)+(highd(1)-lowd(1))*level>close then{ sell("매도",Atstop,lowest(low,2)); } } } If MarketPosition<>0 then{ exitlong("매수추적",Atstop,Highest(high,barssinceentry+1)-atr(20)*S2); exitshort("매도추적",Atstop,lowest(low,barssinceentry+1)+atr(20)*S2); } 즐거운 하루되세요 > rlaxoeh 님이 쓴 글입니다. > 제목 : ct시스템식을 yt로 변경 부탁 드립니다. > 안녕 하세요 4개의 ct시스템식을 yt로 변경 부탁 드립니다. 1번째 Input: s1(0.37), s2(2.7), s3(0.37), malen1(3), malen2(8), malen3(15) Var1=highd(1)-lowd(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(close,malen1,S) Var11=mov(close,malen2,S) Var12=mov(close,malen3,S) Cond10=var10>var11 And Var11>var12 Cond11=var10<var11 And Var11<var12 If ttime<1500 Then If Cond10 Then If Cond1=False Then Call buy("매수",Atstop,Def,opend+var1*s1) End If End If If Cond11 Then If Cond2=False Then Call sell("매도",Atstop,Def,opend-var1*S1) End If End if If Cond10 =False And Cond11 =False Then If Cond1=False Then Call buy("매수",Atstop,Def,opend+var1*s3) End If If Cond2=False Then Call sell("매도",Atstop,Def,opend-var1*S3) End If End If End If End If If position<>0 Then Call exitlong("매수추적스탑",Atstop,hhv(1,high,barnumsinceentry+1)-atr(20)*S2) Call exitshort("매도추적스탑",Atstop,llv(1,low,barnumsinceentry+1)+atr(20)*S2) End If 2번째 Input: len1(25), len2(6), s1(0.37), s2(2.7), level(50) Var1=slowk(len1,len2) If tdate<>tdate(1) Then Var10=9999999 Var11=0 Var50=currententrynum Cond1=False Cond2=False End If If crossup(Var1,level) Then Var10=high End If If crossdn(Var1,level) Then Var11=low End If Cond1=crossup(Var1, level) Cond2=crossdn(Var1, level) If currententrynum-var50=0 Then If ttime<1500 Then If opend< closed(1) Then Call buy("매수",Atstop,Def,Var10) End If If opend> closed(1) Then Call sell("매도", Atstop,Def,Var11) End If If Var1>level Then Call buy("매수1",Atstop,Def,opend+(highd(1)-lowd(1))*s1) End If If Var1<level Then Call sell("매도1",Atstop,Def,opend-(highd(1)-lowd(1))*s1) End If End If End If If position<>0 Then Call exitlong("매수추적",Atstop,hhv(1,high,barnumsinceentry+1) - atr(20)*s2) Call exitshort("매도추적",Atstop,llv(1,low,barnumsinceentry+1)+atr(20)*S2) End If If Cond2 Then Call exitlong("지표청산",Atstop,llv(1,low,3)) End If If Cond1 Then Call exitshort("지표청산",Atstop,hhv(1,high,3)) End If 3번째 Input:, len1(7), len2(10), ob1(90), os1(10), ob2(70), os2(30), level(0.01), s2(2.7) Var1=fastk(len1) Var2=fastk(len2) Cond1=var1>ob1 And Var2>ob2 '과매수 Cond2=var1<os1 And Var2<ob2 '과매도 Cond50= tdate=exitdate(1) And position(1)=1 Cond49= tdate=exitdate(1) And position(1)=-1 If ttime<1500 Then If Cond50=False Then If Cond1 Then If opend<close Then Call buy("매수",Atstop,Def,high+Atr(20)*level) End If End If End If If Cond49=False Then If Cond2 Then If opend>close Then Call sell("매도",Atstop,Def,low-Atr(20)*level) End If End If End If End If If position<>0 Then Call exitlong("추적스탑",Atstop,hhv(1,high,barnumsinceentry+1)-atr(20)*s2) Call exitshort("추적스탑",Atstop,llv(1,low,barnumsinceentry+1)+atr(20)*S2) End If 4번째 Input: len1(14), len2(50), delay(4), level(0.16), s1(0.37), s2(2.7) Var1=rsi(close,len1) If Var1>llv(1,Var1,len2) And low<=llv(1,low,len2) Then Var11=1 Else Var11=-1 End If If Var1<hhv(1,Var1,len2) And high>=hhv(1,high,len2) Then Var12=1 Else Var12=-1 End If Cond1=hhv(1,Var11,delay)=1 And Var1>llv(1,Var1,len2) And Var1<60 Cond2=hhv(1,Var12,delay)=1 And Var1<hhv(1,Var1,len2) And Var1>40 If tdate<>tdate(1) Then Var50=currententrynum End If If currententrynum-var50=0 Then If ttime<1500 Then If Var1>40 And Cond2=False Then Call buy("매수1",Atstop,Def,opend+(Highd(1)-lowd(1))*s1) End If If Var1<60 And Cond1=False Then Call sell("매도1",Atstop,Def,opend-(Highd(1)-lowd(1))*s1) End If End If End If If currententrynum-var50<=2 Then If ttime<1500 Then If Cond1 And opend-(highd(1)-lowd(1))*level < close Then Call buy("매수",Atstop,Def,hhv(1,high,2)) End If If Cond2 And opend+(highd(1)-lowd(1))*level>close then Call sell("매도",Atstop,Def,llv(1,low,2)) End If End If End If If position<>0 Then Call exitlong("매수추적",Atstop,hhv(1,high,barnumsinceentry+1)-atr(20)*S2) Call exitshort("매도추적",Atstop,llv(1,low,barnumsinceentry+1)+atr(20)*S2) End If 부탁 드립니다.