커뮤니티

문의드립니다~

프로필 이미지
겐지
2020-10-03 05:50:17
925
글번호 142814
답변완료
input : 분주기(30),P(5),분주기1(15),분주기2(5); var : S1(0),D1(0),TM(0),TF(0); var : cnt(0),sum(0),mav(0),tf1(0),TFF(0),entry(false),tf2(0); Array : CC[100](0),OO[100](0),HH[100](0),LL[100](0),TT[100](0),ii[100](0),O2[100](0); Array : C1[100](0),T1[100](0); if (sdate != sdate[1] and stime >= 100000) or (sdate == sdate[1] and (Stime == 100000 or (stime > 100000 and stime[1] < 100000))) Then{ S1 = TimeToMinutes(100000); D1 = sdate; } if D1 > 0 then{ if sdate == D1 Then TM = TimeToMinutes(stime)-S1; Else TM = TimeToMinutes(stime)+1440-S1; TFF = TM%60; TF = TM%분주기; if (sdate != sdate[1] and stime >= 100000) or (sdate == sdate[1] and (Stime == 100000 or (stime > 100000 and stime[1] < 100000))) or (TF < TF[1]) Then{ OO[0] = o; HH[0] = H; LL[0] = L; TT[0] = stime; ii[0] = 0; for cnt = 1 to 99{ OO[cnt] = OO[cnt-1][1]; HH[cnt] = HH[cnt-1][1]; LL[cnt] = LL[cnt-1][1]; CC[cnt] = CC[cnt-1][1]; TT[cnt] = TT[cnt-1][1]; ii[cnt] = ii[cnt-1][1]; } } if H > HH[0] Then HH[0] = H; if L < LL[0] Then LL[0] = L; CC[0] = C; ii[0] = ii[0]+1; TF1 = TM%분주기1; if (sdate != sdate[1] and stime >= 100000) or (sdate == sdate[1] and (Stime == 100000 or (stime > 100000 and stime[1] < 100000))) or (TF1 < TF1[1]) Then{ T1[0] = stime; for cnt = 1 to 99{ C1[cnt] = C1[cnt-1][1]; T1[cnt] = T1[cnt-1][1]; } } C1[0] = C; TF2 = TM%분주기2; if (sdate != sdate[1] and stime >= 100000) or (sdate == sdate[1] and (Stime == 100000 or (stime > 100000 and stime[1] < 100000))) or (TF2 < TF2[1]) Then{ O2[0] = o; for cnt = 1 to 99{ O2[cnt] = O2[cnt-1][1]; } } } 1. 위식의 oo[0]에서 "매30분마다 oo[0]가 새로 생성되고 나서 10봉이내일때만(30분시초가 이후로 10개캔들 이내일때만) 진입한다"를 식으로 표현하고 싶습니다. 2. 위 식을 기준으로 30분단위로 30분시초가(oo[0])에 매수 30분종가에 청산식도 부탁드립니다. 감사합니다~
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-10-05 15:30:34

