커뮤니티

동 조건을 만족하는 검색식 요청

프로필 이미지
예스공부
2021-03-26 10:04:30
1178
글번호 147412
답변완료
15분봉에서 StochasticsSlow(12,5) signal(5)조건에서 (1) 10봉전 60봉 이내에서 %K가 80 이상(과열)이 1회 이상 발생 (2) 과열구간 이후 %K가 하락하여 침체구간(20)이하가 나와야 하고 (3) (2)번 항목 나온 후 재차 20봉 이내에서 침체구간(20)이하가 나와야 함 (4) 2번 3번 조건을 만족하고[2번,3번 동시 만족] or (2), (3)번 각 1회씩 나온 뒤에 ==> %K가 25구간을 돌파하는 종목 검색식을 부탁드립니다.
검색
답변 3
프로필 이미지

예스스탁 예스스탁 답변

2021-03-26 14:53:52

안녕하세요 예스스탁입니다. input : 매수금액(10000000); var : 상한가(0), UpLimit(0),entry(0),TM(0),ET(0); var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),Up7(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 C >= 상한가 Then var1 = C; TM = TimeToMinutes(sTime); if bdate != bdate[1] Then entry = 0; if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition and TotalTrades > TotalTrades[1]) Then entry = entry+1; if CountIf(C>=상한가,15) >= 1 Then { if MarketPosition == 0 and entry < 1 Then Buy("b1",AtLimit,var1*0.90,Floor((매수금액*0.4)/min(NextBarOpen,var1*0.90))); if MarketPosition == 1 and MaxEntries == 1 Then Buy("b2",AtLimit,var1*0.85,Floor((매수금액*0.4)/min(NextBarOpen,var1*0.85))); } if MarketPosition == 1 Then { if CurrentContracts > CurrentContracts[1] Then { ET = TM; Condition1 = False; Condition2 = False; Condition3 = False; Condition4 = False; Condition5 = False; } if CurrentContracts < CurrentContracts[1] Then { if LatestExitName(0) == "bx1" Then Condition1 = true; if LatestExitName(0) == "bx2" Then Condition1 = False; if LatestExitName(0) == "bx3" Then Condition1 = False; if LatestExitName(0) == "bl1" Then Condition4 = true; if LatestExitName(0) == "bl2" Then Condition5 = False; } if Condition1 == False Then ExitLong("bx1",AtLimit,AvgEntryPrice*1.07,"",Floor(CurrentContracts*0.3),1); if Condition1 == False Then ExitLong("bx2",AtLimit,AvgEntryPrice*1.10,"",Floor(CurrentContracts*0.5),1); if Condition1 == False Then ExitLong("bx3",AtLimit,AvgEntryPrice*1.15); if MaxEntries == 2 and Condition4 == False Then ExitLong("bl1",AtStop,AvgEntryPrice*0.95,"",Floor(CurrentContracts*0.6),1); if MaxEntries == 2 and Condition5 == False Then ExitLong("bl2",AtStop, AvgEntryPrice*0.91); if TM >= ET+180 and TM[1] < ET+180 Then ExitLong("bx",OnClose,DEF,"",Floor(CurrentContracts*0.1),1); } 즐거운 하루되세요 > 예스공부 님이 쓴 글입니다. > 제목 : 동 조건을 만족하는 검색식 요청 > 15분봉에서 StochasticsSlow(12,5) signal(5)조건에서 (1) 10봉전 60봉 이내에서 %K가 80 이상(과열)이 1회 이상 발생 (2) 과열구간 이후 %K가 하락하여 침체구간(20)이하가 나와야 하고 (3) (2)번 항목 나온 후 재차 20봉 이내에서 침체구간(20)이하가 나와야 함 (4) 2번 3번 조건을 만족하고[2번,3번 동시 만족] or (2), (3)번 각 1회씩 나온 뒤에 ==> %K가 25구간을 돌파하는 종목 검색식을 부탁드립니다.
프로필 이미지

예스공부

2021-03-26 16:33:34

동 수식이 맞는지요?... ^^ 다시 한 번 확인 요청드립니다. ------------------------------- > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 동 조건을 만족하는 검색식 요청 > 안녕하세요 예스스탁입니다. input : 매수금액(10000000); var : 상한가(0), UpLimit(0),entry(0),TM(0),ET(0); var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),Up7(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 C >= 상한가 Then var1 = C; TM = TimeToMinutes(sTime); if bdate != bdate[1] Then entry = 0; if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition and TotalTrades > TotalTrades[1]) Then entry = entry+1; if CountIf(C>=상한가,15) >= 1 Then { if MarketPosition == 0 and entry < 1 Then Buy("b1",AtLimit,var1*0.90,Floor((매수금액*0.4)/min(NextBarOpen,var1*0.90))); if MarketPosition == 1 and MaxEntries == 1 Then Buy("b2",AtLimit,var1*0.85,Floor((매수금액*0.4)/min(NextBarOpen,var1*0.85))); } if MarketPosition == 1 Then { if CurrentContracts > CurrentContracts[1] Then { ET = TM; Condition1 = False; Condition2 = False; Condition3 = False; Condition4 = False; Condition5 = False; } if CurrentContracts < CurrentContracts[1] Then { if LatestExitName(0) == "bx1" Then Condition1 = true; if LatestExitName(0) == "bx2" Then Condition1 = False; if LatestExitName(0) == "bx3" Then Condition1 = False; if LatestExitName(0) == "bl1" Then Condition4 = true; if LatestExitName(0) == "bl2" Then Condition5 = False; } if Condition1 == False Then ExitLong("bx1",AtLimit,AvgEntryPrice*1.07,"",Floor(CurrentContracts*0.3),1); if Condition1 == False Then ExitLong("bx2",AtLimit,AvgEntryPrice*1.10,"",Floor(CurrentContracts*0.5),1); if Condition1 == False Then ExitLong("bx3",AtLimit,AvgEntryPrice*1.15); if MaxEntries == 2 and Condition4 == False Then ExitLong("bl1",AtStop,AvgEntryPrice*0.95,"",Floor(CurrentContracts*0.6),1); if MaxEntries == 2 and Condition5 == False Then ExitLong("bl2",AtStop, AvgEntryPrice*0.91); if TM >= ET+180 and TM[1] < ET+180 Then ExitLong("bx",OnClose,DEF,"",Floor(CurrentContracts*0.1),1); } 즐거운 하루되세요 > 예스공부 님이 쓴 글입니다. > 제목 : 동 조건을 만족하는 검색식 요청 > 15분봉에서 StochasticsSlow(12,5) signal(5)조건에서 (1) 10봉전 60봉 이내에서 %K가 80 이상(과열)이 1회 이상 발생 (2) 과열구간 이후 %K가 하락하여 침체구간(20)이하가 나와야 하고 (3) (2)번 항목 나온 후 재차 20봉 이내에서 침체구간(20)이하가 나와야 함 (4) 2번 3번 조건을 만족하고[2번,3번 동시 만족] or (2), (3)번 각 1회씩 나온 뒤에 ==> %K가 25구간을 돌파하는 종목 검색식을 부탁드립니다.
프로필 이미지

