커뮤니티

당일지표부탁드립니다.

프로필 이미지
외국인
2014-02-07 14:26:27
205
글번호 72318
답변완료
input : Period1(5),Period2(10),Period3(20),Period4(60),P1(5),P2(10),P3(20),P4(60); Var : cnt(0),Nth(0); var : tempmax1(0), tempindex1(0), X1(0),RCI1(0),ma1(0); var : tempmax2(0), tempindex2(0), X2(0),RCI2(0),ma2(0); var : tempmax3(0), tempindex3(0), X3(0),RCI3(0),ma3(0); var : tempmax4(0), tempindex4(0), X4(0),RCI4(0),ma4(0); Array : VALUE1[100](0),NTHVALUE1[100](0); Array : VALUE2[100](0),NTHVALUE2[100](0); Array : VALUE3[100](0),NTHVALUE3[100](0); Array : VALUE4[100](0),NTHVALUE4[100](0); var1 = MACD(12,26); for cnt = 0 to 99{ VALUE1[cnt] = var1[cnt]; VALUE2[cnt] = var1[cnt]; VALUE3[cnt] = var1[cnt]; VALUE4[cnt] = var1[cnt]; } For Nth = 0 to Period1-1 { tempmax1 = -99999999; For cnt = 0 to Period1-1{ if VALUE1[cnt] > tempmax1 then{ tempmax1 = VALUE1[cnt]; tempIndex1 = cnt; NTHVALUE1[cnt] = Nth+1; } } VALUE1[tempIndex1] = -99999999; } X1 = 0; for cnt = 0 to period1-1{ X1 = X1+abs((cnt+1)-NTHVALUE1[cnt])^2; } RCI1 = (1-(6*X1)/(period1*(period1^2-1)))*100; For Nth = 0 to Period2-1 { tempmax2 = -99999999; For cnt = 0 to Period2-1{ if VALUE2[cnt] > tempmax2 then{ tempmax2 = VALUE2[cnt]; tempIndex2 = cnt; NTHVALUE2[cnt] = Nth+1; } } VALUE2[tempIndex2] = -99999999; } X2 = 0; for cnt = 0 to period2-1{ X2 = X2+abs((cnt+1)-NTHVALUE2[cnt])^2; } RCI2 = (1-(6*X2)/(period2*(period2^2-1)))*100; For Nth = 0 to Period3-1 { tempmax3 = -99999999; For cnt = 0 to Period3-1{ if VALUE3[cnt] > tempmax3 then{ tempmax3 = VALUE3[cnt]; tempIndex3 = cnt; NTHVALUE3[cnt] = Nth+1; } } VALUE3[tempIndex3] = -99999999; } X3 = 0; for cnt = 0 to period3-1{ X3 = X3+abs((cnt+1)-NTHVALUE3[cnt])^2; } RCI3 = (1-(6*X3)/(period3*(period3^2-1)))*100; For Nth = 0 to Period4-1 { tempmax4 = -99999999; For cnt = 0 to Period4-1{ if VALUE4[cnt] > tempmax4 then{ tempmax4 = VALUE4[cnt]; tempIndex4 = cnt; NTHVALUE4[cnt] = Nth+1; } } VALUE4[tempIndex4] = -99999999; } X4 = 0; for cnt = 0 to period4-1{ X4 = X4+abs((cnt+1)-NTHVALUE4[cnt])^2; } RCI4 = (1-(6*X4)/(period4*(period4^2-1)))*100; ma1 = ma(RCI1,P1); ma2 = ma(RCI2,P2); ma3 = ma(RCI3,P3); ma4 = ma(RCI4,P4); plot1(RCI1); plot2(RCI2); plot3(RCI3); plot4(RCI4); plot5(ma1); plot6(ma2); plot7(ma3); plot8(ma4);
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2014-02-07 17:29:51