안녕하세요 예스스탁입니다. 1 input : 분주기(30),P(5),분주기1(15),분주기2(5); var : S1(0),D1(0),TM(0),TF(0); var : cnt(0),sum(0),mav(0),tf1(0),TFF(0),entry(false),tf2(0); Array : CC[100](0),OO[100](0),HH[100](0),LL[100](0),TT[100](0),ii[100](0),O2[100](0); Array : C1[100](0),T1[100](0); if (sdate != sdate[1] and stime >= 100000) or (sdate == sdate[1] and (Stime == 100000 or (stime > 100000 and stime[1] < 100000))) Then{ S1 = TimeToMinutes(100000); D1 = sdate; } if D1 > 0 then { if sdate == D1 Then TM = TimeToMinutes(stime)-S1; Else TM = TimeToMinutes(stime)+1440-S1; TFF = TM%60; TF = TM%분주기; if (sdate != sdate[1] and stime >= 100000) or (sdate == sdate[1] and (Stime == 100000 or (stime > 100000 and stime[1] < 100000))) or (TF < TF[1]) Then { OO[0] = o; HH[0] = H; LL[0] = L; TT[0] = stime; ii[0] = 0; for cnt = 1 to 99 { OO[cnt] = OO[cnt-1][1]; HH[cnt] = HH[cnt-1][1]; LL[cnt] = LL[cnt-1][1]; CC[cnt] = CC[cnt-1][1]; TT[cnt] = TT[cnt-1][1]; ii[cnt] = ii[cnt-1][1]; } } if H > HH[0] Then HH[0] = H; if L < LL[0] Then LL[0] = L; CC[0] = C; ii[0] = ii[0]+1; TF1 = TM%분주기1; if (sdate != sdate[1] and stime >= 100000) or (sdate == sdate[1] and (Stime == 100000 or (stime > 100000 and stime[1] < 100000))) or (TF1 < TF1[1]) Then { T1[0] = stime; for cnt = 1 to 99 { C1[cnt] = C1[cnt-1][1]; T1[cnt] = T1[cnt-1][1]; } } C1[0] = C; TF2 = TM%분주기2; if (sdate != sdate[1] and stime >= 100000) or (sdate == sdate[1] and (Stime == 100000 or (stime > 100000 and stime[1] < 100000))) or (TF2 < TF2[1]) Then { O2[0] = o; for cnt = 1 to 99 { O2[cnt] = O2[cnt-1][1]; } } if ii[0] <= 10 Then { 진입수식 } } 2 종가청산은 가능한 부분이 아닙니다. 신호상으로 종가에 청산된것으로 보고자 하시면 아래와 같이 작성하시면 됩니다. 봉완성이 다음봉시가수신될때 이므로 실제 청산주문은 다음봉시가에 나가게 됩니다. input : 분주기(30); var : S1(0),D1(0),TM(0),TF(0); if (NextBarSdate != sdate[1] and NextBarStime >= 100000) or (NextBarSdate == sdate[1] and (NextBarStime == 100000 or (NextBarStime > 100000 and stime < 100000))) Then{ S1 = TimeToMinutes(100000); D1 = sdate; } if D1 > 0 then { if sdate == D1 Then TM = TimeToMinutes(NextBarStime)-S1; Else TM = TimeToMinutes(NextBarStime)+1440-S1; TF = TM%분주기; if (NextBarSdate != sdate[1] and NextBarStime >= 100000) or (NextBarSdate == sdate[1] and (NextBarStime == 100000 or (NextBarStime > 100000 and stime < 100000))) or (TF < TF[1]) Then { Buy("b",AtMarket); ExitLong("bx"); } } 즐거운 하루되세요 > 겐지 님이 쓴 글입니다. > 제목 : 문의드립니다~ > input : 분주기(30),P(5),분주기1(15),분주기2(5); var : S1(0),D1(0),TM(0),TF(0); var : cnt(0),sum(0),mav(0),tf1(0),TFF(0),entry(false),tf2(0); Array : CC[100](0),OO[100](0),HH[100](0),LL[100](0),TT[100](0),ii[100](0),O2[100](0); Array : C1[100](0),T1[100](0); if (sdate != sdate[1] and stime >= 100000) or (sdate == sdate[1] and (Stime == 100000 or (stime > 100000 and stime[1] < 100000))) Then{ S1 = TimeToMinutes(100000); D1 = sdate; } if D1 > 0 then{ if sdate == D1 Then TM = TimeToMinutes(stime)-S1; Else TM = TimeToMinutes(stime)+1440-S1; TFF = TM%60; TF = TM%분주기; if (sdate != sdate[1] and stime >= 100000) or (sdate == sdate[1] and (Stime == 100000 or (stime > 100000 and stime[1] < 100000))) or (TF < TF[1]) Then{ OO[0] = o; HH[0] = H; LL[0] = L; TT[0] = stime; ii[0] = 0; for cnt = 1 to 99{ OO[cnt] = OO[cnt-1][1]; HH[cnt] = HH[cnt-1][1]; LL[cnt] = LL[cnt-1][1]; CC[cnt] = CC[cnt-1][1]; TT[cnt] = TT[cnt-1][1]; ii[cnt] = ii[cnt-1][1]; } } if H > HH[0] Then HH[0] = H; if L < LL[0] Then LL[0] = L; CC[0] = C; ii[0] = ii[0]+1; TF1 = TM%분주기1; if (sdate != sdate[1] and stime >= 100000) or (sdate == sdate[1] and (Stime == 100000 or (stime > 100000 and stime[1] < 100000))) or (TF1 < TF1[1]) Then{ T1[0] = stime; for cnt = 1 to 99{ C1[cnt] = C1[cnt-1][1]; T1[cnt] = T1[cnt-1][1]; } } C1[0] = C; TF2 = TM%분주기2; if (sdate != sdate[1] and stime >= 100000) or (sdate == sdate[1] and (Stime == 100000 or (stime > 100000 and stime[1] < 100000))) or (TF2 < TF2[1]) Then{ O2[0] = o; for cnt = 1 to 99{ O2[cnt] = O2[cnt-1][1]; } } } 1. 위식의 oo[0]에서 "매30분마다 oo[0]가 새로 생성되고 나서 10봉이내일때만(30분시초가 이후로 10개캔들 이내일때만) 진입한다"를 식으로 표현하고 싶습니다. 2. 위 식을 기준으로 30분단위로 30분시초가(oo[0])에 매수 30분종가에 청산식도 부탁드립니다. 감사합니다~