예스스탁 예스스탁 답변

2021-03-26 16:37:45

안녕하세요 예스스탁입니다. 죄송합니다. 답변복사가 잘못되었습니다. 아래식으로 종목검색하시면 됩니다. 스토케스틱이 과거봉수에 따라 값이 다르게 됩니다. 종목검색 속성에서 검색에 필요한 최소기간에 500봉 지정하고 검색하시기 바랍니다. 종목검색은 최대 500봉까지 제공됩니다. 차트도 500봉 조회해서 비교해 보셔야 합니다. input : sto1(12),sto2(5),sto3(5); var : stok(0),stod(0),hi(0),li(0); stok = StochasticsK(sto1,sto2); stod = StochasticsD(sto1,sto2,sto3); if stok >= 80 Then hi = Index; if stok <= 20 Then li = Index; if li > hi and hi > 0 and li > 0 and Index >= hi+10 and Index <= hi+60 and Index > li and Index < li+20 and CrossUp(stok,25) Then Find(1); 즐거운 하루되세요 > 예스공부 님이 쓴 글입니다. > 제목 : Re : Re : 동 조건을 만족하는 검색식 요청(재검토 요청드립니다.) > 동 수식이 맞는지요?... ^^ 다시 한 번 확인 요청드립니다. ------------------------------- > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 동 조건을 만족하는 검색식 요청 > 안녕하세요 예스스탁입니다. input : 매수금액(10000000); var : 상한가(0), UpLimit(0),entry(0),TM(0),ET(0); var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),Up7(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 C >= 상한가 Then var1 = C; TM = TimeToMinutes(sTime); if bdate != bdate[1] Then entry = 0; if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition and TotalTrades > TotalTrades[1]) Then entry = entry+1; if CountIf(C>=상한가,15) >= 1 Then { if MarketPosition == 0 and entry < 1 Then Buy("b1",AtLimit,var1*0.90,Floor((매수금액*0.4)/min(NextBarOpen,var1*0.90))); if MarketPosition == 1 and MaxEntries == 1 Then Buy("b2",AtLimit,var1*0.85,Floor((매수금액*0.4)/min(NextBarOpen,var1*0.85))); } if MarketPosition == 1 Then { if CurrentContracts > CurrentContracts[1] Then { ET = TM; Condition1 = False; Condition2 = False; Condition3 = False; Condition4 = False; Condition5 = False; } if CurrentContracts < CurrentContracts[1] Then { if LatestExitName(0) == "bx1" Then Condition1 = true; if LatestExitName(0) == "bx2" Then Condition1 = False; if LatestExitName(0) == "bx3" Then Condition1 = False; if LatestExitName(0) == "bl1" Then Condition4 = true; if LatestExitName(0) == "bl2" Then Condition5 = False; } if Condition1 == False Then ExitLong("bx1",AtLimit,AvgEntryPrice*1.07,"",Floor(CurrentContracts*0.3),1); if Condition1 == False Then ExitLong("bx2",AtLimit,AvgEntryPrice*1.10,"",Floor(CurrentContracts*0.5),1); if Condition1 == False Then ExitLong("bx3",AtLimit,AvgEntryPrice*1.15); if MaxEntries == 2 and Condition4 == False Then ExitLong("bl1",AtStop,AvgEntryPrice*0.95,"",Floor(CurrentContracts*0.6),1); if MaxEntries == 2 and Condition5 == False Then ExitLong("bl2",AtStop, AvgEntryPrice*0.91); if TM >= ET+180 and TM[1] < ET+180 Then ExitLong("bx",OnClose,DEF,"",Floor(CurrentContracts*0.1),1); } 즐거운 하루되세요 > 예스공부 님이 쓴 글입니다. > 제목 : 동 조건을 만족하는 검색식 요청 > 15분봉에서 StochasticsSlow(12,5) signal(5)조건에서 (1) 10봉전 60봉 이내에서 %K가 80 이상(과열)이 1회 이상 발생 (2) 과열구간 이후 %K가 하락하여 침체구간(20)이하가 나와야 하고 (3) (2)번 항목 나온 후 재차 20봉 이내에서 침체구간(20)이하가 나와야 함 (4) 2번 3번 조건을 만족하고[2번,3번 동시 만족] or (2), (3)번 각 1회씩 나온 뒤에 ==> %K가 25구간을 돌파하는 종목 검색식을 부탁드립니다.