커뮤니티

재진입 식에서

프로필 이미지
구다이전설
2013-05-16 09:50:39
158
글번호 63262
답변완료
목표가를 0.8 하고 했더니 짧께 짧게 수익을 내려 했더니 문제가 있네요 아이디어가 뭐가 잘못 &#46124;나요 ?? //출처 : 7th감각 시스템트레이딩, p230 input : len(2.9), len1(0.53); var : CurrentEntryNum(0); Var1=dayhigh(1)-dayLow(1); //전일 고저차 var2=dayhigh-daylow; var3= var2-var1; condition1= sdate==exitdate(1) And marketposition(1)==1; //청산날짜가 오늘날짜이고 직전포지션이 매수 condition2= sdate==exitdate(1) And marketposition(1)==-1;//청산날짜가 오늘날짜이고 직전포지션이 매도 if date<>date[1] Then { //날이 바뀐 첫봉에서 var50 = TotalTrades; //진입횟수 체크 Var10=atr(20)*len1; //당일의 var10 설정 } CurrentEntryNum = iff(marketposition == 0,TotalTrades, TotalTrades+1 ); //하루에 3번만 진입 If stime<150000 then { If condition1==False And currententrynum-var50<=2 and marketposition <> 1 then buy("매수",Atstop,dayLow+var1*len1); //지정가 상향돌파시 매수 If condition2==False And currententrynum-var50<=2 and marketposition <> -1 then sell("매도",Atstop,dayHigh-var1*len1); //지정가 하향돌파시 매도 } //청산 If marketposition==1 then exitlong("매수청산",Atstop,entryprice+0.8); If marketposition==-1 then exitshort("매도청산",Atstop,entryprice-0.8); // 매수 재진입 if MarketPosition == 0 and stime < 150000 and ExitDate(1) == sdate and MarketPosition(1) == 1 and C>= exitprice(1)+0.4 then buy("bb); if MarketPosition == 1 and IsEntryName("bb") then exitlong("bbx",Atstop,entryprice+0.8); //매도 재진입 if MarketPosition == 0 and stime < 150000 and ExitDate(1) == sdate and MarketPosition(1) == -1 and c <= exitprice(1)-0.4 Then sell("ss"); if MarketPosition == -1 and IsEntryName("ss") then exitshort("ssx",Atstop,entryprice-0.8);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2013-05-16 10:45:29

안녕하세요 예스스탁입니다. 시스템 트레이딩 설정창의 비용/수량탭에서 수수료와 슬리피지를 0으로 설정하시고 하시면 됩니다. 시스템의 손익에는 비용/수량탭에서 지정한 수수료와 슬리피지가 적용이 되므로 0.8수익후 비용차감하면 실제 손익이 작아지게 되어 발생하는 내용입니다. 즐거운 하루되세요 > 구다이전설 님이 쓴 글입니다. > 제목 : 재진입 식에서 > 목표가를 0.8 하고 했더니 짧께 짧게 수익을 내려 했더니 문제가 있네요 아이디어가 뭐가 잘못 &#46124;나요 ?? //출처 : 7th감각 시스템트레이딩, p230 input : len(2.9), len1(0.53); var : CurrentEntryNum(0); Var1=dayhigh(1)-dayLow(1); //전일 고저차 var2=dayhigh-daylow; var3= var2-var1; condition1= sdate==exitdate(1) And marketposition(1)==1; //청산날짜가 오늘날짜이고 직전포지션이 매수 condition2= sdate==exitdate(1) And marketposition(1)==-1;//청산날짜가 오늘날짜이고 직전포지션이 매도 if date<>date[1] Then { //날이 바뀐 첫봉에서 var50 = TotalTrades; //진입횟수 체크 Var10=atr(20)*len1; //당일의 var10 설정 } CurrentEntryNum = iff(marketposition == 0,TotalTrades, TotalTrades+1 ); //하루에 3번만 진입 If stime<150000 then { If condition1==False And currententrynum-var50<=2 and marketposition <> 1 then buy("매수",Atstop,dayLow+var1*len1); //지정가 상향돌파시 매수 If condition2==False And currententrynum-var50<=2 and marketposition <> -1 then sell("매도",Atstop,dayHigh-var1*len1); //지정가 하향돌파시 매도 } //청산 If marketposition==1 then exitlong("매수청산",Atstop,entryprice+0.8); If marketposition==-1 then exitshort("매도청산",Atstop,entryprice-0.8); // 매수 재진입 if MarketPosition == 0 and stime < 150000 and ExitDate(1) == sdate and MarketPosition(1) == 1 and C>= exitprice(1)+0.4 then buy("bb); if MarketPosition == 1 and IsEntryName("bb") then exitlong("bbx",Atstop,entryprice+0.8); //매도 재진입 if MarketPosition == 0 and stime < 150000 and ExitDate(1) == sdate and MarketPosition(1) == -1 and c <= exitprice(1)-0.4 Then sell("ss"); if MarketPosition == -1 and IsEntryName("ss") then exitshort("ssx",Atstop,entryprice-0.8);