커뮤니티

ct를 yt로 부탁 드립니다.

프로필 이미지
rlaxoeh
2012-04-04 16:22:58
426
글번호 49731
답변완료
안녕 하세요 3개의 시스템 입니다. yt로 부탁 드립니다. 1번째 Input: s1(0.37), s2(2.7), len1(0.88) Var1=highd(1)-lowd(1) Var2=max(highd(1),highd(2)) Var3=min(lowd(1),lowd(2)) If tdate<>Tdate(1) Then Var50=currententrynum Var10=Atr(20,1)*len1 End If If tdate<>Tdate(1) Then Var30=0 Var31=0 Cond1=False Cond2=False Else If close>var2+var10 Then Cond1=True End If If close <var3-var10 Then Cond2=True End If If close>=var2-var10 And close<=var2+var10 And Cond1=False Then Var30=1 Else Var30=0 End If If close>=var3-var10 And close<=var3+var10 And Cond2=False Then Var31=1 Else Var31=0 End If End If If currententrynum-var50=0 Then If ttime<1500 Then If Var31=1 Then If high<var3+var10 Then Call buy("매수",Atstop,Def,Var3+var10) Else Call buy("매수",Atstop,Def,hhv(1,high,2)) End If End If If Var30=1 Then If low>var2-var10 Then Call sell("매도",Atstop,Def,Var2-var10) Else Call sell("매도",Atstop,Def,llv(1,low,2)) End If End If Call buy("매수1",Atstop,Def,opend+var1*s1) Call sell("매도1",Atstop,Def,opend-var1*S1) 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 position=1 And entryname = “매수” Then If low>var2-var10 Then Call exitlong("청산1",Atstop,Var2-var10) End If End If If position=-1 And entryname = “매도” Then If high<var3+var10 Then Call exitshort("청산1",Atstop,Var3+var10) End If End If 2번째 Input: len1(9), len2(17), ratio(0.3), factor(1.7), factor1(0.07), s1(0.37), s2(2.7) Var1=hhv(1,high,len1) Var2=llv(1,low,len1) Var3=var1-var2 Var11=hhv(1,high,len2,len1) Var12=llv(1,low,len2,len1) Var13=var11-var12 Cond1=False If Var3>0 And Var13>0 Then If Var3/var13<=ratio And Var3<=Atr(len1)*factor Then Cond1=True End If End If If tdate<>Tdate(1) Then Var50=currententrynum End If If currententrynum-var50<=3 Then If ttime<1500 Then If Cond1=True Then Call buy("매수2",Atstop,Def,Var1+Atr(20)*factor1) Call sell("매도2",Atstop,Def,Var2-Atr(20)*factor1) End If End If End If If currententrynum-var50=0 Then If ttime<1500 Then Call buy("매수1",Atstop,Def,opend+(highd(1)-lowd(1))*s1) Call sell("매도1",Atstop,Def,opend-(highd(1)-lowd(1))*S1) 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(8), s1(0.37), s2(2.7) slv1=slva(1,low,len,len) slv2=slva(2,low,len,len) slb1=slba(1,low,len,len) slb2=slba(2,low,len,len) shv1=shva(1,high,len,len) shv2=shva(2,high,len,len) shb1=shba(1,high,len,len) shb2=shba(2,high,len,len) If slb2>slb1 Then low_trendline =(slv1-slv2)/(slb2-slb1)*slb1+slv1 low_radian=(((slv1-slv2)/slv2)*100)/(slb2-slb1) End If If shb2>shb1 Then high_trendline =(shv1-shv2)/(shb2-shb1)*shb1+shv1 high_radian=(((shv1-shv2)/shv2)*100)/(shb2-shb1) End If Var1=round(atn(low_radian)*180/pi,2) Var2=round(atn(high_radian)*180/pi,2) If Var1>0 And Var2>0 And Var1>var2 And high_trendline>low_trendline Then '상향쐐기형 Cond1=True Else Cond1=False End If If Var1<0 And Var2<0 And Var1>var2 And high_trendline > low_trendline Then '하향쐐기형 Cond2=True Else Cond2=False End If If Var1>0 And Var2<0 And high_trendline>low_trendline Then '삼각형 Cond3=True Else Cond3=False End If Var10=highd(1)-lowd(1) If tdate<>tdate(1) Then Var50=currententrynum End If If ttime<1500 Then If currententrynum-var50=0 Then If Cond1=True And low>low_trendline Then Call sell("쐐기매도",Atstop,Def,low_trendline ) End If If Cond2=True And high<high_trendline Then Call buy("쐐기매수",Atstop,Def,high_trendline ) End If If Cond3=True And low>low_trendline And high<high_trendline Then Call buy("삼각매수",Atstop,Def,high_trendline ) Call sell("삼각매도",Atstop,Def,low_trendline ) End If Call buy("매수",Atstop,Def,opend+var10*S1) Call sell("매도",Atstop,Def,opend-var10*S1) End If End If If ttime<1500 Then If currententrynum-var50=1 Then If Cond1=True And low>low_trendline Then Call sell("쐐기매도",Atstop,Def,low_trendline ) End If If Cond2=True And high<high_trendline Then Call buy("쐐기매수",Atstop,Def,high_trendline ) 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-04 17:55:39

