커뮤니티

수식문의

프로필 이미지
zlxl6391
2012-03-01 19:47:20
497
글번호 48424
답변완료
시스템식 적용내용 10분봉에 1일 2회의 조건으로 매수조건 : 변곡점이 발생하고 3이평이50이평을 돌파 and 스토캐스틱 k가 D상향돌파 조건시 매수 매도조건 : 매수진입후 2%이상 상승후 이평선 데드크로스 조건시 매도 이 식이 맞게 적용되었는지 수정 부탁드립니다 Input : Price(종가),Period1(3), Period2(50),Number(2),percent1(2),p(50),p1(50),p2(50); Var : maV1(0),maV2(0),Buycond(false),Buycond1(false),ExitLongcond(false),Buycond2(false),ExitLongcond2(false),cnt(0),StoK(0),StoD(0),buyVal(0); maV1 = ma(C,Period1); maV2 = ma(C,Period2); Buycond = CrossUP(maV1,maV2); Buycond1 = maV2>maV2[1] and maV2[1]<maV2[2]and maV2[2]<maV2[3]and maV2[3]<maV2[4]; ExitLongcond = CrossDown(maV1,maV2); StoK=StochasticsK(p,p1); StoD=StochasticsD(p,p1,p2); Buycond2 = CrossUP(StoK,StoD); ExitLongcond2 = CrossDown(StoK,StoD); if date[1]!= date Then cnt=0; if (Buycond1 and Buycond2 and Buycond) Then { buy("매수",OnClose); cnt=cnt + 1; } if c>= entryprice()*(1+percent1/100) Then { if ExitLongcond and ExitLongcond Then ExitLong("매도",OnClose,C); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2012-03-02 13:04:03

안녕하세요 예스스탁입니다. 다른 내용은 이상이 없습니다. 1일 2회가지 진입하는 내용이 없으므로 아래와 같이 추가하시면 됩니다. Input : Period1(3), Period2(50),Number(2),percent1(2),p(50),p1(50),p2(50); Var : maV1(0),maV2(0),Buycond(false),Buycond1(false),ExitLongcond(false),Buycond2(false),ExitLongcond2(false),cnt(0),StoK(0),StoD(0),buyVal(0); maV1 = ma(C,Period1); maV2 = ma(C,Period2); Buycond = CrossUP(maV1,maV2); Buycond1 = maV2>maV2[1] and maV2[1]<maV2[2]and maV2[2]<maV2[3]and maV2[3]<maV2[4]; ExitLongcond = CrossDown(maV1,maV2); StoK=StochasticsK(p,p1); StoD=StochasticsD(p,p1,p2); Buycond2 = CrossUP(StoK,StoD); ExitLongcond2 = CrossDown(StoK,StoD); #당일진입횟수 계산 cnt = 0; for var1 = 0 to 10{ if EntryDate(var1) == sdate Then cnt = cnt+1; } if (Buycond1 and Buycond2 and Buycond) and cnt < 2 Then buy("매수",OnClose); if c>= entryprice()*(1+percent1/100) Then { if ExitLongcond and ExitLongcond Then ExitLong("매도",OnClose,C); } 즐거운 하루되세요 > zlxl6391 님이 쓴 글입니다. > 제목 : 수식문의 > 시스템식 적용내용 10분봉에 1일 2회의 조건으로 매수조건 : 변곡점이 발생하고 3이평이50이평을 돌파 and 스토캐스틱 k가 D상향돌파 조건시 매수 매도조건 : 매수진입후 2%이상 상승후 이평선 데드크로스 조건시 매도 이 식이 맞게 적용되었는지 수정 부탁드립니다 Input : Price(종가),Period1(3), Period2(50),Number(2),percent1(2),p(50),p1(50),p2(50); Var : maV1(0),maV2(0),Buycond(false),Buycond1(false),ExitLongcond(false),Buycond2(false),ExitLongcond2(false),cnt(0),StoK(0),StoD(0),buyVal(0); maV1 = ma(C,Period1); maV2 = ma(C,Period2); Buycond = CrossUP(maV1,maV2); Buycond1 = maV2>maV2[1] and maV2[1]<maV2[2]and maV2[2]<maV2[3]and maV2[3]<maV2[4]; ExitLongcond = CrossDown(maV1,maV2); StoK=StochasticsK(p,p1); StoD=StochasticsD(p,p1,p2); Buycond2 = CrossUP(StoK,StoD); ExitLongcond2 = CrossDown(StoK,StoD); if date[1]!= date Then cnt=0; if (Buycond1 and Buycond2 and Buycond) Then { buy("매수",OnClose); cnt=cnt + 1; } if c>= entryprice()*(1+percent1/100) Then { if ExitLongcond and ExitLongcond Then ExitLong("매도",OnClose,C); }