커뮤니티

문의드립니다

프로필 이미지
철옹성
2016-05-20 15:43:32
103
글번호 98234
답변완료
1. 가장 최근 상한가의 봉(15%~30%사이)과 그 바로전의 상한가봉(15%~30% 사이)은 바로위에 큰 화살표가 뜨게 하고싶습니다. 2. 가장 최근 상한가의 봉(15%~30%)의 시가와 종가 에 선을 긋고싶고, 그 바로전의 상한가 봉(15%~30%)도 시가와 종가에 선을 긋고 싶습니다. 3. 상한가가 나왔던 종목이라면, 상한가가 그럼 총 선이 4개(최근상한가 시가종가, 그전 상한가 시가종가)인데 이 선들의 1% 근접한 종목들의 검색식을 알고싶습니다. 항상 신경써주셔서 감사드립니다.
사용자 함수
답변 2
프로필 이미지

예스스탁 예스스탁 답변

2016-05-20 12:37:07

안녕하세요 예스스탁입니다. 1. 문의하신 내용은 추세선으로 그려야 합니다. 따로 plot으로 출력되는 부분은 없으므로 검색식으로 작성해 차트에 적용하시면 됩니다. var : 상한가(0), UpLimit(0); var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),Up7(0); var : tx1(0),tx2(0),tx3(0); var : OTL1(0),OTL2(0),OTL3(0); var : CTL1(0),CTL2(0),CTL3(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{ tx1 = Text_New(Sdate,stime,H+PriceScale*2,"▲"); Text_SetStyle(tx1,2,2); tx2 = tx1[1]; tx3 = tx2[1]; Text_Delete(tx3); OTL1 = TL_New(sdate[1],stime[1],O,sdate,stime,O); CTL1 = TL_New(sdate[1],stime[1],C,sdate,stime,C); TL_SetExtRight(OTL1,true); TL_SetExtRight(CTL1,true); OTL2 = OTL1[1]; OTL3 = OTL2[1]; CTL2 = CTL1[1]; CTL3 = CTL2[1]; TL_Delete(OTL3); TL_Delete(CTL3); } 2 종목검색의 최대 제공봉수는 500봉입니다. 최근 상한가가 몇봉전에 있을지 가늠이 안되는 내용이므로 종목검색시 속성에서 검색에 필요한 최소기간을 500으로 지정하고 검색하셔야 합니다. var : 상한가(0), UpLimit(0); var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),Up7(0); var : tx1(0),tx2(0),tx3(0); var : OTL1(0),OTL2(0),OTL3(0); var : CTL1(0),CTL2(0),CTL3(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{ var1 = O; var2 = C; var11 = var1[1]; var22 = var2[1]; } if (var1 > 0 and C <= var1*1.01 and C >= var1*0.99) or (var2 > 0 and C <= var2*1.01 and C >= var2*0.99) or (var11 > 0 and C <= var11*1.01 and C >= var11*0.99) or (var22 > 0 and C <= var22*1.01 and C >= var22*0.99)Then find(1); 즐거운 하루되세요 > 철옹성 님이 쓴 글입니다. > 제목 : 문의드립니다 > 1. 가장 최근 상한가의 봉(15%~30%사이)과 그 바로전의 상한가봉(15%~30% 사이)은 바로위에 큰 화살표가 뜨게 하고싶습니다. 2. 가장 최근 상한가의 봉(15%~30%)의 시가와 종가 에 선을 긋고싶고, 그 바로전의 상한가 봉(15%~30%)도 시가와 종가에 선을 긋고 싶습니다. 3. 상한가가 나왔던 종목이라면, 상한가가 그럼 총 선이 4개(최근상한가 시가종가, 그전 상한가 시가종가)인데 이 선들의 1% 근접한 종목들의 검색식을 알고싶습니다. 항상 신경써주셔서 감사드립니다.
프로필 이미지

철옹성

2016-05-20 13:59:26

검색식을 이용한 지표적용 및 종목검색을 해보았으나, 가장 최근에 상한가가 나왔는데 표시가 되지않거나 종목검색이 되지않는 종목들이 있어서 이것은 키움으로 작성한 상한가 수식인데, 상한가 기준을 이것에 맞게 지표 및 종목검색식 좀 부탁드리려 합니다. (h=c) && ((if(c<5000,c+5,if(c<10000,c+10,if(c<50000,c+50,if(c<100000,c+100,if(c<500000,c+500,c+1000)))))) / c(1) > 1.15)