커뮤니티

수식 부탁합니다.

프로필 이미지
하리마우
2019-06-03 17:38:21
279
글번호 129157
답변완료
지표식 1. 최근 상한가가 발생한 봉을 기준 : 우측으로 수평선을 긋고 상단에 가격을 표시 2. 상한가가 발생한 봉 전체를 위 1과 같이 표시 시스템식 위 1의 지표식을 기준으로 돌파시 매수, 이탈시 매도 종목검색식 위 시스템식에서 매수가 발생된 종목을 검색 미리 감사드리고 항상 건강하시길 기원합니다^^
지표
답변 2
프로필 이미지

예스스탁 예스스탁 답변

2019-06-04 10:17:05

안녕하세요 예스스탁입니다. 수식에서 갯수를 랜덤하게 가져갈수 없습니다. 최근 100개를 저장해 이용하게 작성해 드립니다. 1 지표 var : 상한가(0), UpLimit(0),cnt(0),count(0); var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),Up7(0),TL(0); Array : upv[100](0),TX[100](0); if date >= 19981207 then { if date < 20050328 && CodeCategory() == 2 then UpLimit = (BP[0] * 1.12); Else if date >= 20050328 and date < 20150615 Then UpLimit = (BP[0] * 1.15); Else UpLimit = (BP[0] * 1.30); if CodeCategory() == 2 then { if date >= 20030721 then { up1 = int(UpLimit/100+0.00001)*100; up2 = int(UpLimit/100+0.00001)*100; up3 = int(UpLimit/100+0.00001)*100; up4 = int(UpLimit/50+0.00001)*50; up5 = int(UpLimit/10+0.00001)*10; up6 = int(UpLimit/5+0.00001)*5; up7 = int(UpLimit/1+0.00001)*1; } else { up1 = int(UpLimit/1000+0.00001)*1000; up2 = int(UpLimit/500+0.00001)*500; up3 = int(UpLimit/100+0.00001)*100; up4 = int(UpLimit/50+0.00001)*50; up5 = int(UpLimit/10+0.00001)*10; up6 = int(UpLimit/10+0.00001)*10; up7 = int(UpLimit/1+0.00001)*1; } } Else { up1 = int(UpLimit/1000+0.00001)*1000; up2 = int(UpLimit/500+0.00001)*500; up3 = int(UpLimit/100+0.00001)*100; up4 = int(UpLimit/50+0.00001)*50; up5 = int(UpLimit/10+0.00001)*10; up6 = int(UpLimit/5+0.00001)*5; up7 = int(UpLimit/1+0.00001)*1; } if CodeCategory() == 1 || CodeCategory() == 2 then { if sdate < 20101004 Then { If BP >= 500000 Then 상한가 = up1; Else If BP >= 100000 Then 상한가 = iff(up2>=500000, up1, up2); Else If BP >= 50000 Then 상한가 = iff(up3>=100000, up2, up3); Else If BP >= 10000 Then 상한가 = iff(up4>=50000, up3, up4); Else If BP >= 5000 Then 상한가 = iff(up5>=10000, up4, up5); Else If BP >= 1000 Then 상한가 = iff(up5>=5000, up5, up6); Else 상한가 = iff(up6>=1000, up6, up6); } Else { If BP >= 500000 Then 상한가 = up1; Else If BP >= 100000 Then 상한가 = iff(up2>=500000, up1, up2); Else If BP >= 50000 Then 상한가 = iff(up3>=100000, up2, up3); Else If BP >= 10000 Then 상한가 = iff(up4>=50000, up3, up4); Else If BP >= 5000 Then 상한가 = iff(up5>=10000, up4, up5); Else If BP >= 1000 Then 상한가 = iff(up5>=5000, up5, up6); Else 상한가 = iff(up6>=1000, up6, up7); } } else if CodeCategory() == 8 || CodeCategory() == 9 then { // ETF 상한가 = up6; } } if H >= 상한가 Then { upv[0] = H[0]; count = count+1; TL = TL_New(sdate[1],stime[1],upv[0],sdate,stime,upv[0]); TL_SetExtRight(TL,true); tx[0] = Text_New(sdate,stime,upv[0],NumToStr(upv[0],0)); for cnt = 1 to 99 { upv[cnt] = upv[cnt-1][1]; tx[cnt] = tx[cnt-1][1]; } } for cnt = 0 to count-1 { if upv[cnt] > 0 then { Text_SetLocation(TX[cnt],sdate,stime,upv[cnt]); } } 2 시스템 var : 상한가(0), UpLimit(0),cnt(0),count(0); var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),Up7(0),TL(0); Array : upv[100](0),TX[100](0); if date >= 19981207 then { if date < 20050328 && CodeCategory() == 2 then UpLimit = (BP[0] * 1.12); Else if date >= 20050328 and date < 20150615 Then UpLimit = (BP[0] * 1.15); Else UpLimit = (BP[0] * 1.30); if CodeCategory() == 2 then { if date >= 20030721 then { up1 = int(UpLimit/100+0.00001)*100; up2 = int(UpLimit/100+0.00001)*100; up3 = int(UpLimit/100+0.00001)*100; up4 = int(UpLimit/50+0.00001)*50; up5 = int(UpLimit/10+0.00001)*10; up6 = int(UpLimit/5+0.00001)*5; up7 = int(UpLimit/1+0.00001)*1; } else { up1 = int(UpLimit/1000+0.00001)*1000; up2 = int(UpLimit/500+0.00001)*500; up3 = int(UpLimit/100+0.00001)*100; up4 = int(UpLimit/50+0.00001)*50; up5 = int(UpLimit/10+0.00001)*10; up6 = int(UpLimit/10+0.00001)*10; up7 = int(UpLimit/1+0.00001)*1; } } Else { up1 = int(UpLimit/1000+0.00001)*1000; up2 = int(UpLimit/500+0.00001)*500; up3 = int(UpLimit/100+0.00001)*100; up4 = int(UpLimit/50+0.00001)*50; up5 = int(UpLimit/10+0.00001)*10; up6 = int(UpLimit/5+0.00001)*5; up7 = int(UpLimit/1+0.00001)*1; } if CodeCategory() == 1 || CodeCategory() == 2 then { if sdate < 20101004 Then { If BP >= 500000 Then 상한가 = up1; Else If BP >= 100000 Then 상한가 = iff(up2>=500000, up1, up2); Else If BP >= 50000 Then 상한가 = iff(up3>=100000, up2, up3); Else If BP >= 10000 Then 상한가 = iff(up4>=50000, up3, up4); Else If BP >= 5000 Then 상한가 = iff(up5>=10000, up4, up5); Else If BP >= 1000 Then 상한가 = iff(up5>=5000, up5, up6); Else 상한가 = iff(up6>=1000, up6, up6); } Else { If BP >= 500000 Then 상한가 = up1; Else If BP >= 100000 Then 상한가 = iff(up2>=500000, up1, up2); Else If BP >= 50000 Then 상한가 = iff(up3>=100000, up2, up3); Else If BP >= 10000 Then 상한가 = iff(up4>=50000, up3, up4); Else If BP >= 5000 Then 상한가 = iff(up5>=10000, up4, up5); Else If BP >= 1000 Then 상한가 = iff(up5>=5000, up5, up6); Else 상한가 = iff(up6>=1000, up6, up7); } } else if CodeCategory() == 8 || CodeCategory() == 9 then { // ETF 상한가 = up6; } } if H >= 상한가 Then { upv[0] = H[0]; count = count+1; TL = TL_New(sdate[1],stime[1],upv[0],sdate,stime,upv[0]); TL_SetExtRight(TL,true); tx[0] = Text_New(sdate,stime,upv[0],NumToStr(upv[0],0)); for cnt = 1 to 99 { upv[cnt] = upv[cnt-1][1]; tx[cnt] = tx[cnt-1][1]; } } for cnt = 0 to count-1 { if upv[cnt] > 0 then { Text_SetLocation(TX[cnt],sdate,stime,upv[cnt]); if C > upv[cnt] and C[1] < upv[cnt] Then buy(); if C < upv[cnt] and C[1] > upv[cnt] Then sell(); } } 3 var : 상한가(0), UpLimit(0),cnt(0),count(0); var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),Up7(0),TL(0); Array : upv[100](0),TX[100](0); if date >= 19981207 then { if date < 20050328 && CodeCategory() == 2 then UpLimit = (BP[0] * 1.12); Else if date >= 20050328 and date < 20150615 Then UpLimit = (BP[0] * 1.15); Else UpLimit = (BP[0] * 1.30); if CodeCategory() == 2 then { if date >= 20030721 then { up1 = int(UpLimit/100+0.00001)*100; up2 = int(UpLimit/100+0.00001)*100; up3 = int(UpLimit/100+0.00001)*100; up4 = int(UpLimit/50+0.00001)*50; up5 = int(UpLimit/10+0.00001)*10; up6 = int(UpLimit/5+0.00001)*5; up7 = int(UpLimit/1+0.00001)*1; } else { up1 = int(UpLimit/1000+0.00001)*1000; up2 = int(UpLimit/500+0.00001)*500; up3 = int(UpLimit/100+0.00001)*100; up4 = int(UpLimit/50+0.00001)*50; up5 = int(UpLimit/10+0.00001)*10; up6 = int(UpLimit/10+0.00001)*10; up7 = int(UpLimit/1+0.00001)*1; } } Else { up1 = int(UpLimit/1000+0.00001)*1000; up2 = int(UpLimit/500+0.00001)*500; up3 = int(UpLimit/100+0.00001)*100; up4 = int(UpLimit/50+0.00001)*50; up5 = int(UpLimit/10+0.00001)*10; up6 = int(UpLimit/5+0.00001)*5; up7 = int(UpLimit/1+0.00001)*1; } if CodeCategory() == 1 || CodeCategory() == 2 then { if sdate < 20101004 Then { If BP >= 500000 Then 상한가 = up1; Else If BP >= 100000 Then 상한가 = iff(up2>=500000, up1, up2); Else If BP >= 50000 Then 상한가 = iff(up3>=100000, up2, up3); Else If BP >= 10000 Then 상한가 = iff(up4>=50000, up3, up4); Else If BP >= 5000 Then 상한가 = iff(up5>=10000, up4, up5); Else If BP >= 1000 Then 상한가 = iff(up5>=5000, up5, up6); Else 상한가 = iff(up6>=1000, up6, up6); } Else { If BP >= 500000 Then 상한가 = up1; Else If BP >= 100000 Then 상한가 = iff(up2>=500000, up1, up2); Else If BP >= 50000 Then 상한가 = iff(up3>=100000, up2, up3); Else If BP >= 10000 Then 상한가 = iff(up4>=50000, up3, up4); Else If BP >= 5000 Then 상한가 = iff(up5>=10000, up4, up5); Else If BP >= 1000 Then 상한가 = iff(up5>=5000, up5, up6); Else 상한가 = iff(up6>=1000, up6, up7); } } else if CodeCategory() == 8 || CodeCategory() == 9 then { // ETF 상한가 = up6; } } if H >= 상한가 Then { upv[0] = H[0]; count = count+1; for cnt = 1 to 99 { upv[cnt] = upv[cnt-1][1]; tx[cnt] = tx[cnt-1][1]; } } for cnt = 0 to count-1 { Condition1 = false; if upv[cnt] > 0 then { if C > upv[cnt] and C[1] < upv[cnt] Then Condition1 = true; } if Condition1 == true Then find(1); } 즐거운 하루되세요 > 하리마우 님이 쓴 글입니다. > 제목 : 수식 부탁합니다. > 지표식 1. 최근 상한가가 발생한 봉을 기준 : 우측으로 수평선을 긋고 상단에 가격을 표시 2. 상한가가 발생한 봉 전체를 위 1과 같이 표시 시스템식 위 1의 지표식을 기준으로 돌파시 매수, 이탈시 매도 종목검색식 위 시스템식에서 매수가 발생된 종목을 검색 미리 감사드리고 항상 건강하시길 기원합니다^^
프로필 이미지

하리마우

2019-06-04 13:57:24

우선 담당자분께 깊은 감사를 드립니다. 지표식 1과 2는 따로 따로 부탁드리고요, 시스템식에는, 변수, 진입일자 : 2019.01.01 // 매매 시작일을 임의로 지정 그리고 data2 5분봉에서 위 지표식 1을 기준으로 돌파시 매수, 이탈시 매도 그럼 수고하세요^^