커뮤니티

문의드립니다.

프로필 이미지
미시타이
2022-05-09 00:48:34
1223
글번호 158668
답변완료
Var : long_resi(0), long_ground(0), long_period(20); if SwingHigh(1,H, long_period,long_period,long_period*2+1) != -1 Then long_resi = H[long_period]; if SwingLow(1, L, long_period,long_period,long_period*2+1) != -1 Then long_ground = L[long_period]; var : cnt(0),longground_fall_cnt(0),cnt_1(0) ; array : longground_fall[10](0) ; for cnt = 0 to 9 { longground_fall[cnt] = SwingLow(cnt+1, L, long_period,long_period,long_period*30) ; } cnt_1 = 0 ; While longground_fall[cnt_1] < longground_fall[cnt_1+1] { cnt_1 = cnt_1 +1 ; } longground_fall_cnt = cnt_1 ; var : crack(0) ; if (longground_fall[1]/longground_fall[0]-1)*100 > 0 && (longground_fall[1]/longground_fall[0]-1)*100 < 4 Then crack = 1 ; Else crack = 0 ; if longground_fall_cnt > 2 && crack > 0 Then Plot1(l*0.95 , "조건만족") ; 위의 신호검색을 종목검색으로 변환시 var : 검색여부(0) ; if longground_fall_cnt > 2 && crack > 0 Then 검색여부 = 1; if countif(검색여부 > 0, 검색봉수) > 0 then find(1) ; 이렇게 검색하면 '데이터가 존재하지 않습니다.'라고 하는데 무엇이 잘못되었을까요?? 고견 부탁드립니다. 그리고 미리 감사드립니다.!!
종목검색
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2022-05-09 14:51:33

안녕하세요 예스스탁입니다. 1 for cnt = 0 to 9 { longground_fall[cnt] = SwingLow(cnt+1, L, long_period,long_period,long_period*30) ; } 위 내용에 보시면 작성하신 수식은 최소 600봉(long_period*30)이 필요한 내용입니다. 종목검색은 최대 500봉 까지만 제공됩니다. 500봉이상 요구되는 내용은 검색될수 없습니다. 2 if (longground_fall[1]/longground_fall[0]-1)*100 > 0 && (longground_fall[1]/longground_fall[0]-1)*100 < 4 Then crack = 1 ; 조건이 만족하면 1아니면 0과 같이 값을 지정해 주셔야 합니다. 변수 선언시에 지정하는 값은 최초값일뿐입니다. 매봉 해당 값으로 초기화가 되는 것은 아니므로 조건만족하면 1, 만족하지 않으면 0이 변수에 할당되게 하셔야 합니다. 3 수식을 아래와 같이 수정해 드립니다. 종목검색시에 속성에서 검색에 필요한 최소기간에 500봉 지정하고 검색하시기 바랍니다. SwingLow가 발생할때마다 현재값은 longground, 직전값은 longground1에 저장되고 현재 발생값과 이전 발생값을 비교해서 몇번연속 하락인지 판단합니다. 수식내용에서 불필요한 값계산은 제외했습니다. input : 검색봉수(5); Var : long_period(20); var : longground(0),longground1(0),longground_fall_cnt(0); var : 검색여부(0),crack(0); #swinglow발생 if SwingLow(1, L, long_period,long_period,long_period*2+1) != -1 Then { #swinglow값 저장 longground = L[long_period]; #직전 #swinglow값 longground1 = longground[1]; #현재값이 직전값보다 작으면 #longground_fall_cnt 변수 1씩 증가 아니면 0 if longground < longground1 and longground1 > 0 Then longground_fall_cnt = longground_fall_cnt+1; Else longground_fall_cnt = 0; } #조건만족하면1, 아니면 0 if (longground1/longground-1)*100 > 0 && (longground1/longground-1)*100 < 4 Then crack = 1 ; Else crack = 0 ; #조건만족하면1, 아니면 0 if longground_fall_cnt > 2 && crack > 0 Then 검색여부 = 1; Else 검색여부 = 0; #최근 5개봉에 검색여부가 1보다 큰 봉이 1개이상 if countif(검색여부 > 0, 검색봉수) > 0 then find(1) ; 즐거운 하루되세요 > 미시타이 님이 쓴 글입니다. > 제목 : 문의드립니다. > Var : long_resi(0), long_ground(0), long_period(20); if SwingHigh(1,H, long_period,long_period,long_period*2+1) != -1 Then long_resi = H[long_period]; if SwingLow(1, L, long_period,long_period,long_period*2+1) != -1 Then long_ground = L[long_period]; var : cnt(0),longground_fall_cnt(0),cnt_1(0) ; array : longground_fall[10](0) ; for cnt = 0 to 9 { longground_fall[cnt] = SwingLow(cnt+1, L, long_period,long_period,long_period*30) ; } cnt_1 = 0 ; While longground_fall[cnt_1] < longground_fall[cnt_1+1] { cnt_1 = cnt_1 +1 ; } longground_fall_cnt = cnt_1 ; var : crack(0) ; if (longground_fall[1]/longground_fall[0]-1)*100 > 0 && (longground_fall[1]/longground_fall[0]-1)*100 < 4 Then crack = 1 ; Else crack = 0 ; if longground_fall_cnt > 2 && crack > 0 Then Plot1(l*0.95 , "조건만족") ; 위의 신호검색을 종목검색으로 변환시 var : 검색여부(0) ; if longground_fall_cnt > 2 && crack > 0 Then 검색여부 = 1; if countif(검색여부 > 0, 검색봉수) > 0 then find(1) ; 이렇게 검색하면 '데이터가 존재하지 않습니다.'라고 하는데 무엇이 잘못되었을까요?? 고견 부탁드립니다. 그리고 미리 감사드립니다.!!