커뮤니티

질문입니다.

프로필 이미지
회원
2013-10-01 11:31:23
100
글번호 67988
답변완료
1.value11,value12,value13은 모두 특정시점의 index를 갖고 있습니다. value11의 index로부터 20봉초과 경과하고 value12 index로부터 10봉초과 경과하고 value13의 index로부터 5봉초과 경과시점을 모두 만족하는 최초의 index를 value14로 지정한다는 수식이 아래의 수식이 맞는지요? 수정부탁드립니다. if value11>0 and value12>0 and value13>0 and (index-value11)>20 and (index-value12)>10 and (index-value13)>5 Then{ value14=index;}
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2013-10-01 16:15:41

안녕하세요 예스스탁입니다. 현재작성한 식은 지정된 봉수 이후에 계속 value14에 인덱스가 저장되므로 최후에 만족한 봉번호가 됩니다. 3개의 인덱스에 대한 조건이 충족하고 최초이므로 최초임을 확인하는 변수가 있어야 합니다. 아래식은 value11,value12,value13에 index가 새롭게 저장이 되면 condition1을 false로 초기화하고 이후에 처음 조건이 만족할때 condition1을 true로 만들어 처음 조건 만족할때만 value14에 저장합니다. 수식안에서 구현하는 내용에 따라 초기화 시점을 지정하셔야 합니다. if 조건1 then{ value11 = index; condition1 = false; } if 조건2 then{ value12 = index; condition1 = false; } if 조건3 then{ value13 = index; condition1 = false; } if Condition1 == false Then value11>0 and value12>0 and value13>0 and (index-value11)>20 and (index-value12)>10 and (index-value13)>5 Then{ value14=index; Condition1 = true; } 즐거운 하루되세요 > HI_JA****** 님이 쓴 글입니다. > 제목 : 질문입니다. > 1.value11,value12,value13은 모두 특정시점의 index를 갖고 있습니다. value11의 index로부터 20봉초과 경과하고 value12 index로부터 10봉초과 경과하고 value13의 index로부터 5봉초과 경과시점을 모두 만족하는 최초의 index를 value14로 지정한다는 수식이 아래의 수식이 맞는지요? 수정부탁드립니다. if value11>0 and value12>0 and value13>0 and (index-value11)>20 and (index-value12)>10 and (index-value13)>5 Then{ value14=index;}