커뮤니티

부탁 드립니다.

프로필 이미지
yes
2017-10-17 12:20:11
149
글번호 113414
답변완료
도움주심에 감사 드립니다. 아래수식을 예를들어 100틱차트에서 200틱 차트의 지표를 나타 내고 싶습니다. input : Period(Numeric); Var : cnt(0),Nth(0),tempmax(0), tempindex(0), X1(0),RCI1(0); Array : VALUE1[40](0),NTHVALUE[40](0); for cnt = 0 to 39{ 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;
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2017-10-17 16:15:08

안녕하세요 예스스탁입니다. input : Period(Numeric); Var : cnt(0),Nth(0),tempmax(0), tempindex(0), X1(0),RCI1(0); Array : VALUE1[40](0),NTHVALUE[40](0),CC[100](0); var : idx1(0),TF(0); if Bdate != Bdate[1] Then idx1 = 0; Else idx1 = idx1+1; TF = idx1%2; if Bdate != Bdate[1] or (Bdate == Bdate[1] and TF < TF[1]) Then { for cnt = 1 to 99 { CC[cnt] = CC[cnt-1][1]; } } CC[0] = C; for cnt = 0 to 39{ VALUE1[cnt] = CC[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; 즐거운 하루되세요 > yes 님이 쓴 글입니다. > 제목 : 부탁 드립니다. > 도움주심에 감사 드립니다. 아래수식을 예를들어 100틱차트에서 200틱 차트의 지표를 나타 내고 싶습니다. input : Period(Numeric); Var : cnt(0),Nth(0),tempmax(0), tempindex(0), X1(0),RCI1(0); Array : VALUE1[40](0),NTHVALUE[40](0); for cnt = 0 to 39{ 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;