커뮤니티

확인 부탁드립니다

프로필 이미지
라몬
2024-07-18 15:43:31
676
글번호 181636
답변완료
안녕하세요 늘 도움주셔서 감사합니다. 아래 시스템과 지표수식 내용중 확인 부탁드립니다. 1.매수조건 - 4시간봉 시가선 위 - 1시간봉 시가선 위 - 1시간봉 25% 선 위 - 3분봉 전환선 위 (전환선 변수) 2.매도조건 - 4시간봉 시가선 아래 - 1시간봉 시가선 아래 - 1시간봉 25% 선 아래 - 3분봉 전환선 아래 (전환선 변수) 위 조건중 일부가 아닌 4가지 모두를 층족할경우의 시스템과 지표수식입니다. 일부만 충족되어도 표시되는거 같아 확인 부탁 드립니다. 1 input : 타주기분1(3),타주기분2(60),타주기분3(240),전환선기간(9); var : S1(0),D1(0),TM(0),cnt(0),hh(0),ll(0),전환선(0); var : TF1(0),TF2(0),TF3(0),O2(0),O3(0),H2(0),L2(0); Array : H1[100](0),L1[100](0); 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; TF1 = TM%타주기분1; if Bdate != Bdate[1] or (Bdate == Bdate[1] and 타주기분1 > 1 and TF1 < TF1[1]) or (Bdate == Bdate[1] and 타주기분1 > 1 and TM >= TM[1]+타주기분1) or (Bdate == Bdate[1] and 타주기분1 == 1 and TM > TM[1]) Then { For cnt = 99 DownTo 1 { H1[cnt] = H1[cnt-1]; L1[cnt] = L1[cnt-1]; } H1[0] = H; L1[0] = L; } TF2 = TM%타주기분2; if Bdate != Bdate[1] or (Bdate == Bdate[1] and 타주기분1 > 1 and TF1 < TF1[1]) or (Bdate == Bdate[1] and 타주기분1 > 1 and TM >= TM[1]+타주기분1) or (Bdate == Bdate[1] and 타주기분1 == 1 and TM > TM[1]) Then { O2 = O; H2 = H; L2 = L; } if H2 > 0 and H > H2 Then H2 = H; if L2 > 0 and L < L2 Then L2 = L; TF3 = TM%타주기분3; if Bdate != Bdate[1] or (Bdate == Bdate[1] and 타주기분1 > 1 and TF1 < TF1[1]) or (Bdate == Bdate[1] and 타주기분1 > 1 and TM >= TM[1]+타주기분1) or (Bdate == Bdate[1] and 타주기분1 == 1 and TM > TM[1]) Then { O3 = O; } if O2 > 0 and O3 > 0 and H2[전환선기간-1] > 0 and L2[전환선기간-1] > 0 Then { hh = 0; ll = 0; For cnt = 0 to 전환선기간-1 { if hh == 0 or (hh > 0 and H[cnt] > hh) Then hh = H[cnt]; if ll == 0 or (ll > 0 and L[cnt] < ll) Then ll = L[cnt]; } 전환선 = (hh+ll)/2; if C > O3 and C > O2 and C >= L2+(H2-L2)*0.25 and C > 전환선 then Buy(); if C < O3 and C < O2 and C <= H2-(H2-L2)*0.25 and C < 전환선 then Sell(); } } 2 input : 타주기분1(3),타주기분2(60),타주기분3(240),전환선기간(9); var : S1(0),D1(0),TM(0),cnt(0),hh(0),ll(0),전환선(0); var : TF1(0),TF2(0),TF3(0),O2(0),O3(0),H2(0),L2(0),tx(0); Array : H1[100](0),L1[100](0); 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; TF1 = TM%타주기분1; if Bdate != Bdate[1] or (Bdate == Bdate[1] and 타주기분1 > 1 and TF1 < TF1[1]) or (Bdate == Bdate[1] and 타주기분1 > 1 and TM >= TM[1]+타주기분1) or (Bdate == Bdate[1] and 타주기분1 == 1 and TM > TM[1]) Then { For cnt = 99 DownTo 1 { H1[cnt] = H1[cnt-1]; L1[cnt] = L1[cnt-1]; } H1[0] = H; L1[0] = L; } TF2 = TM%타주기분2; if Bdate != Bdate[1] or (Bdate == Bdate[1] and 타주기분1 > 1 and TF1 < TF1[1]) or (Bdate == Bdate[1] and 타주기분1 > 1 and TM >= TM[1]+타주기분1) or (Bdate == Bdate[1] and 타주기분1 == 1 and TM > TM[1]) Then { O2 = O; H2 = H; L2 = L; } if H2 > 0 and H > H2 Then H2 = H; if L2 > 0 and L < L2 Then L2 = L; TF3 = TM%타주기분3; if Bdate != Bdate[1] or (Bdate == Bdate[1] and 타주기분1 > 1 and TF1 < TF1[1]) or (Bdate == Bdate[1] and 타주기분1 > 1 and TM >= TM[1]+타주기분1) or (Bdate == Bdate[1] and 타주기분1 == 1 and TM > TM[1]) Then { O3 = O; } if O2 > 0 and O3 > 0 and H2[전환선기간-1] > 0 and L2[전환선기간-1] > 0 Then { hh = 0; ll = 0; For cnt = 0 to 전환선기간-1 { if hh == 0 or (hh > 0 and H[cnt] > hh) Then hh = H[cnt]; if ll == 0 or (ll > 0 and L[cnt] < ll) Then ll = L[cnt]; } 전환선 = (hh+ll)/2; if C > O3 and C > O2 and C >= L2+(H2-L2)*0.25 and C > 전환선 then { tx = Text_New(sDate,sTime,H,"●"); Text_SetColor(tx,Red); Text_SetStyle(tx,2,1); Text_SetSize(tx,12); } if C < O3 and C < O2 and C <= H2-(H2-L2)*0.25 and C < 전환선 then { tx = Text_New(sDate,sTime,H,"●"); Text_SetColor(tx,Blue); Text_SetStyle(tx,2,1); Text_SetSize(tx,12); } } }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2024-07-18 17:31:31

