커뮤니티

봉패턴 검색식 문의

프로필 이미지
지금여기
2011-08-17 09:58:24
609
글번호 41958
답변완료
도지형 망치형 장악형 관통형 패턴을 'or' 조건으로 검색하고 싶은데, 'if ~ ' 구문에서 오류가 뜨네요. 도움 부탁 드립니다 ================================================================================= inputs : Percent(50); Vars : Uptail(0), DnTail(0), Height(0), Body(0), Highbody(0), Lowbody(0), Long(false), value(0),condition1(false), condition2(false),condition3(false),condition4(false); UpTail = H-Max(C,O); DnTail = Min(C,O)-L; Height = H-L; Body = Abs(C-O); Highbody = MaxList(O,C) ; Lowbody = MinList(O,C) ; Long = Abs(O-C) > Average(Abs(O-C),10)*2 if Abs(O-C) <= (H-L) * Percent*0.01 or (C == O and H > C and L < C) then Condition1 = true; #도지 if Uptail < Height*0.1 and Dntail > Body*2 and C != O then Condition2 = true ; #망치형 if C[1] < O[1] and C > O and Highbody > Highbody[1] and Lowbody < Lowbody[1] Then Condition3 =true; #장악형 If C[1] < O[1] and Long[1] == True and C > O and Long and O < L[1] and C >= (O[1]+C[1])/2 and C < O[1] then Condition4 = true ; #관통형 if condition1 == true or condition2 == true or condition3 == true or condition4 == true Then Find(1); ================================================================================= 감사합니다
검색
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2011-08-17 11:00:15

안녕하세요 예스스탁입니다. Long = Abs(O-C) > Average(Abs(O-C),10)*2 뒤에 ;가 빠졌습니다. 아래는 수정한 식입니다. inputs : Percent(50); Vars : Uptail(0), DnTail(0), Height(0), Body(0), Highbody(0), Lowbody(0), Long(false), value(0),condition1(false), condition2(false),condition3(false),condition4(false); UpTail = H-Max(C,O); DnTail = Min(C,O)-L; Height = H-L; Body = Abs(C-O); Highbody = MaxList(O,C) ; Lowbody = MinList(O,C) ; Long = Abs(O-C) > Average(Abs(O-C),10)*2; if Abs(O-C) <= (H-L) * Percent*0.01 or (C == O and H > C and L < C) then Condition1 = true; #도지 if Uptail < Height*0.1 and Dntail > Body*2 and C != O then Condition2 = true ; #망치형 if C[1] < O[1] and C > O and Highbody > Highbody[1] and Lowbody < Lowbody[1] Then Condition3 =true; #장악형 If C[1] < O[1] and Long[1] == True and C > O and Long and O < L[1] and C >= (O[1]+C[1])/2 and C < O[1] then Condition4 = true ; #관통형 if condition1 == true or condition2 == true or condition3 == true or condition4 == true Then Find(1); 즐거운 하루되세요 > 지금여기 님이 쓴 글입니다. > 제목 : 봉패턴 검색식 문의 > 도지형 망치형 장악형 관통형 패턴을 'or' 조건으로 검색하고 싶은데, 'if ~ ' 구문에서 오류가 뜨네요. 도움 부탁 드립니다 ================================================================================= inputs : Percent(50); Vars : Uptail(0), DnTail(0), Height(0), Body(0), Highbody(0), Lowbody(0), Long(false), value(0),condition1(false), condition2(false),condition3(false),condition4(false); UpTail = H-Max(C,O); DnTail = Min(C,O)-L; Height = H-L; Body = Abs(C-O); Highbody = MaxList(O,C) ; Lowbody = MinList(O,C) ; Long = Abs(O-C) > Average(Abs(O-C),10)*2 if Abs(O-C) <= (H-L) * Percent*0.01 or (C == O and H > C and L < C) then Condition1 = true; #도지 if Uptail < Height*0.1 and Dntail > Body*2 and C != O then Condition2 = true ; #망치형 if C[1] < O[1] and C > O and Highbody > Highbody[1] and Lowbody < Lowbody[1] Then Condition3 =true; #장악형 If C[1] < O[1] and Long[1] == True and C > O and Long and O < L[1] and C >= (O[1]+C[1])/2 and C < O[1] then Condition4 = true ; #관통형 if condition1 == true or condition2 == true or condition3 == true or condition4 == true Then Find(1); ================================================================================= 감사합니다