커뮤니티

타주기 그물망시스템 샘플조건식

프로필 이미지
조민철
2021-02-10 18:33:53
766
글번호 146284
답변완료
항상 감사드립니다 조건식을 줄여서 샘플식으로로 만들었습니다 아래조건식을 타주기식에 적용코져합니다. #################### ###신거래선 기준 ### #################### var:var3(0),var960(0); if V == highest(V,3) Then var3 = (C+H+L)/3; #120거래선# if V == highest(V,960) Then var960 = (C+H+L)/3; #240거래선# ############# RMI 매매식 ############# input : MOM기간(5),적용기간(14),시그널기간(5); var : RMI(0),RMIsig(0); var: t70(0); RMI = iff((ma(iff(c<c[MOM기간],(c[MOM기간]-c),0),적용기간))<=0,100, (100-(100/(1+((ma(iff(c>c[MOM기간],(c-c[MOM기간]),0),적용기간))/(ma(iff(c<c[MOM기간],(c[MOM기간]-c),0),적용기간))))))); RMIsig = ma(RMI,시그널기간); if crossup(RMI,50) Then t70 = 100 ; if crossdown(RMI,50) Then t70 = 0; ############### ### 그물망 ### ############### input:period90(60),횡보율(0.001); var : var301(0),var302(0),var303(0),var304(0),var305(0); var : t60(0); var301=ema(c,period90); var302=ema(c,period90+1); var303=ema(c,period90+2); var304=ema(c,period90+3); var305=ema(c,period90+4); value1 = 0; value2 = 0; value3 = 0; if var301>var301[1]*(1+횡보율/100) then value1 = value1+1; else if var301<var301[1]*(1-횡보율/100) then value2 = value2+1; else value3 = value3+1; if var302>var302[1]*(1+횡보율/100) then value1 = value1+1; else if var302<var302[1]*(1-횡보율/100) then value2 = value2+1; else value3 = value3+1; if var303>var303[1]*(1+횡보율/100) then value1 = value1+1; else if var303<var303[1]*(1-횡보율/100) then value2 = value2+1; else value3 = value3+1; if var304>var304[1]*(1+횡보율/100) then value1 = value1+1; else if var304<var304[1]*(1-횡보율/100) then value2 = value2+1; else value3 = value3+1; if var305>var305[1]*(1+횡보율/100) then value1 = value1+1; else if var305<var305[1]*(1-횡보율/100) then value2 = value2+1; else value3 = value3+1; if value1 == 5 Then t60 = 1 ; else if value2 == 5 Then t60 = -1; Else if value3 == 5 Then t60 = 0; /*******************************/ var: t90(0); if t60 == 1 Then T90 = 1 ; if t60 == -1 Then T90 = -1 ; var3>var960 and t70==100 and t90==1이면 매수 var3<var960 and t70==0 and t90==-1이면 매도 감사합니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2021-02-15 13:12:42

