커뮤니티

알파계수 얼마이상 종목 검색하기

프로필 이미지
돈크돈어
2013-04-26 13:26:39
321
글번호 62528
답변완료
Input:Length(60); Var:j(0),x1(0),x2(0),∑x1(0),∑xx1(0),∑x2(0),∑xx2(0); If LastBarOnChart == 1 Then { Print("알파종목검색.txt","# 검색기준일 : %.0f-%.0f-%.0f",Int(Date/10000),int(Date/100)-int(Date/10000)*100,Date - int(Date/100)*100); Print("알파종목검색.txt","Input:inAlpha(0.5),inVol(10000),inPrc(1000);"); Print("알파종목검색.txt","Var:j(0),value(0),n(%.0f),y(0),Alpha(0),∑x1(0),∑xx1(0),∑x2(0),∑xx2(0),∑y(0),∑xy(0);",Length); Print("알파종목검색.txt","Array:x1[%.0f](0),x2[%.0f](0);",Length,Length); ∑x1 = accumN((C - C[1])*100/C[1],Length); ∑xx1 = accumN(((C - C[1])*100/C[1])^2,Length); For j = 0 To Length - 1 { x1 = (C[j] - C[j+1])*100/C[j+1]; Print("알파종목검색.txt","x1[%.0f] = %.6f;",j,X1); } Print("알파종목검색.txt","∑x1 = %.6f;",∑x1); Print("알파종목검색.txt","∑xx1 = %.6f;",∑xx1); ∑x2 = accumN((data2(C) - data2(C[1]))*100/data2(C[1]),Length); ∑xx2 = accumN(((data2(C) - data2(C[1]))*100/data2(C[1]))^2,Length); For j = 0 To Length - 1 { x2 = (data2(C[j]) - data2(C[j+1]))*100/data2(C[j+1]); Print("알파종목검색.txt","x2[%.0f] = %.6f;",j,X2); } Print("알파종목검색.txt","∑x2 = %.6f;",∑x2); Print("알파종목검색.txt","∑xx2 = %.6f;",∑xx2); Print("알파종목검색.txt","value = 0;"); Print("알파종목검색.txt","∑y = 0;"); Print("알파종목검색.txt","∑xy = 0;"); Print("알파종목검색.txt","If CodeCategoryEx()==11 || CodeCategoryEx()==12 then {"); Print("알파종목검색.txt"," ∑y = accumN((C - C[1])*100/C[1],n);"); Print("알파종목검색.txt"," For j = 0 To n - 1 {"); Print("알파종목검색.txt"," y = (C[j] - C[j+1])*100/C[j+1];"); Print("알파종목검색.txt"," ∑xy = ∑xy + y*iff(CodeCategoryEx()==12,X2[j],X1[j]); }"); Print("알파종목검색.txt"," If CodeCategoryEx()==11 Then"); Print("알파종목검색.txt"," Alpha = ∑y/n - (∑xy/n - ((∑x1/n) * (∑y/n))) / ((∑xx1/n) - ((∑x1/n)^2)) * (∑x1/n);"); Print("알파종목검색.txt"," Else"); Print("알파종목검색.txt"," Alpha = ∑y/n - (∑xy/n - ((∑x2/n) * (∑y/n))) / ((∑xx2/n) - ((∑x2/n)^2)) * (∑x2/n);"); Print("알파종목검색.txt"," If Alpha >= inAlpha && ma(V,60) > inVol &&"); Print("알파종목검색.txt"," ma(C,60) > inPrc && C < 20 * inPrc Then"); Print("알파종목검색.txt"," value = AlPha;"); Print("알파종목검색.txt","}"); Print("알파종목검색.txt","Find(value);"); 위의 첫번째 수식을 yeslanguage에서 붙여넣기후 검증완료후에 지표식이 나왔는데 지표를 차트에 적용하니 "수식에서 참조할 첫번째 종목데이터가 없습니다" 나오고 차트에 지표가 안 나오네요 어떻게 해야 하나요? 알려주시면 감사하겠습니다
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2013-04-29 13:12:00

안녕하세요 예스스탁입니다. 해당식 참조데이터가 필요로 합니다. 내용상으로 주종목이 kospi종목이면 KP종합지수를 코스탁 KQ종합지수를 차트에 추가하신 후에 해당 지표식을 적용하셔야 합니다. 참조데이터는 차트왼쪽 상단의 종목선택 버튼 중 오른쪽으로 누르시면 선택해서 추가하실 수 있습니다. 즐거운 하루되세요 > 돈크돈어 님이 쓴 글입니다. > 제목 : 알파계수 얼마이상 종목 검색하기 > Input:Length(60); Var:j(0),x1(0),x2(0),∑x1(0),∑xx1(0),∑x2(0),∑xx2(0); If LastBarOnChart == 1 Then { Print("알파종목검색.txt","# 검색기준일 : %.0f-%.0f-%.0f",Int(Date/10000),int(Date/100)-int(Date/10000)*100,Date - int(Date/100)*100); Print("알파종목검색.txt","Input:inAlpha(0.5),inVol(10000),inPrc(1000);"); Print("알파종목검색.txt","Var:j(0),value(0),n(%.0f),y(0),Alpha(0),∑x1(0),∑xx1(0),∑x2(0),∑xx2(0),∑y(0),∑xy(0);",Length); Print("알파종목검색.txt","Array:x1[%.0f](0),x2[%.0f](0);",Length,Length); ∑x1 = accumN((C - C[1])*100/C[1],Length); ∑xx1 = accumN(((C - C[1])*100/C[1])^2,Length); For j = 0 To Length - 1 { x1 = (C[j] - C[j+1])*100/C[j+1]; Print("알파종목검색.txt","x1[%.0f] = %.6f;",j,X1); } Print("알파종목검색.txt","∑x1 = %.6f;",∑x1); Print("알파종목검색.txt","∑xx1 = %.6f;",∑xx1); ∑x2 = accumN((data2(C) - data2(C[1]))*100/data2(C[1]),Length); ∑xx2 = accumN(((data2(C) - data2(C[1]))*100/data2(C[1]))^2,Length); For j = 0 To Length - 1 { x2 = (data2(C[j]) - data2(C[j+1]))*100/data2(C[j+1]); Print("알파종목검색.txt","x2[%.0f] = %.6f;",j,X2); } Print("알파종목검색.txt","∑x2 = %.6f;",∑x2); Print("알파종목검색.txt","∑xx2 = %.6f;",∑xx2); Print("알파종목검색.txt","value = 0;"); Print("알파종목검색.txt","∑y = 0;"); Print("알파종목검색.txt","∑xy = 0;"); Print("알파종목검색.txt","If CodeCategoryEx()==11 || CodeCategoryEx()==12 then {"); Print("알파종목검색.txt"," ∑y = accumN((C - C[1])*100/C[1],n);"); Print("알파종목검색.txt"," For j = 0 To n - 1 {"); Print("알파종목검색.txt"," y = (C[j] - C[j+1])*100/C[j+1];"); Print("알파종목검색.txt"," ∑xy = ∑xy + y*iff(CodeCategoryEx()==12,X2[j],X1[j]); }"); Print("알파종목검색.txt"," If CodeCategoryEx()==11 Then"); Print("알파종목검색.txt"," Alpha = ∑y/n - (∑xy/n - ((∑x1/n) * (∑y/n))) / ((∑xx1/n) - ((∑x1/n)^2)) * (∑x1/n);"); Print("알파종목검색.txt"," Else"); Print("알파종목검색.txt"," Alpha = ∑y/n - (∑xy/n - ((∑x2/n) * (∑y/n))) / ((∑xx2/n) - ((∑x2/n)^2)) * (∑x2/n);"); Print("알파종목검색.txt"," If Alpha >= inAlpha && ma(V,60) > inVol &&"); Print("알파종목검색.txt"," ma(C,60) > inPrc && C < 20 * inPrc Then"); Print("알파종목검색.txt"," value = AlPha;"); Print("알파종목검색.txt","}"); Print("알파종목검색.txt","Find(value);"); 위의 첫번째 수식을 yeslanguage에서 붙여넣기후 검증완료후에 지표식이 나왔는데 지표를 차트에 적용하니 "수식에서 참조할 첫번째 종목데이터가 없습니다" 나오고 차트에 지표가 안 나오네요 어떻게 해야 하나요? 알려주시면 감사하겠습니다