커뮤니티

수정바랍니다.

프로필 이미지
바닥차기
2017-06-11 15:47:03
119
글번호 110313
답변완료
안녕하세요. 아래수식에서 타주기 이평 하나더 (3과5이평)추가해주시고 3분차트에서 타주기3이평 5이평이 정배열이고 60분종가가 60분타주기5이평 위에 있으면 60분봉 새로운봉시작시 매수 타주기3이평 5이평이 역배열이고 60분종가가 60분타주기5이평 아래 있으면 60분봉 새로운봉시작시 매도 매매시간은 17시--새벽02시 까지입니다. input : 분간격(60),P(5); var : S1(0),D1(0),TM(0),TF(0),cnt(0); var : sum(0),mav(0); Array : CC[100](0); if Bdate != Bdate[1] Then{ S1 = TimeToMinutes(stime); D1 = Bdate; } if sdate == D1 Then TM = TimeToMinutes(stime)-S1; Else TM = TimeToMinutes(stime)+1440-S1; if D1 > 0 then{ TF = TM%분간격; if Bdate != Bdate or (Bdate == Bdate and TF < TF[1]) Then{ for cnt = 1 to 99{ CC[cnt] = CC[cnt-1][1]; } if C[1] > mav[1] and mav[1] > 0 and (stime >= 170000 or stime < 020000) Then buy(); if C[1] < mav[1] and mav[1] < 0 and (stime >= 170000 or stime < 020000) Then sell(); } CC[0] = C; if CC[P] > 0 then{ sum = 0; for cnt = 0 to P-1{ sum = sum + CC[cnt]; } mav = sum/P; } } if MarketPosition == 1 Then{ ExitLong("bp",atlimit,EntryPrice+PriceScale*30); ExitLong("bl",AtStop,EntryPrice-PriceScale*15); if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*28 Then ExitLong("btr",AtStop,highest(H,BarsSinceEntry)-PriceScale*24); } if MarketPosition == -1 Then{ ExitShort("sp",atlimit,EntryPrice-PriceScale*30); ExitShort("sl",AtStop,EntryPrice+PriceScale*15); if Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*28 Then ExitShort("str",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*24); } SetStopProfittarget(PriceScale*30,PointStop); SetStopLoss(PriceScale*15,PointStop); 수고하십시요.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2017-06-12 15:26:34

안녕하세요 예스스탁입니다. input : 분간격(60),P1(3),P2(5); var : S1(0),D1(0),TM(0),TF(0),cnt(0); var : sum1(0),mav1(0),sum2(0),mav2(0); Array : CC[100](0); if Bdate != Bdate[1] Then{ S1 = TimeToMinutes(stime); D1 = Bdate; } if sdate == D1 Then TM = TimeToMinutes(stime)-S1; Else TM = TimeToMinutes(stime)+1440-S1; if D1 > 0 then{ TF = TM%분간격; if Bdate != Bdate or (Bdate == Bdate and TF < TF[1]) Then{ for cnt = 1 to 99{ CC[cnt] = CC[cnt-1][1]; } if mav1[1] > mav2[1] and C[1] > mav2[1] and mav2[1] > 0 and (stime >= 170000 or stime < 020000) Then buy(); if mav1[1] > mav2[1] and C[1] < mav2[1] and mav2[1] < 0 and (stime >= 170000 or stime < 020000) Then sell(); } CC[0] = C; if CC[P2] > 0 then{ sum1 = 0; sum2 = 0; for cnt = 0 to P2{ if cnt < P1 Then sum1 = sum1 + CC[cnt]; if cnt < P2 Then sum2 = sum2 + CC[cnt]; } mav1 = sum1/P1; mav2 = sum2/P2; } } if MarketPosition == 1 Then{ ExitLong("bp",atlimit,EntryPrice+PriceScale*30); ExitLong("bl",AtStop,EntryPrice-PriceScale*15); if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*28 Then ExitLong("btr",AtStop,highest(H,BarsSinceEntry)-PriceScale*24); } if MarketPosition == -1 Then{ ExitShort("sp",atlimit,EntryPrice-PriceScale*30); ExitShort("sl",AtStop,EntryPrice+PriceScale*15); if Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*28 Then ExitShort("str",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*24); } SetStopProfittarget(PriceScale*30,PointStop); SetStopLoss(PriceScale*15,PointStop); 즐거운 하루되세요 > 바닥차기 님이 쓴 글입니다. > 제목 : 수정바랍니다. > 안녕하세요. 아래수식에서 타주기 이평 하나더 (3과5이평)추가해주시고 3분차트에서 타주기3이평 5이평이 정배열이고 60분종가가 60분타주기5이평 위에 있으면 60분봉 새로운봉시작시 매수 타주기3이평 5이평이 역배열이고 60분종가가 60분타주기5이평 아래 있으면 60분봉 새로운봉시작시 매도 매매시간은 17시--새벽02시 까지입니다. input : 분간격(60),P(5); var : S1(0),D1(0),TM(0),TF(0),cnt(0); var : sum(0),mav(0); Array : CC[100](0); if Bdate != Bdate[1] Then{ S1 = TimeToMinutes(stime); D1 = Bdate; } if sdate == D1 Then TM = TimeToMinutes(stime)-S1; Else TM = TimeToMinutes(stime)+1440-S1; if D1 > 0 then{ TF = TM%분간격; if Bdate != Bdate or (Bdate == Bdate and TF < TF[1]) Then{ for cnt = 1 to 99{ CC[cnt] = CC[cnt-1][1]; } if C[1] > mav[1] and mav[1] > 0 and (stime >= 170000 or stime < 020000) Then buy(); if C[1] < mav[1] and mav[1] < 0 and (stime >= 170000 or stime < 020000) Then sell(); } CC[0] = C; if CC[P] > 0 then{ sum = 0; for cnt = 0 to P-1{ sum = sum + CC[cnt]; } mav = sum/P; } } if MarketPosition == 1 Then{ ExitLong("bp",atlimit,EntryPrice+PriceScale*30); ExitLong("bl",AtStop,EntryPrice-PriceScale*15); if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*28 Then ExitLong("btr",AtStop,highest(H,BarsSinceEntry)-PriceScale*24); } if MarketPosition == -1 Then{ ExitShort("sp",atlimit,EntryPrice-PriceScale*30); ExitShort("sl",AtStop,EntryPrice+PriceScale*15); if Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*28 Then ExitShort("str",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*24); } SetStopProfittarget(PriceScale*30,PointStop); SetStopLoss(PriceScale*15,PointStop); 수고하십시요.