안녕하세요 예스스탁입니다. 안녕하세요 예스스탁입니다. 1. Input: s1(0.37), s2(2.7), len1(0.88); var : cond1(false),cond2(false); Var1=highd(1)-lowd(1); Var2=max(highd(1),highd(2)); Var3=min(lowd(1),lowd(2)); If sdate<>sdate[1] then{ Var50=TotalTrades; Var10=Atr(20)[1]*len1; } If sdate<>sdate[1] then{ Var30=0; Var31=0; Cond1=False; Cond2=False; } Else{ If close>var2+var10 then{ Cond1=True; } If close <var3-var10 then{ Cond2=True; } If close>=var2-var10 And close<=var2+var10 And Cond1==False then Var30=1; Else Var30=0; If close>=var3-var10 And close<=var3+var10 And Cond2==False then Var31=1; Else Var31=0; } If TotalTrades-var50==0 then{ If stime<150000 then{ If Var31==1 then{ If high<var3+var10 then buy("매수1",Atstop,Var3+var10); Else buy("매수2",Atstop,Highest(high,2)); } If Var30==1 then{ If low>var2-var10 then sell("매도1",Atstop,Var2-var10); Else sell("매도2",Atstop,Lowest(low,2)); } buy("매수3",Atstop,opend(0)+var1*s1); sell("매도3",Atstop,opend(0)-var1*S1); } } If MarketPosition <> 0 then{ exitlong("매수추적",Atstop,Highest(high,barssinceentry+1)-atr(20)*s2); exitshort("매도추적",Atstop,Lowest(low,barssinceentry+1)+atr(20)*S2); } If MarketPosition==1 And isentryname("매수") then{ If low>var2-var10 then{ exitlong("매수청산1",Atstop,Var2-var10); } } If MarketPosition==-1 And isentryname("매도") then{ If high<var3+var10 then{ exitshort("매도청산1",Atstop,Var3+var10); } } 2. Input: len1(9), len2(17), ratio(0.3), factor(1.7), factor1(0.07), s1(0.37), s2(2.7); var : Cond1(false); Var1=Highest(high,len1); Var2=lowest(low,len1); Var3=var1-var2; Var11=highest(high,len2)[len1]; Var12=lowest(low,len2)[len1]; Var13=var11-var12; Cond1=False; If Var3>0 And Var13>0 then{ If Var3/var13<=ratio And Var3<=Atr(len1)*factor then{ Cond1=True; } } If sdate<>sdate[1] then{ Var50=TotalTrades; } If TotalTrades-var50<=3 then{ If stime<150000 then{ If Cond1==True then{ buy("매수2",Atstop,Var1+Atr(20)*factor1); sell("매도2",Atstop,Var2-Atr(20)*factor1); } } } If TotalTrades-var50==0 then{ If stime<150000 then{ buy("매수1",Atstop,opend(0)+(highd(1)-lowd(1))*s1); 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); } 3. Input: len(8), s1(0.37), s2(2.7); var : slv1(0),slv2(0),slb1(0),slb2(0),shv1(0),shv2(0),shb1(0),shb2(0); var : low_trendline(0),low_radian(0),high_trendline(0),high_radian(0); var : Cond1(false),Cond2(false),Cond3(false); slv1=SwingLow(1,low,len,len,100); slv2=SwingLow(2,low,len,len,100); slb1=SwingLowBar(1,low,len,len,100); slb2=SwingLowBar(2,low,len,len,100); shv1=SwingHigh(1,high,len,len,100); shv2=SwingHigh(2,high,len,len,100); shb1=SwingHighBar(1,high,len,len,100); shb2=SwingHighbar(2,high,len,len,100); If slb2 > slb1 then{ low_trendline =(slv1-slv2)/(slb2-slb1)*slb1+slv1; low_radian=(((slv1-slv2)/slv2)*100)/(slb2-slb1); } If shb2>shb1 then{ high_trendline =(shv1-shv2)/(shb2-shb1)*shb1+shv1; high_radian=(((shv1-shv2)/shv2)*100)/(shb2-shb1); } Var1=round(atan(low_radian)*180/pie,2); Var2=round(atan(high_radian)*180/pie,2); If Var1>0 And Var2>0 And Var1>var2 And high_trendline>low_trendline then# '상향쐐기형 Cond1=True; Else Cond1=False; If Var1<0 And Var2<0 And Var1>var2 And high_trendline > low_trendline then# '하향쐐기형 Cond2=True; Else Cond2=False; If Var1>0 And Var2<0 And high_trendline>low_trendline then# '삼각형 Cond3=True; Else Cond3=False; Var10=highd(1)-lowd(1); If sdate<>sdate[1] then{ Var50=TotalTrades; } If stime<150000 then{ If TotalTrades-var50==0 then{ If Cond1==True And low>low_trendline then{ sell("쐐기매도1",Atstop,low_trendline ); } If Cond2==True And high<high_trendline then{ buy("쐐기매수1",Atstop,high_trendline ); } If Cond3=True And low>low_trendline And high<high_trendline then{ buy("삼각매수",Atstop,high_trendline ); sell("삼각매도",Atstop,low_trendline ); } buy("매수",Atstop,opend(0)+var10*S1); sell("매도",Atstop,opend(0)-var10*S1); } } If stime<150000 then{ If TotalTrades-var50==1 then{ If Cond1==True And low>low_trendline then{ sell("쐐기매도2",Atstop,low_trendline ); } If Cond2==True And high<high_trendline then{ buy("쐐기매수2",Atstop,high_trendline ); } } } 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로 부탁 드립니다. > 안녕 하세요 3개의 시스템 입니다. yt로 부탁 드립니다. 1번째 Input: s1(0.37), s2(2.7), len1(0.88) Var1=highd(1)-lowd(1) Var2=max(highd(1),highd(2)) Var3=min(lowd(1),lowd(2)) If tdate<>Tdate(1) Then Var50=currententrynum Var10=Atr(20,1)*len1 End If If tdate<>Tdate(1) Then Var30=0 Var31=0 Cond1=False Cond2=False Else If close>var2+var10 Then Cond1=True End If If close <var3-var10 Then Cond2=True End If If close>=var2-var10 And close<=var2+var10 And Cond1=False Then Var30=1 Else Var30=0 End If If close>=var3-var10 And close<=var3+var10 And Cond2=False Then Var31=1 Else Var31=0 End If End If If currententrynum-var50=0 Then If ttime<1500 Then If Var31=1 Then If high<var3+var10 Then Call buy("매수",Atstop,Def,Var3+var10) Else Call buy("매수",Atstop,Def,hhv(1,high,2)) End If End If If Var30=1 Then If low>var2-var10 Then Call sell("매도",Atstop,Def,Var2-var10) Else Call sell("매도",Atstop,Def,llv(1,low,2)) End If End If Call buy("매수1",Atstop,Def,opend+var1*s1) Call sell("매도1",Atstop,Def,opend-var1*S1) 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 position=1 And entryname = “매수” Then If low>var2-var10 Then Call exitlong("청산1",Atstop,Var2-var10) End If End If If position=-1 And entryname = “매도” Then If high<var3+var10 Then Call exitshort("청산1",Atstop,Var3+var10) End If End If 2번째 Input: len1(9), len2(17), ratio(0.3), factor(1.7), factor1(0.07), s1(0.37), s2(2.7) Var1=hhv(1,high,len1) Var2=llv(1,low,len1) Var3=var1-var2 Var11=hhv(1,high,len2,len1) Var12=llv(1,low,len2,len1) Var13=var11-var12 Cond1=False If Var3>0 And Var13>0 Then If Var3/var13<=ratio And Var3<=Atr(len1)*factor Then Cond1=True End If End If If tdate<>Tdate(1) Then Var50=currententrynum End If If currententrynum-var50<=3 Then If ttime<1500 Then If Cond1=True Then Call buy("매수2",Atstop,Def,Var1+Atr(20)*factor1) Call sell("매도2",Atstop,Def,Var2-Atr(20)*factor1) End If End If End If If currententrynum-var50=0 Then If ttime<1500 Then Call buy("매수1",Atstop,Def,opend+(highd(1)-lowd(1))*s1) Call sell("매도1",Atstop,Def,opend-(highd(1)-lowd(1))*S1) 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(8), s1(0.37), s2(2.7) slv1=slva(1,low,len,len) slv2=slva(2,low,len,len) slb1=slba(1,low,len,len) slb2=slba(2,low,len,len) shv1=shva(1,high,len,len) shv2=shva(2,high,len,len) shb1=shba(1,high,len,len) shb2=shba(2,high,len,len) If slb2>slb1 Then low_trendline =(slv1-slv2)/(slb2-slb1)*slb1+slv1 low_radian=(((slv1-slv2)/slv2)*100)/(slb2-slb1) End If If shb2>shb1 Then high_trendline =(shv1-shv2)/(shb2-shb1)*shb1+shv1 high_radian=(((shv1-shv2)/shv2)*100)/(shb2-shb1) End If Var1=round(atn(low_radian)*180/pi,2) Var2=round(atn(high_radian)*180/pi,2) If Var1>0 And Var2>0 And Var1>var2 And high_trendline>low_trendline Then '상향쐐기형 Cond1=True Else Cond1=False End If If Var1<0 And Var2<0 And Var1>var2 And high_trendline > low_trendline Then '하향쐐기형 Cond2=True Else Cond2=False End If If Var1>0 And Var2<0 And high_trendline>low_trendline Then '삼각형 Cond3=True Else Cond3=False End If Var10=highd(1)-lowd(1) If tdate<>tdate(1) Then Var50=currententrynum End If If ttime<1500 Then If currententrynum-var50=0 Then If Cond1=True And low>low_trendline Then Call sell("쐐기매도",Atstop,Def,low_trendline ) End If If Cond2=True And high<high_trendline Then Call buy("쐐기매수",Atstop,Def,high_trendline ) End If If Cond3=True And low>low_trendline And high<high_trendline Then Call buy("삼각매수",Atstop,Def,high_trendline ) Call sell("삼각매도",Atstop,Def,low_trendline ) End If Call buy("매수",Atstop,Def,opend+var10*S1) Call sell("매도",Atstop,Def,opend-var10*S1) End If End If If ttime<1500 Then If currententrynum-var50=1 Then If Cond1=True And low>low_trendline Then Call sell("쐐기매도",Atstop,Def,low_trendline ) End If If Cond2=True And high<high_trendline Then Call buy("쐐기매수",Atstop,Def,high_trendline ) 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