커뮤니티

수정부탁드립니다.

프로필 이미지
강태공3
2011-12-26 16:17:22
407
글번호 46041
답변완료
안녕하세요. 항상 노고가 많으십니다. 그런데 22128 번 수정해주신 수식에 조금 문제가 있습니다. 데이타8 이 연속 3봉이 음봉이고 데이타9.10이 연속 3봉이 양봉이고 데이타2,3,4 중에 양봉이 1개이상이면 그 이후에 7봉이내에 선물이 5이평보다 크면 매수는 이제 나오는데 7봉이내에 5이평 돌파하기 전에 매도조건인 데이타8 이 연속 3봉이 양봉이고 데이타9.10이 연속 3봉이 음봉이고 데이타2,3,4 중에 음봉이 1개이상이 나오면 앞 매수조건은 무시가 되고 7봉이내에 5이평 하향돌파시 매도신호가 나와야 하는데 앞 매수조건이 계속 유지가 되면서 조건 만족시 매수신호만 나오고 매도신호는 무시되어 나오지 않습니다. 수정 부탁드립니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2011-12-27 13:57:32

안녕하세요 예스스탁입니다. Bcond1이 true일대 매도조건이 만족하면 Bcond1은 false가 되고 Scond1이 true일대 매수조건이 만족하면 Scond1은 false가 되어 가장 최근 만족한 조건으로 진입하게 변경했습니다. input : 하루이익1(2); var : PLR(0),XCommission(0,data1),XSlippage(0,data1),OpenPL(0,data1),dayPL(0,data1),count(0,data1),aa(0,data1); var : mav1(0,data1),mav2(0,data1),mav3(0,data1),mav4(0,data1),cond(false,data1); var : bcond1(false,data1),B1idx(0,data1),bcond2(false,data1),B2idx(0,data1); var : Scond1(false,data1),S1idx(0,data1),Scond2(false,data1),S2idx(0,data1); var : d2Y(0,data2),d3Y(0,data3),D4Y(0,data4),Bxcond1(false,data1),Bxidx(0,data1); var : d2E(0,data2),d3E(0,data3),D4E(0,data4),Sxcond1(false,data1),Sxidx(0,data1); if data1(dayindex+1 == 1) Then Bcond1 = false; if data2(dayindex ==0) Then d2Y = 0; if data2(dayindex+1 == 3 and countif(C>O,3)==3) or data2(dayindex+1 > 3 and !(C[4]>O[4]) and countif(C>O,3)==3) Then d2Y = d2Y+1; if data2(dayindex+1 == 3 and countif(C<O,3)==3) or data2(dayindex+1 > 3 and !(C[4]<O[4]) and countif(C<O,3)==3) Then d2E = d2E+1; if data3(dayindex ==0) Then d3Y = 0; if data3(dayindex+1 == 3 and countif(C>O,3)==3) or data3(dayindex+1 > 3 and !(C[4]>O[4]) and countif(C>O,3)==3) Then d3Y = d3Y+1; if data3(dayindex+1 == 3 and countif(C<O,3)==3) or data3(dayindex+1 > 3 and !(C[4]<O[4]) and countif(C<O,3)==3) Then d3E = d3E+1; if data4(dayindex ==0) Then d4Y = 0; if data4(dayindex+1 == 3 and countif(C>O,3)==3) or data4(dayindex+1 > 3 and !(C[4]>O[4]) and countif(C>O,3)==3) Then d4Y = d4Y+1; if data4(dayindex+1 == 3 and countif(C<O,3)==3) or data4(dayindex+1 > 3 and !(C[4]<O[4]) and countif(C<O,3)==3) Then d4E = d4E+1; if data1(dayindex+1 >= 7 and dayindex+1 <= 33) and cond == false Then{ if data8(countif(c<O,3) == 3) and data9(countif(C>O,3) == 3) and data10(countif(C>O,3)== 3) And data2(iff(C>O,1,0))+data3(iff(C>O,1,0))+data4(iff(C>O,1,0)) >= 1 Then{ Bcond1 = true; B1idx = data1(index); Scond1 = false; } if Bcond1 == true and data1(index) <= B1idx+7 and data1(C> ma(c,5)) Then buy(); } if MarketPosition == 1 Then Bcond1 = false; if data1(dayindex+1 >= 7 and dayindex+1 <= 33) and cond == false Then{ if data8(countif(c>O,3) == 3) and data9(countif(C<O,3) == 3) and data10(countif(C<O,3)== 3) And data2(iff(C<O,1,0))+data3(iff(C<O,1,0))+data4(iff(C<O,1,0)) >= 1 Then{ Scond1 = true; S1idx = data1(index); Bcond1 = false; } if Scond1 == true and data1(index) <= B1idx+7 and data1(C<ma(c,5)) Then Sell(); } if MarketPosition == -1 Then Scond1 = false; 즐거운 하루되세요 > 강태공3 님이 쓴 글입니다. > 제목 : 수정부탁드립니다. > 안녕하세요. 항상 노고가 많으십니다. 그런데 22128 번 수정해주신 수식에 조금 문제가 있습니다. 데이타8 이 연속 3봉이 음봉이고 데이타9.10이 연속 3봉이 양봉이고 데이타2,3,4 중에 양봉이 1개이상이면 그 이후에 7봉이내에 선물이 5이평보다 크면 매수는 이제 나오는데 7봉이내에 5이평 돌파하기 전에 매도조건인 데이타8 이 연속 3봉이 양봉이고 데이타9.10이 연속 3봉이 음봉이고 데이타2,3,4 중에 음봉이 1개이상이 나오면 앞 매수조건은 무시가 되고 7봉이내에 5이평 하향돌파시 매도신호가 나와야 하는데 앞 매수조건이 계속 유지가 되면서 조건 만족시 매수신호만 나오고 매도신호는 무시되어 나오지 않습니다. 수정 부탁드립니다.