안녕하세요 예스스탁입니다. 전략실행차트는 최대 1만개봉만 조회가 됩니다. 차트에 타주기 지표 계산에 필요한 만큼 충분한 데이타가 있어야 신호가 발생할 수 있습니다. input : 타주기분(30); input : VP1(3),VP2(960); input : MOM기간(5),적용기간(14),시그널기간(5); input : period90(60),횡보율(0.001); var : S1(0),D1(0),TM(0),TF(0),cnt(0),ii(0); var : HV3(0),HV960(0),Var3(0),Var960(0); var : sum1(0),sum2(0),mav1(0),mav2(0),sum3(0),mav3(0),RMIsig(0),t70(0); var : var301(0),var302(0),var303(0),var304(0),var305(0),t60(0); var : prevar301(0),prevar302(0),prevar303(0),prevar304(0),prevar305(0); var : EP1(0),EP2(0),EP3(0),EP4(0),EP5(0); var : t90(0); Array : CC[100](0),HH[100](0),LL[100](0),VV[1000](0); Array : RMI[100](-1); Ep1 = 2/(period90+1); Ep2 = 2/((period90+1)+1); Ep3 = 2/((period90+2)+1); Ep4 = 2/((period90+3)+1); Ep5 = 2/((period90+4)+1); if Bdate != Bdate[1] Then { S1 = TimeToMinutes(stime); D1 = sdate; } if D1 > 0 then { if sdate == D1 Then TM = TimeToMinutes(stime)-S1; Else TM = TimeToMinutes(stime)+1440-S1; TF = TM%타주기분; if Bdate != Bdate[1] or (Bdate == Bdate[1] and 타주기분 > 1 and TF < TF[1]) or (Bdate == Bdate[1] and 타주기분 > 1 and TM >= TM[1]+타주기분) or (Bdate == Bdate[1] and 타주기분 == 1 and TM > TM[1]) Then { ii = ii+1; VV[0] = 0; LL[0] = L; HH[0] = H; prevar301 = var301[1]; prevar302 = var302[1]; prevar303 = var303[1]; prevar304 = var304[1]; prevar305 = var305[1]; for cnt = 1 to 999 { if cnt <= 99 Then { CC[cnt] = CC[cnt-1][1]; HH[cnt] = LL[cnt-1][1]; LL[cnt] = LL[cnt-1][1]; RMI[cnt] = RMI[cnt-1][1]; } VV[cnt] = VV[cnt-1][1]; } } CC[0] = C; VV[0] = VV[0] + V; if VV[VP2-1] > 0 Then { HV3 = 0; For cnt = 0 to VP2-1 { if cnt < VP1 and VV[cnt] > HV3 Then HV3 = VV[cnt]; if VV[cnt] > HV960 Then HV960 = VV[cnt]; } if VV[0] == HV3 Then Var3 = (CC[0]+HH[0]+LL[0])/3; if VV[0] == HV960 Then Var960 = (CC[0]+HH[0]+LL[0])/3; } if CC[MOM기간+적용기간] > 0 Then { sum1 = 0; sum2 = 0; For cnt = 0 to 적용기간-1 { if CC[cnt] < CC[cnt+MOM기간] Then sum1 = sum1 + abs(CC[cnt+MOM기간]-CC[cnt]); if CC[cnt] > CC[cnt+MOM기간] Then sum2 = sum2 + abs(CC[cnt+MOM기간]-CC[cnt]); } mav1 = sum1/적용기간; mav2 = sum2/적용기간; RMI[0] = IFf(mav1 <= 0, 100, (100-(100/(1+(mav2/mav1))))); if RMI[0] > 50 Then t70 = 100; if RMI[0] < 50 Then t70 = 0; } if RMI[시그널기간-1] >= 0 Then { sum3 = 0; For cnt = 0 to 시그널기간-1 { sum3 = sum3 + RMI[cnt]; } RMIsig = sum3/시그널기간; } if ii <= 1 then { var301 = C; var302 = C; var303 = C; var304 = C; var305 = C; } else{ var301 = C * EP1 + Prevar301 * (1-EP1); var302 = C * EP2 + Prevar302 * (1-EP2); var303 = C * EP3 + Prevar303 * (1-EP3); var304 = C * EP4 + Prevar304 * (1-EP4); var305 = C * EP5 + Prevar305 * (1-EP5); } value1 = 0; value2 = 0; value3 = 0; if var301>Prevar301*(1+횡보율/100) then value1 = value1+1; else if var301<Prevar301*(1-횡보율/100) then value2 = value2+1; else value3 = value3+1; if var302>Prevar302*(1+횡보율/100) then value1 = value1+1; else if var302<Prevar302*(1-횡보율/100) then value2 = value2+1; else value3 = value3+1; if var303>Prevar303 *(1+횡보율/100) then value1 = value1+1; else if var303<Prevar303 *(1-횡보율/100) then value2 = value2+1; else value3 = value3+1; if var304>Prevar304*(1+횡보율/100) then value1 = value1+1; else if var304<Prevar304*(1-횡보율/100) then value2 = value2+1; else value3 = value3+1; if var305>Prevar305*(1+횡보율/100) then value1 = value1+1; else if var305<Prevar305*(1-횡보율/100) then value2 = value2+1; else value3 = value3+1; if value1 == 5 Then t60 = 1 ; else if value2 == 5 Then t60 = -1; Else if value3 == 5 Then t60 = 0; if t60 == 1 Then T90 = 1 ; if t60 == -1 Then T90 = -1 ; if Var3 > 0 and Var960 > 0 Then { if var3>var960 and t70==100 and t90==1 then buy(); if var3<var960 and t70==0 and t90==-1 then sell(); } } 즐거운 하루되세요 > 조민철 님이 쓴 글입니다. > 제목 : 타주기 그물망시스템 샘플조건식 > 항상 감사드립니다 조건식을 줄여서 샘플식으로로 만들었습니다 아래조건식을 타주기식에 적용코져합니다. #################### ###신거래선 기준 ### #################### var:var3(0),var960(0); if V == highest(V,3) Then var3 = (C+H+L)/3; #120거래선# if V == highest(V,960) Then var960 = (C+H+L)/3; #240거래선# ############# RMI 매매식 ############# input : MOM기간(5),적용기간(14),시그널기간(5); var : RMI(0),RMIsig(0); var: t70(0); RMI = iff((ma(iff(c<c[MOM기간],(c[MOM기간]-c),0),적용기간))<=0,100, (100-(100/(1+((ma(iff(c>c[MOM기간],(c-c[MOM기간]),0),적용기간))/(ma(iff(c<c[MOM기간],(c[MOM기간]-c),0),적용기간))))))); RMIsig = ma(RMI,시그널기간); if crossup(RMI,50) Then t70 = 100 ; if crossdown(RMI,50) Then t70 = 0; ############### ### 그물망 ### ############### input:period90(60),횡보율(0.001); var : var301(0),var302(0),var303(0),var304(0),var305(0); var : t60(0); var301=ema(c,period90); var302=ema(c,period90+1); var303=ema(c,period90+2); var304=ema(c,period90+3); var305=ema(c,period90+4); value1 = 0; value2 = 0; value3 = 0; if var301>var301[1]*(1+횡보율/100) then value1 = value1+1; else if var301<var301[1]*(1-횡보율/100) then value2 = value2+1; else value3 = value3+1; if var302>var302[1]*(1+횡보율/100) then value1 = value1+1; else if var302<var302[1]*(1-횡보율/100) then value2 = value2+1; else value3 = value3+1; if var303>var303[1]*(1+횡보율/100) then value1 = value1+1; else if var303<var303[1]*(1-횡보율/100) then value2 = value2+1; else value3 = value3+1; if var304>var304[1]*(1+횡보율/100) then value1 = value1+1; else if var304<var304[1]*(1-횡보율/100) then value2 = value2+1; else value3 = value3+1; if var305>var305[1]*(1+횡보율/100) then value1 = value1+1; else if var305<var305[1]*(1-횡보율/100) then value2 = value2+1; else value3 = value3+1; if value1 == 5 Then t60 = 1 ; else if value2 == 5 Then t60 = -1; Else if value3 == 5 Then t60 = 0; /*******************************/ var: t90(0); if t60 == 1 Then T90 = 1 ; if t60 == -1 Then T90 = -1 ; var3>var960 and t70==100 and t90==1이면 매수 var3<var960 and t70==0 and t90==-1이면 매도 감사합니다.