커뮤니티

문의

프로필 이미지
구다이전설
2013-05-14 10:29:46
167
글번호 63181
답변완료
피라미딩을 적용하려 합니다 1 , 매수 상태에서 3봉연속 양봉이면 추가매수 한계약 , 또 앞에봉 포함 3봉연속 양봉이면 추가 매수, 매도 상태도 동일 ... 2. 매수 상태에서 adx가 40이상이면서 이익이 0.5 포인트 마다 추가 매수 .계속. 매도 도 동일 3. 혹시 다른 아이디어 있으시면 부탁합니다 항상 감사합니다 Var1=dayhigh(1)-dayLow(1); //전일 고저차 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,highest(high,barsSinceEntry+1)-atr(20)*len); If marketposition==-1 then exitshort("매도청산",Atstop,lowest(low,barsSinceEntry+1)+atr(20)*len); // 매수 재진입 if MarketPosition == 0 and MarketPosition(1) == 1 and c > exitprice(1) Then buy("bb"); if MarketPosition == 1 and IsEntryName("bb") then exitlong("bbx",Atstop,highest(high,barsSinceEntry+1)-atr(20)*len); //매도 재진입 if MarketPosition == 0 and MarketPosition(1) == -1 and c < exitprice(1) and var1 < 0 Then sell("ss"); if MarketPosition == -1 and IsEntryName("ss") then exitshort("ssx",Atstop,lowest(low,barsSinceEntry+1)+atr(20)*len);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2013-05-14 14:48:17

안녕하세요 예스스탁입니다. 피라미딩을 모든진입신호 허용으로 설정하시면 됩니다. 1. input : len1(10),len(10); var : CurrentEntryNum(0); Var1=dayhigh(1)-dayLow(1); //전일 고저차 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,highest(high,barsSinceEntry+1)-atr(20)*len); If marketposition==-1 then exitshort("매도청산",Atstop,lowest(low,barsSinceEntry+1)+atr(20)*len); // 매수 재진입 if MarketPosition == 0 and MarketPosition(1) == 1 and c > exitprice(1) Then buy("bb"); if MarketPosition == 1 and IsEntryName("bb") then exitlong("bbx",Atstop,highest(high,barsSinceEntry+1)-atr(20)*len); //매도 재진입 if MarketPosition == 0 and MarketPosition(1) == -1 and c < exitprice(1) and var1 < 0 Then sell("ss"); if MarketPosition == -1 and IsEntryName("ss") then exitshort("ssx",Atstop,lowest(low,barsSinceEntry+1)+atr(20)*len); if MarketPosition == 1 and countif(C>O,3)== 3 Then buy("추가매수",OnClose,def,1); if MarketPosition == -1 and countif(C<O,3)== 3 Then sell("추가매도",OnClose,def,1); 2. input : len1(10),len(10),adxP(10); var : CurrentEntryNum(0),adxv(0),Bcnt(0),Scnt(0); adxv = adx(adxP); Var1=dayhigh(1)-dayLow(1); //전일 고저차 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,highest(high,barsSinceEntry+1)-atr(20)*len); If marketposition==-1 then exitshort("매도청산",Atstop,lowest(low,barsSinceEntry+1)+atr(20)*len); // 매수 재진입 if MarketPosition == 0 and MarketPosition(1) == 1 and c > exitprice(1) Then buy("bb"); if MarketPosition == 1 and IsEntryName("bb") then exitlong("bbx",Atstop,highest(high,barsSinceEntry+1)-atr(20)*len); //매도 재진입 if MarketPosition == 0 and MarketPosition(1) == -1 and c < exitprice(1) and var1 < 0 Then sell("ss"); if MarketPosition == -1 and IsEntryName("ss") then exitshort("ssx",Atstop,lowest(low,barsSinceEntry+1)+atr(20)*len); if MarketPosition == 1 Then{ if Adxv >= 40 and highest(c,BarsSinceEntry) >= EntryPrice+0.5*(bcnt+1) Then{ bcnt = bcnt+1; buy("추가매수1",OnClose,def,1); } } Else Bcnt = 0; if MarketPosition == 1 Then{ if Adxv >= 40 and Lowest(C,BarsSinceEntry) <= EntryPrice-0.5*(Scnt+1) Then{ Scnt = Scnt+1; Sell("추가매도2",OnClose,def,1); } } Else Scnt = 0; 즐거운 하루되세요 > 구다이전설 님이 쓴 글입니다. > 제목 : 문의 > 피라미딩을 적용하려 합니다 1 , 매수 상태에서 3봉연속 양봉이면 추가매수 한계약 , 또 앞에봉 포함 3봉연속 양봉이면 추가 매수, 매도 상태도 동일 ... 2. 매수 상태에서 adx가 40이상이면서 이익이 0.5 포인트 마다 추가 매수 .계속. 매도 도 동일 3. 혹시 다른 아이디어 있으시면 부탁합니다 항상 감사합니다 Var1=dayhigh(1)-dayLow(1); //전일 고저차 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,highest(high,barsSinceEntry+1)-atr(20)*len); If marketposition==-1 then exitshort("매도청산",Atstop,lowest(low,barsSinceEntry+1)+atr(20)*len); // 매수 재진입 if MarketPosition == 0 and MarketPosition(1) == 1 and c > exitprice(1) Then buy("bb"); if MarketPosition == 1 and IsEntryName("bb") then exitlong("bbx",Atstop,highest(high,barsSinceEntry+1)-atr(20)*len); //매도 재진입 if MarketPosition == 0 and MarketPosition(1) == -1 and c < exitprice(1) and var1 < 0 Then sell("ss"); if MarketPosition == -1 and IsEntryName("ss") then exitshort("ssx",Atstop,lowest(low,barsSinceEntry+1)+atr(20)*len);