커뮤니티
문의드립니다
2013-05-22 16:21:24
246
글번호 63492
사용자함수 문의드립니다.
input : Period(Numeric);
Var : cnt(0),Nth(0),tempmax(0), tempindex(0), X1(0),RCI1(0);
Array : VALUE1[50](0),NTHVALUE[50](0);
for cnt = 0 to 49{
VALUE1[cnt] = C[cnt];
}
For Nth = 0 to Period-1 {
tempmax = -99999999;
For cnt = 0 to Period-1{
if VALUE1[cnt] > tempmax then{
tempmax = VALUE1[cnt];
tempIndex = cnt;
NTHVALUE[cnt] = Nth+1;
}
}
VALUE1[tempIndex] = -99999999;
}
X1 = 0;
for cnt = 0 to period-1{
X1 = X1+abs((cnt+1)-NTHVALUE[cnt])^2;
}
RCI = (1-(6*X1)/(period*(period^2-1)))*100;
변수값을 C 가 아닌 (C+H+L)/3 로 수정부탁드립니다.
답변 1
예스스탁 예스스탁 답변
2013-05-23 10:21:09
안녕하세요
예스스탁입니다.
input : Period(Numeric);
Var : cnt(0),Nth(0),tempmax(0), tempindex(0), X1(0),RCI1(0);
Array : VALUE1[50](0),NTHVALUE[50](0);
var1 = (C+H+L)/3;
for cnt = 0 to 49{
VALUE1[cnt] = var1[cnt];
}
For Nth = 0 to Period-1 {
tempmax = -99999999;
For cnt = 0 to Period-1{
if VALUE1[cnt] > tempmax then{
tempmax = VALUE1[cnt];
tempIndex = cnt;
NTHVALUE[cnt] = Nth+1;
}
}
VALUE1[tempIndex] = -99999999;
}
X1 = 0;
for cnt = 0 to period-1{
X1 = X1+abs((cnt+1)-NTHVALUE[cnt])^2;
}
RCI = (1-(6*X1)/(period*(period^2-1)))*100;
즐거운 하루되세요
> 뉴스타트 님이 쓴 글입니다.
> 제목 : 문의드립니다
> 사용자함수 문의드립니다.
input : Period(Numeric);
Var : cnt(0),Nth(0),tempmax(0), tempindex(0), X1(0),RCI1(0);
Array : VALUE1[50](0),NTHVALUE[50](0);
for cnt = 0 to 49{
VALUE1[cnt] = C[cnt];
}
For Nth = 0 to Period-1 {
tempmax = -99999999;
For cnt = 0 to Period-1{
if VALUE1[cnt] > tempmax then{
tempmax = VALUE1[cnt];
tempIndex = cnt;
NTHVALUE[cnt] = Nth+1;
}
}
VALUE1[tempIndex] = -99999999;
}
X1 = 0;
for cnt = 0 to period-1{
X1 = X1+abs((cnt+1)-NTHVALUE[cnt])^2;
}
RCI = (1-(6*X1)/(period*(period^2-1)))*100;
변수값을 C 가 아닌 (C+H+L)/3 로 수정부탁드립니다.