커뮤니티

CT를 YT로 변환 요청합니다.

프로필 이미지
마녀58
2023-11-26 13:40:38
1646
글번호 174325
답변완료
1 Input: len(10), len1(70), len2(0.37), s1(2.7), method(1), delay(8) If method=1 Then Var1=atr(len) Var2=atr(len1) Elseif method=2 Then Var20=high-low Var1=mov(Var20,len,s) Var2=mov(Var20,len1,s) End If Cond1=tdate=exitdate(1) And position(1)=1 Cond2=tdate=exitdate(1) And position(1)=-1 If Var1<var2 Then Var10=1 Else Var10=0 End If If hhv(1,Var10,delay)=1 Then If ttime<1500 Then If Cond1=False And high<opend+(highd(1)-lowd(1))*len2 Then Call buy("매수",Atstop,Def,opend+(highd(1)-lowd(1))*len2) End If IfCond2=False And low>opend-(highd(1)-lowd(1))*len2 Then Call sell("매도",Atstop,Def,opend-(highd(1)-lowd(1))*len2) End If If Cond1=False And high>opend+(highd(1)-lowd(1))*len2 Then Call buy("매수1",Atstop,Def,hhv(1,high,delay)) End If If Cond2=False And low<opend-(highd(1)-lowd(1))*len2 Then Callsell("매도1",Atstop,Def,llv(1,low,delay)) End If End if End If If position<>0then Call exitlong("매수청산",Atstop,hhv(1,high,barnumsinceentry+1)-atr(20)*s1) Call exitshort("매도청산",Atstop,llv(1,low,barnumsinceentry+1)+atr(20)*s1) End If 2 Input: len(40), len1(1), len2(30), multi(5), delay(5), s1(0.37), s2(2.7) Var50=bbandtop(close,len,len1,s) Var49=bbandbot(close,len,len1,s) Var1=var50-var49 Var2=high-low Var3=mov(Var2,len2,s)*multi Cond1= tdate=exitdate(1) And position(1)=1 Cond2= tdate=exitdate(1) And position(1)=-1 If Var1<var3 Then Var10=1 Else Var10=0 End If If hhv(1,Var10,delay)=1 then If ttime<1500 Then If Cond1=False And bbandmid(close,len,len1,s)>bbandmid(close,len,len1,s,1) Then Call buy("매수",Atstop,Def,opend+(highd(1)-lowd(1))*s1) End If If Cond2=False And bbandmid(close,len,len1,s)<bbandmid(close,len,len1,s,1) Then Call sell("매도",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 3(그물망) Input :len(20), cont(10), stepp(2), multi(2), delay(5), s1(0.37), s2(2.7) Var50=mov(close,len,s) Var49=mov(close,len,s) For i = 1 To cont If Var50<mov(close,len+stepp*i,s) Then Var50=mov(close,len+stepp*i,s) End If If Var49>mov(close,len+stepp*i,s) Then Var49=mov(close,len+stepp*i,s) End If Next Var1=var50-var49 Var2=high-low Var3=mov(Var2,len,s)*multi Cond1= tdate=exitdate(1) And position(1)=1 Cond2= tdate=exitdate(1) And position(1)=-1 If Var1<var3 Then Var10=1 Else Var10=0 End If If hhv(1,Var10,delay)=1 And hhb(1,Var10,delay)=delay-1 Then If ttime<1500 Then If Cond1=False Then Call buy("매수",Atstop,Def,opend+(highd(1)-lowd(1))*s1) End If If Cond2=False Then Call sell("매도",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 4(adx) Input: len(21), level(30), delay(2), s1(0.37), s2(2.7) Var1=adx(len) Cond1= tdate=exitdate(1) And position(1)=1 Cond2= tdate=exitdate(1) And position(1)=-1 If Var1<level And Var1>var1(delay) Then If ttime<1500 Then If Cond1=False Then Call buy("매수",Atstop,Def,opend+(highd(1)-lowd(1))*s1) End If If Cond2=False Then Call sell("매도",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 5(ID) Input: delay(9), s1(0.2), s2(2.7), s3(0.49) Var1=high-low Var2=mov(Var1,delay,s) Cond12=False If ttime<1500 Then Cond12=high(1)>=high And low(1)<=low And tdate=tdate(1) End If If Cond12=True Then Var10=1 Else Var10=0 End If Cond1= tdate=exitdate(1) And position(1)=1 Cond2= tdate=exitdate(1) And position(1)=-1 If hhv(1,Var10,delay)=1 And tdate(hhb(1,Var10,delay))= tdate Then If ttime<1500 And Cond1=False Then If opend+(highd(1)-lowd(1))*s1<close Then Call buy("매수",Atstop,Def,high+var2*s3) End If End If If ttime<1500 And Cond2=False Then If opend-(highd(1)-lowd(1))*s1>close Then Call sell("매도",Atstop,Def,low-var2*s3) 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 6(NR) Var1=high-low Cond11=False Cond11= Var1=llv(1,Var1,len) And ttime<1500 Cond1= tdate=exitdate(1) And position(1)=1 Cond2= tdate=exitdate(1) And position(1)=-1 If ttime<1500 Then If Cond1=False Then If Cond11=True And Cond11(1)=False Then If opend+(highd(1)-lowd(1))*s1<close Then Call buy("매수",Atstop,Def,high+var1*s3) End If End If End If If Cond2=False Then If Cond11=True And Cond11(1)=False Then If opend-(highd(1)-lowd(1))*s1>close Then Call sell("매도",Atstop,Def,low-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 7(++) Input: s1(0.37), s2(2.7) 'NR2 If highd(1)-lowd(1)=min(highd(1)-lowd(1),highd(2)-lowd(2)) Then Cond11=True Else Cond11=False End If 'ID,ID2 If (highd(2)>=highd(1) And lowd(2)<=lowd(1)) _ Or (highd(3)>=highd(2) And lowd(3)<=lowd(2) And _ highd(2)>=highd(1) And lowd(2)<=lowd(1))Then Cond12=True Else Cond12=False End If Cond1= tdate=exitdate(1) And position(1)=1 Cond2= tdate=exitdate(1) And position(1)=-1 If ttime<1500 Then If Cond1=False Then If Cond11=True Or Cond12=True Then Call buy("매수",Atstop,Def,opend+(highd(1)-lowd(1))*s1) end if End If If Cond2=False Then If Cond11=True Or Cond12=True Then Call sell("매도",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 항상 감사드립니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2023-11-27 17:46:00

안녕하세요 예스스탁입니다. 1 Input: len(10), len1(70), len2(0.37), s1(2.7), method(1), delay(8); var : cond1(False),cond2(False); If method==1 Then { Var1=atr(len); Var2=atr(len1); } Else if method==2 Then { Var20 = high-low; Var1 = ma(Var20,len); Var2 = ma(Var20,len1); } Cond1 = sdate == exitdate(1) And marketposition(1)==1 ; Cond2 = sdate == exitdate(1) And marketposition(1)==-1 ; If Var1<var2 Then Var10=1 ; Else Var10=0; If Highest(Var10,delay)==1 Then { If stime<150000 Then { If Cond1==False And high<opend(0)+(highd(1)-lowd(1))*len2 Then buy("매수",Atstop,opend(0)+(highd(1)-lowd(1))*len2); If Cond2==False And low>opend(0)-(highd(1)-lowd(1))*len2 Then sell("매도",Atstop,opend(0)-(highd(1)-lowd(1))*len2); If Cond1==False And high>opend(0)+(highd(1)-lowd(1))*len2 Then buy("매수1",Atstop,Highest(high,delay)); If Cond2==False And low<opend(0)-(highd(1)-lowd(1))*len2 Then sell("매도1",Atstop,Lowest(low,delay)); } } If MarketPosition<>0 then { exitlong("매수청산",Atstop,highest(high,BarsSinceEntry+1)-atr(20)*s1) ; exitshort("매도청산",Atstop,lowest(low,BarsSinceEntry+1)+atr(20)*s1) ; } 2 Input: len(40), len1(1), len2(30), multi(5), delay(5), s1(0.37), s2(2.7); var : cond1(False),cond2(False); Var50=BollBandUp(len,len1); Var49=BollBandDown(len,len1); Var48= ma(C,len); Var1=var50-var49; Var2=high-low; Var3=ma(Var2,len2)*multi; Cond1 = sdate==exitdate(1) And MarketPosition(1)==1; Cond2 = sdate==exitdate(1) And MarketPosition(1)==-1; If Var1<var3 Then Var10=1; Else Var10=0; If Highest(Var10,delay)==1 then { If sTime<150000 Then { If Cond1==False And Var48>Var48[1] Then buy("매수",Atstop,opend(0)+(highd(1)-lowd(1))*s1); If Cond2==False And Var48<Var48[1] Then sell("매도",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); } 3 Input :len(20), cont(10), stepp(2), multi(2), delay(5), s1(0.37), s2(2.7); var : i(0),cond1(False),cond2(False); Var50=ma(close,len); Var49=ma(close,len); For i = 1 To cont { If Var50 < ma(close,len+stepp*i) Then Var50 = ma(close,len+stepp*i); If Var49>ma(close,len+stepp*i) Then Var49=ma(close,len+stepp*i); } Var1=var50-var49; Var2=high-low; Var3=ma(Var2,len)*multi; Cond1= sdate==exitdate(1) And marketposition(1)==1; Cond2= sdate==exitdate(1) And marketposition(1)==-1; If Var1<var3 Then Var10=1; Else Var10=0; If highest(Var10,delay)==1 And NthHighestBar(1,Var10,delay)==delay-1 Then { If stime<150000 Then { If Cond1==False Then buy("매수",Atstop,opend(0)+(highd(1)-lowd(1))*s1); If Cond2==False Then sell("매도",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); } 4 Input: len(21), level(30), delay(2), s1(0.37), s2(2.7); var : cond1(False),cond2(False); Var1=adx(len); Cond1= sdate==exitdate(1) And marketposition(1)==1; Cond2= sdate==exitdate(1) And marketposition(1)==-1; If Var1<level And Var1>var1[delay] Then { If stime<150000 Then { If Cond1==False Then buy("매수",Atstop,opend(0)+(highd(1)-lowd(1))*s1); if Cond2==False Then sell("매도",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); } 5 Input: delay(9), s1(0.2), s2(2.7), s3(0.49); var : cond12(False),cond1(False),cond2(False); Var1=high-low; Var2=ma(Var1,delay); Cond12=False; If stime<1500 Then Cond12=high[1]>=high And low[1]<=low And sdate==sdate[1]; If Cond12=True Then Var10=1; Else Var10=0; Cond1= sdate==exitdate(1) And marketposition(1)==1; Cond2= sdate==exitdate(1) And marketposition(1)==-1; If highest(Var10,delay)==1 And sdate[NthHighestBar(1,Var10,delay)] == sdate Then { If stime<150000 And Cond1==False Then { If opend(0)+(highd(1)-lowd(1))*s1<close Then buy("매수",Atstop,high+var2*s3); } If stime<150000 And Cond2==False Then { If opend(0)-(highd(1)-lowd(1))*s1>close Then sell("매도",Atstop,Def,low-var2*s3); } } If marketposition<>0 Then { exitlong("매수청산",Atstop,highest(high,BarsSinceEntry+1)-atr(20)*s2); exitshort("매도청산",Atstop,Lowest(low,BarsSinceEntry+1)+atr(20)*s2); } 6 input : len(10),s1(0.2), s2(2.7), s3(0.49); var : cond11(False),cond1(False),cond2(False); Var1=high-low; Cond11=False; Cond11= Var1==lowest(Var1,len) And stime<150000; Cond1= sdate==exitdate(1) And marketposition(1)==1; Cond2= sdate==exitdate(1) And marketposition(1)==-1; If stime<150000 Then { If Cond1==False Then { If Cond11==True And Cond11[1]==False Then { If opend(0)+(highd(1)-lowd(1))*s1<close Then buy("매수",Atstop,high+var1*s3); } } If Cond2==False Then { If Cond11==True And Cond11[1]==False Then { If opend(0)-(highd(1)-lowd(1))*s1>close Then sell("매도",Atstop,low-var1*s3); } } } If marketposition<>0 Then { exitlong("매수청산",Atstop,highest(high,BarsSinceEntry+1)-atr(20)*s2); exitshort("매도청산",Atstop,Lowest(low,BarsSinceEntry+1)+atr(20)*s2); } 7 Input: s1(0.37), s2(2.7); var : cond11(False),cond12(False),cond1(False),cond2(False); If highd(1)-lowd(1)==min(highd(1)-lowd(1),highd(2)-lowd(2)) Then Cond11=True; Else Cond11=False; If (highd(2)>=highd(1) And lowd(2)<=lowd(1)) Or (highd(3)>=highd(2) And lowd(3)<=lowd(2) And highd(2)>=highd(1) And lowd(2)<=lowd(1))Then Cond12=True; Else Cond12=False; Cond1= sdate==exitdate(1) And marketposition(1)==1; Cond2= sdate==exitdate(1) And marketposition(1)==-1; If stime<150000 Then { If Cond1==False Then { If Cond11==True Or Cond12==True Then buy("매수",Atstop,opend(0)+(highd(1)-lowd(1))*s1); } If Cond2==False Then { If Cond11==True Or Cond12==True Then sell("매도",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); } 즐거운 하루되세요 > 마녀58 님이 쓴 글입니다. > 제목 : CT를 YT로 변환 요청합니다. > 1 Input: len(10), len1(70), len2(0.37), s1(2.7), method(1), delay(8) If method=1 Then Var1=atr(len) Var2=atr(len1) Elseif method=2 Then Var20=high-low Var1=mov(Var20,len,s) Var2=mov(Var20,len1,s) End If Cond1=tdate=exitdate(1) And position(1)=1 Cond2=tdate=exitdate(1) And position(1)=-1 If Var1<var2 Then Var10=1 Else Var10=0 End If If hhv(1,Var10,delay)=1 Then If ttime<1500 Then If Cond1=False And high<opend+(highd(1)-lowd(1))*len2 Then Call buy("매수",Atstop,Def,opend+(highd(1)-lowd(1))*len2) End If IfCond2=False And low>opend-(highd(1)-lowd(1))*len2 Then Call sell("매도",Atstop,Def,opend-(highd(1)-lowd(1))*len2) End If If Cond1=False And high>opend+(highd(1)-lowd(1))*len2 Then Call buy("매수1",Atstop,Def,hhv(1,high,delay)) End If If Cond2=False And low<opend-(highd(1)-lowd(1))*len2 Then Callsell("매도1",Atstop,Def,llv(1,low,delay)) End If End if End If If position<>0then Call exitlong("매수청산",Atstop,hhv(1,high,barnumsinceentry+1)-atr(20)*s1) Call exitshort("매도청산",Atstop,llv(1,low,barnumsinceentry+1)+atr(20)*s1) End If 2 Input: len(40), len1(1), len2(30), multi(5), delay(5), s1(0.37), s2(2.7) Var50=bbandtop(close,len,len1,s) Var49=bbandbot(close,len,len1,s) Var1=var50-var49 Var2=high-low Var3=mov(Var2,len2,s)*multi Cond1= tdate=exitdate(1) And position(1)=1 Cond2= tdate=exitdate(1) And position(1)=-1 If Var1<var3 Then Var10=1 Else Var10=0 End If If hhv(1,Var10,delay)=1 then If ttime<1500 Then If Cond1=False And bbandmid(close,len,len1,s)>bbandmid(close,len,len1,s,1) Then Call buy("매수",Atstop,Def,opend+(highd(1)-lowd(1))*s1) End If If Cond2=False And bbandmid(close,len,len1,s)<bbandmid(close,len,len1,s,1) Then Call sell("매도",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 3(그물망) Input :len(20), cont(10), stepp(2), multi(2), delay(5), s1(0.37), s2(2.7) Var50=mov(close,len,s) Var49=mov(close,len,s) For i = 1 To cont If Var50<mov(close,len+stepp*i,s) Then Var50=mov(close,len+stepp*i,s) End If If Var49>mov(close,len+stepp*i,s) Then Var49=mov(close,len+stepp*i,s) End If Next Var1=var50-var49 Var2=high-low Var3=mov(Var2,len,s)*multi Cond1= tdate=exitdate(1) And position(1)=1 Cond2= tdate=exitdate(1) And position(1)=-1 If Var1<var3 Then Var10=1 Else Var10=0 End If If hhv(1,Var10,delay)=1 And hhb(1,Var10,delay)=delay-1 Then If ttime<1500 Then If Cond1=False Then Call buy("매수",Atstop,Def,opend+(highd(1)-lowd(1))*s1) End If If Cond2=False Then Call sell("매도",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 4(adx) Input: len(21), level(30), delay(2), s1(0.37), s2(2.7) Var1=adx(len) Cond1= tdate=exitdate(1) And position(1)=1 Cond2= tdate=exitdate(1) And position(1)=-1 If Var1<level And Var1>var1(delay) Then If ttime<1500 Then If Cond1=False Then Call buy("매수",Atstop,Def,opend+(highd(1)-lowd(1))*s1) End If If Cond2=False Then Call sell("매도",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 5(ID) Input: delay(9), s1(0.2), s2(2.7), s3(0.49) Var1=high-low Var2=mov(Var1,delay,s) Cond12=False If ttime<1500 Then Cond12=high(1)>=high And low(1)<=low And tdate=tdate(1) End If If Cond12=True Then Var10=1 Else Var10=0 End If Cond1= tdate=exitdate(1) And position(1)=1 Cond2= tdate=exitdate(1) And position(1)=-1 If hhv(1,Var10,delay)=1 And tdate(hhb(1,Var10,delay))= tdate Then If ttime<1500 And Cond1=False Then If opend+(highd(1)-lowd(1))*s1<close Then Call buy("매수",Atstop,Def,high+var2*s3) End If End If If ttime<1500 And Cond2=False Then If opend-(highd(1)-lowd(1))*s1>close Then Call sell("매도",Atstop,Def,low-var2*s3) 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 6(NR) Var1=high-low Cond11=False Cond11= Var1=llv(1,Var1,len) And ttime<1500 Cond1= tdate=exitdate(1) And position(1)=1 Cond2= tdate=exitdate(1) And position(1)=-1 If ttime<1500 Then If Cond1=False Then If Cond11=True And Cond11(1)=False Then If opend+(highd(1)-lowd(1))*s1<close Then Call buy("매수",Atstop,Def,high+var1*s3) End If End If End If If Cond2=False Then If Cond11=True And Cond11(1)=False Then If opend-(highd(1)-lowd(1))*s1>close Then Call sell("매도",Atstop,Def,low-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 7(++) Input: s1(0.37), s2(2.7) 'NR2 If highd(1)-lowd(1)=min(highd(1)-lowd(1),highd(2)-lowd(2)) Then Cond11=True Else Cond11=False End If 'ID,ID2 If (highd(2)>=highd(1) And lowd(2)<=lowd(1)) _ Or (highd(3)>=highd(2) And lowd(3)<=lowd(2) And _ highd(2)>=highd(1) And lowd(2)<=lowd(1))Then Cond12=True Else Cond12=False End If Cond1= tdate=exitdate(1) And position(1)=1 Cond2= tdate=exitdate(1) And position(1)=-1 If ttime<1500 Then If Cond1=False Then If Cond11=True Or Cond12=True Then Call buy("매수",Atstop,Def,opend+(highd(1)-lowd(1))*s1) end if End If If Cond2=False Then If Cond11=True Or Cond12=True Then Call sell("매도",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 항상 감사드립니다.