안녕하세요 예스스탁입니다. 식을 수정했습니다. 다만 틱봉에서 분봉주기의 값을 정확히 계산할 수 없습니다. 랭귀지가 봉의 시고저종만 사용이 가능해서 봉중간에 있는 분봉 경계값을 알수가 없습니다. 2번 지표식에 조건에 사용되는 5가지 선을 같이 출력되게 작성해 드립니다. 1 input : 타주기분1(3),타주기분2(60),타주기분3(240),전환선기간(9); var : S1(0),D1(0),TM(0),cnt(0),hh(0),ll(0),전환선(0); var : TF1(0),TF2(0),TF3(0),O2(0),O3(0),H2(0),L2(0); Array : H1[100](0),L1[100](0); 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; TF1 = TM%타주기분1; if Bdate != Bdate[1] or (Bdate == Bdate[1] and 타주기분1 > 1 and TF1 < TF1[1]) or (Bdate == Bdate[1] and 타주기분1 > 1 and TM >= TM[1]+타주기분1) or (Bdate == Bdate[1] and 타주기분1 == 1 and TM > TM[1]) Then { For cnt = 99 DownTo 1 { H1[cnt] = H1[cnt-1]; L1[cnt] = L1[cnt-1]; } H1[0] = H; L1[0] = L; } if H1[0] > 0 and H > H1[0] Then H1[0] = H; if L1[0] > 0 and L < L1[0] Then L1[0] = L; TF2 = TM%타주기분2; if Bdate != Bdate[1] or (Bdate == Bdate[1] and 타주기분2 > 1 and TF2 < TF2[1]) or (Bdate == Bdate[1] and 타주기분2 > 1 and TM >= TM[1]+타주기분1) or (Bdate == Bdate[1] and 타주기분2 == 1 and TM > TM[1]) Then { O2 = O; H2 = H; L2 = L; } if H2 > 0 and H > H2 Then H2 = H; if L2 > 0 and L < L2 Then L2 = L; TF3 = TM%타주기분3; if Bdate != Bdate[1] or (Bdate == Bdate[1] and 타주기분3 > 1 and TF3 < TF3[1]) or (Bdate == Bdate[1] and 타주기분3 > 1 and TM >= TM[1]+타주기분3) or (Bdate == Bdate[1] and 타주기분3 == 1 and TM > TM[1]) Then { O3 = O; } if O2 > 0 and O3 > 0 and H1[전환선기간-1] > 0 and L1[전환선기간-1] > 0 Then { hh = 0; ll = 0; For cnt = 0 to 전환선기간-1 { if hh == 0 or (hh > 0 and H1[cnt] > hh) Then hh = H1[cnt]; if ll == 0 or (ll > 0 and L1[cnt] < ll) Then ll = L1[cnt]; } 전환선 = (hh+ll)/2; if C > O3 and C > O2 and C >= L2+(H2-L2)*0.25 and C > 전환선 then Buy(); if C < O3 and C < O2 and C <= H2-(H2-L2)*0.25 and C < 전환선 then Sell(); } } 2 input : 타주기분1(3),타주기분2(60),타주기분3(240),전환선기간(9); var : S1(0),D1(0),TM(0),cnt(0),hh(0),ll(0),전환선(0); var : TF1(0),TF2(0),TF3(0),O2(0),O3(0),H2(0),L2(0),tx(0); Array : H1[100](0),L1[100](0); 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; TF1 = TM%타주기분1; if Bdate != Bdate[1] or (Bdate == Bdate[1] and 타주기분1 > 1 and TF1 < TF1[1]) or (Bdate == Bdate[1] and 타주기분1 > 1 and TM >= TM[1]+타주기분1) or (Bdate == Bdate[1] and 타주기분1 == 1 and TM > TM[1]) Then { For cnt = 99 DownTo 1 { H1[cnt] = H1[cnt-1]; L1[cnt] = L1[cnt-1]; } H1[0] = H; L1[0] = L; } if H1[0] > 0 and H > H1[0] Then H1[0] = H; if L1[0] > 0 and L < L1[0] Then L1[0] = L; TF2 = TM%타주기분2; if Bdate != Bdate[1] or (Bdate == Bdate[1] and 타주기분2 > 1 and TF2 < TF2[1]) or (Bdate == Bdate[1] and 타주기분2 > 1 and TM >= TM[1]+타주기분1) or (Bdate == Bdate[1] and 타주기분2 == 1 and TM > TM[1]) Then { O2 = O; H2 = H; L2 = L; } if H2 > 0 and H > H2 Then H2 = H; if L2 > 0 and L < L2 Then L2 = L; TF3 = TM%타주기분3; if Bdate != Bdate[1] or (Bdate == Bdate[1] and 타주기분3 > 1 and TF3 < TF3[1]) or (Bdate == Bdate[1] and 타주기분3 > 1 and TM >= TM[1]+타주기분3) or (Bdate == Bdate[1] and 타주기분3 == 1 and TM > TM[1]) Then { O3 = O; } if O2 > 0 and O3 > 0 and H1[전환선기간-1] > 0 and L1[전환선기간-1] > 0 Then { hh = 0; ll = 0; For cnt = 0 to 전환선기간-1 { if hh == 0 or (hh > 0 and H1[cnt] > hh) Then hh = H1[cnt]; if ll == 0 or (ll > 0 and L1[cnt] < ll) Then ll = L1[cnt]; } 전환선 = (hh+ll)/2; if C > O3 and C > O2 and C >= L2+(H2-L2)*0.25 and C > 전환선 then { tx = Text_New(sDate,sTime,H,"●"); Text_SetColor(tx,Red); Text_SetStyle(tx,2,1); Text_SetSize(tx,12); } if C < O3 and C < O2 and C <= H2-(H2-L2)*0.25 and C < 전환선 then { tx = Text_New(sDate,sTime,H,"●"); Text_SetColor(tx,Blue); Text_SetStyle(tx,2,1); Text_SetSize(tx,12); } plot1(O2); plot2(O3); plot3(전환선); plot4(L2+(H2-L2)*0.25); plot5(H2-(H2-L2)*0.25); } } 즐거운 하루되세요 > 라몬 님이 쓴 글입니다. > 제목 : 확인 부탁드립니다 > 안녕하세요 늘 도움주셔서 감사합니다. 아래 시스템과 지표수식 내용중 확인 부탁드립니다. 1.매수조건 - 4시간봉 시가선 위 - 1시간봉 시가선 위 - 1시간봉 25% 선 위 - 3분봉 전환선 위 (전환선 변수) 2.매도조건 - 4시간봉 시가선 아래 - 1시간봉 시가선 아래 - 1시간봉 25% 선 아래 - 3분봉 전환선 아래 (전환선 변수) 위 조건중 일부가 아닌 4가지 모두를 층족할경우의 시스템과 지표수식입니다. 일부만 충족되어도 표시되는거 같아 확인 부탁 드립니다. 1 input : 타주기분1(3),타주기분2(60),타주기분3(240),전환선기간(9); var : S1(0),D1(0),TM(0),cnt(0),hh(0),ll(0),전환선(0); var : TF1(0),TF2(0),TF3(0),O2(0),O3(0),H2(0),L2(0); Array : H1[100](0),L1[100](0); 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; TF1 = TM%타주기분1; if Bdate != Bdate[1] or (Bdate == Bdate[1] and 타주기분1 > 1 and TF1 < TF1[1]) or (Bdate == Bdate[1] and 타주기분1 > 1 and TM >= TM[1]+타주기분1) or (Bdate == Bdate[1] and 타주기분1 == 1 and TM > TM[1]) Then { For cnt = 99 DownTo 1 { H1[cnt] = H1[cnt-1]; L1[cnt] = L1[cnt-1]; } H1[0] = H; L1[0] = L; } TF2 = TM%타주기분2; if Bdate != Bdate[1] or (Bdate == Bdate[1] and 타주기분1 > 1 and TF1 < TF1[1]) or (Bdate == Bdate[1] and 타주기분1 > 1 and TM >= TM[1]+타주기분1) or (Bdate == Bdate[1] and 타주기분1 == 1 and TM > TM[1]) Then { O2 = O; H2 = H; L2 = L; } if H2 > 0 and H > H2 Then H2 = H; if L2 > 0 and L < L2 Then L2 = L; TF3 = TM%타주기분3; if Bdate != Bdate[1] or (Bdate == Bdate[1] and 타주기분1 > 1 and TF1 < TF1[1]) or (Bdate == Bdate[1] and 타주기분1 > 1 and TM >= TM[1]+타주기분1) or (Bdate == Bdate[1] and 타주기분1 == 1 and TM > TM[1]) Then { O3 = O; } if O2 > 0 and O3 > 0 and H2[전환선기간-1] > 0 and L2[전환선기간-1] > 0 Then { hh = 0; ll = 0; For cnt = 0 to 전환선기간-1 { if hh == 0 or (hh > 0 and H[cnt] > hh) Then hh = H[cnt]; if ll == 0 or (ll > 0 and L[cnt] < ll) Then ll = L[cnt]; } 전환선 = (hh+ll)/2; if C > O3 and C > O2 and C >= L2+(H2-L2)*0.25 and C > 전환선 then Buy(); if C < O3 and C < O2 and C <= H2-(H2-L2)*0.25 and C < 전환선 then Sell(); } } 2 input : 타주기분1(3),타주기분2(60),타주기분3(240),전환선기간(9); var : S1(0),D1(0),TM(0),cnt(0),hh(0),ll(0),전환선(0); var : TF1(0),TF2(0),TF3(0),O2(0),O3(0),H2(0),L2(0),tx(0); Array : H1[100](0),L1[100](0); 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; TF1 = TM%타주기분1; if Bdate != Bdate[1] or (Bdate == Bdate[1] and 타주기분1 > 1 and TF1 < TF1[1]) or (Bdate == Bdate[1] and 타주기분1 > 1 and TM >= TM[1]+타주기분1) or (Bdate == Bdate[1] and 타주기분1 == 1 and TM > TM[1]) Then { For cnt = 99 DownTo 1 { H1[cnt] = H1[cnt-1]; L1[cnt] = L1[cnt-1]; } H1[0] = H; L1[0] = L; } TF2 = TM%타주기분2; if Bdate != Bdate[1] or (Bdate == Bdate[1] and 타주기분1 > 1 and TF1 < TF1[1]) or (Bdate == Bdate[1] and 타주기분1 > 1 and TM >= TM[1]+타주기분1) or (Bdate == Bdate[1] and 타주기분1 == 1 and TM > TM[1]) Then { O2 = O; H2 = H; L2 = L; } if H2 > 0 and H > H2 Then H2 = H; if L2 > 0 and L < L2 Then L2 = L; TF3 = TM%타주기분3; if Bdate != Bdate[1] or (Bdate == Bdate[1] and 타주기분1 > 1 and TF1 < TF1[1]) or (Bdate == Bdate[1] and 타주기분1 > 1 and TM >= TM[1]+타주기분1) or (Bdate == Bdate[1] and 타주기분1 == 1 and TM > TM[1]) Then { O3 = O; } if O2 > 0 and O3 > 0 and H2[전환선기간-1] > 0 and L2[전환선기간-1] > 0 Then { hh = 0; ll = 0; For cnt = 0 to 전환선기간-1 { if hh == 0 or (hh > 0 and H[cnt] > hh) Then hh = H[cnt]; if ll == 0 or (ll > 0 and L[cnt] < ll) Then ll = L[cnt]; } 전환선 = (hh+ll)/2; if C > O3 and C > O2 and C >= L2+(H2-L2)*0.25 and C > 전환선 then { tx = Text_New(sDate,sTime,H,"●"); Text_SetColor(tx,Red); Text_SetStyle(tx,2,1); Text_SetSize(tx,12); } if C < O3 and C < O2 and C <= H2-(H2-L2)*0.25 and C < 전환선 then { tx = Text_New(sDate,sTime,H,"●"); Text_SetColor(tx,Blue); Text_SetStyle(tx,2,1); Text_SetSize(tx,12); } } }