커뮤니티

질문드립니다.

프로필 이미지
데프콘
2012-03-23 11:22:37
348
글번호 49256
답변완료
바쁘신데 죄송합니다. 변환과 해석 부탁합니다 Input: ups(0.1), dns(0.1), gapup(0.29), gapfill(0.18), s2(2.7) If opend>highd(1) Then Var1=100*((opend-highd(1))/highd(1)) End If If opend<lowd(1) Then Var1=100*((lowd(1)-opend)/lowd(1)) End If If tdate<>tdate(1) Then Var50=currententrynum End If Cond1=exitdate(1)=tdate And position(1)=1 Cond2=exitdate(1)=tdate And position(1)=-1 If currententrynum-var50<=2 Then If ttime <1500 Then If opend>highd(1) And Var1>ups Then If Cond1=False Then Call buy("GapUp매수",Atstop,Def,opend+(highd(1)-lowd(1))*gapup) End If If Cond2=False Then Call sell("GapFill매도",Atstop,Def, _ max(highd(1),opend-(highd(1)-lowd(1))*gapfill)) End If End If If opend<lowd(1) And Var1>dns Then If Cond2=False Then Call sell("GapDown매도",Atstop,Def,opend-(highd(1)-lowd(1))*gapup) End If If Cond1=False Then Call buy("GapFill매수",Atstop,Def,_ min(lowd(1),opend+(highd(1)-lowd(1))*gapfill)) 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
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2012-03-23 13:10:12

안녕하세요? 예스스탁입니다. 요청하신 내용 답변드립니다. input : ups(0.1), dns(0.1), gapup(0.29), gapfill(0.18), s2(2.7); var : EntryCnt(0), CurrentEntryNum(0); If dayOpen>dayhigh(1) then { //시가가 전일고가보다 크면 Var1=100*((dayOpen-dayhigh(1))/dayhigh(1)); //전일고가대비 시가의 위치 } If dayOpen<dayLow(1) then { //시가가 전일저가보다 작으면 Var1=100*((dayLow(1)-dayOpen)/dayLow(1)); //전일저가대비 시가의 위치 } if date<>date[1] Then { EntryCnt = TotalTrades; } CurrentEntryNum = iff(marketposition == 0,TotalTrades, TotalTrades+1 ); Var50=EntryCnt; condition1=exitdate(1)==sdate And marketposition(1)==1 ;//최근청산날짜가 금일이고 직전이 매수 condition2=exitdate(1)==sdate And marketposition(1)==-1; //최근청산날짜가 금일이고 직전이 매도 //하루에 3번만 진입 If currententrynum-var50<=2 then { If stime <150000 then { If dayOpen>dayhigh(1) And Var1>ups then { //시가가 전일고가보다 크고 Var1이 ups보다 크면 If condition1==False and MarketPosition <> 1 then { //지정가 상향돌파시 매수 buy("GapUp매수",Atstop,dayOpen+(dayhigh(1)-dayLow(1))*gapup); } If condition2==False and MarketPosition <> -1 then { sell("GapFill매도",Atstop,max(dayhigh(1),dayOpen-(dayhigh(1)-dayLow(1))*gapfill)); //지정가 하향돌파시 매도 } } If dayOpen<dayLow(1) And Var1>dns then { //시가가 전일저가보다 작고 Var1이 dns보다 크면 If condition2==False and MarketPosition <> -1 then { //지정가 하향돌파시 매도 sell("GapDown매도",Atstop,dayOpen-(dayhigh(1)-dayLow(1))*gapup); } If condition1==False and MarketPosition <> 1 then { buy("GapFill매수",Atstop, min(dayLow(1),dayOpen+(dayhigh(1)-dayLow(1))*gapfill)); //지정가 상향돌파시 매수 } } } } //ATR지표를 이용한 진입후 최고(저가) 추적청산 If marketposition<>0 then { exitlong("매수추적",Atstop,highest(high,BarsSinceEntry+1)-atr(20)*S2); exitshort("매도추적",Atstop,lowest(low,BarsSinceEntry+1)+atr(20)*S2); } 즐거운 날 되세요.. > 데프콘 님이 쓴 글입니다. > 제목 : 질문드립니다. > 바쁘신데 죄송합니다. 변환과 해석 부탁합니다 Input: ups(0.1), dns(0.1), gapup(0.29), gapfill(0.18), s2(2.7) If opend>highd(1) Then Var1=100*((opend-highd(1))/highd(1)) End If If opend<lowd(1) Then Var1=100*((lowd(1)-opend)/lowd(1)) End If If tdate<>tdate(1) Then Var50=currententrynum End If Cond1=exitdate(1)=tdate And position(1)=1 Cond2=exitdate(1)=tdate And position(1)=-1 If currententrynum-var50<=2 Then If ttime <1500 Then If opend>highd(1) And Var1>ups Then If Cond1=False Then Call buy("GapUp매수",Atstop,Def,opend+(highd(1)-lowd(1))*gapup) End If If Cond2=False Then Call sell("GapFill매도",Atstop,Def, _ max(highd(1),opend-(highd(1)-lowd(1))*gapfill)) End If End If If opend<lowd(1) And Var1>dns Then If Cond2=False Then Call sell("GapDown매도",Atstop,Def,opend-(highd(1)-lowd(1))*gapup) End If If Cond1=False Then Call buy("GapFill매수",Atstop,Def,_ min(lowd(1),opend+(highd(1)-lowd(1))*gapfill)) 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