안녕하세요 예스스탁입니다. input : Period1(5),Period2(10),Period3(20),Period4(60),P1(5),P2(10),P3(20),P4(60); Input : short(12),long(26); Var : cnt(0),Nth(0),idx(0); var : tempmax1(0), tempindex1(0), X1(0),RCI1(0),ma1(0); var : tempmax2(0), tempindex2(0), X2(0),RCI2(0),ma2(0); var : tempmax3(0), tempindex3(0), X3(0),RCI3(0),ma3(0); var : tempmax4(0), tempindex4(0), X4(0),RCI4(0),ma4(0); Var : Ep1(0),EP2(0),JISU1(0),JISU2(0); Array : VALUE1[100](0),NTHVALUE1[100](0); Array : VALUE2[100](0),NTHVALUE2[100](0); Array : VALUE3[100](0),NTHVALUE3[100](0); Array : VALUE4[100](0),NTHVALUE4[100](0); Ep1 = 2/(short+1); Ep2 = 2/(long+1); if dayindex == 0 then{ idx = 0; JISU1 = C; JISU2 = C; var1 = Jisu1-jisu2; } else{ JISU1 = C * EP1 + JISU1[1] * (1-EP1); JISU2 = C * EP2 + JISU2[1] * (1-EP2); var1 = Jisu1-jisu2; } idx = idx+1; for cnt = 0 to 99{ VALUE1[cnt] = var1[cnt]; VALUE2[cnt] = var1[cnt]; VALUE3[cnt] = var1[cnt]; VALUE4[cnt] = var1[cnt]; } For Nth = 0 to min(Period1-1,idx-1) { tempmax1 = -99999999; For cnt = 0 to min(Period1-1,idx-1){ if VALUE1[cnt] > tempmax1 then{ tempmax1 = VALUE1[cnt]; tempIndex1 = cnt; NTHVALUE1[cnt] = Nth+1; } } VALUE1[tempIndex1] = -99999999; } X1 = 0; for cnt = 0 to min(Period1-1,idx-1){ X1 = X1+abs((cnt+1)-NTHVALUE1[cnt])^2; } RCI1 = (1-(6*X1)/(min(Period1,idx-1)*(min(Period1,idx-1)^2-1)))*100; For Nth = 0 to min(Period2-1,idx-1) { tempmax2 = -99999999; For cnt = 0 to min(Period2-1,idx-1){ if VALUE2[cnt] > tempmax2 then{ tempmax2 = VALUE2[cnt]; tempIndex2 = cnt; NTHVALUE2[cnt] = Nth+1; } } VALUE2[tempIndex2] = -99999999; } X2 = 0; for cnt = 0 to min(Period2-1,idx-1){ X2 = X2+abs((cnt+1)-NTHVALUE2[cnt])^2; } RCI2 = (1-(6*X2)/(min(Period2,idx-1)*(min(Period2,idx-1)^2-1)))*100; For Nth = 0 to min(Period3-1,idx-1) { tempmax3 = -99999999; For cnt = 0 to min(Period3-1,idx-1) { if VALUE3[cnt] > tempmax3 then{ tempmax3 = VALUE3[cnt]; tempIndex3 = cnt; NTHVALUE3[cnt] = Nth+1; } } VALUE3[tempIndex3] = -99999999; } X3 = 0; for cnt = 0 to min(Period3-1,idx-1) { X3 = X3+abs((cnt+1)-NTHVALUE3[cnt])^2; } RCI3 = (1-(6*X3)/(min(Period3,idx-1) *(min(Period3,idx-1) ^2-1)))*100; For Nth = 0 to min(Period4-1,idx-1) { tempmax4 = -99999999; For cnt = 0 to min(Period4-1,idx-1){ if VALUE4[cnt] > tempmax4 then{ tempmax4 = VALUE4[cnt]; tempIndex4 = cnt; NTHVALUE4[cnt] = Nth+1; } } VALUE4[tempIndex4] = -99999999; } X4 = 0; for cnt = 0 to min(Period4-1,idx-1){ X4 = X4+abs((cnt+1)-NTHVALUE4[cnt])^2; } RCI4 = (1-(6*X4)/(min(Period4,idx-1)*(min(Period4,idx-1)^2-1)))*100; ma1 = ma(RCI1,min(dayindex+1,P1)); ma2 = ma(RCI2,min(dayindex+1,P2)); ma3 = ma(RCI3,min(dayindex+1,P3)); ma4 = ma(RCI4,min(dayindex+1,P4)); plot1(RCI1); plot2(RCI2); plot3(RCI3); plot4(RCI4); plot5(ma1); plot6(ma2); plot7(ma3); plot8(ma4); 즐거운 하루되세요 > 외국인 님이 쓴 글입니다. > 제목 : 당일지표부탁드립니다. > input : Period1(5),Period2(10),Period3(20),Period4(60),P1(5),P2(10),P3(20),P4(60); Var : cnt(0),Nth(0); var : tempmax1(0), tempindex1(0), X1(0),RCI1(0),ma1(0); var : tempmax2(0), tempindex2(0), X2(0),RCI2(0),ma2(0); var : tempmax3(0), tempindex3(0), X3(0),RCI3(0),ma3(0); var : tempmax4(0), tempindex4(0), X4(0),RCI4(0),ma4(0); Array : VALUE1[100](0),NTHVALUE1[100](0); Array : VALUE2[100](0),NTHVALUE2[100](0); Array : VALUE3[100](0),NTHVALUE3[100](0); Array : VALUE4[100](0),NTHVALUE4[100](0); var1 = MACD(12,26); for cnt = 0 to 99{ VALUE1[cnt] = var1[cnt]; VALUE2[cnt] = var1[cnt]; VALUE3[cnt] = var1[cnt]; VALUE4[cnt] = var1[cnt]; } For Nth = 0 to Period1-1 { tempmax1 = -99999999; For cnt = 0 to Period1-1{ if VALUE1[cnt] > tempmax1 then{ tempmax1 = VALUE1[cnt]; tempIndex1 = cnt; NTHVALUE1[cnt] = Nth+1; } } VALUE1[tempIndex1] = -99999999; } X1 = 0; for cnt = 0 to period1-1{ X1 = X1+abs((cnt+1)-NTHVALUE1[cnt])^2; } RCI1 = (1-(6*X1)/(period1*(period1^2-1)))*100; For Nth = 0 to Period2-1 { tempmax2 = -99999999; For cnt = 0 to Period2-1{ if VALUE2[cnt] > tempmax2 then{ tempmax2 = VALUE2[cnt]; tempIndex2 = cnt; NTHVALUE2[cnt] = Nth+1; } } VALUE2[tempIndex2] = -99999999; } X2 = 0; for cnt = 0 to period2-1{ X2 = X2+abs((cnt+1)-NTHVALUE2[cnt])^2; } RCI2 = (1-(6*X2)/(period2*(period2^2-1)))*100; For Nth = 0 to Period3-1 { tempmax3 = -99999999; For cnt = 0 to Period3-1{ if VALUE3[cnt] > tempmax3 then{ tempmax3 = VALUE3[cnt]; tempIndex3 = cnt; NTHVALUE3[cnt] = Nth+1; } } VALUE3[tempIndex3] = -99999999; } X3 = 0; for cnt = 0 to period3-1{ X3 = X3+abs((cnt+1)-NTHVALUE3[cnt])^2; } RCI3 = (1-(6*X3)/(period3*(period3^2-1)))*100; For Nth = 0 to Period4-1 { tempmax4 = -99999999; For cnt = 0 to Period4-1{ if VALUE4[cnt] > tempmax4 then{ tempmax4 = VALUE4[cnt]; tempIndex4 = cnt; NTHVALUE4[cnt] = Nth+1; } } VALUE4[tempIndex4] = -99999999; } X4 = 0; for cnt = 0 to period4-1{ X4 = X4+abs((cnt+1)-NTHVALUE4[cnt])^2; } RCI4 = (1-(6*X4)/(period4*(period4^2-1)))*100; ma1 = ma(RCI1,P1); ma2 = ma(RCI2,P2); ma3 = ma(RCI3,P3); ma4 = ma(RCI4,P4); plot1(RCI1); plot2(RCI2); plot3(RCI3); plot4(RCI4); plot5(ma1); plot6(ma2); plot7(ma3); plot8(ma4);