커뮤니티

검색식 문의 드립니다. _( _ _)_

프로필 이미지
한칼부르스
2025-12-19 09:39:15
74
글번호 229174
답변완료


항상 도와주심에 감사드립니다._(_ _)_

아래의  수식은 지난번에  알려주신 상한가  5봉전에 상한가+와 520골든크로스 나온 종목을  0봉전에서  시가 ,몸통중심, 종가를 각각 돌파하는 종목 검색식 내용인데 검색이 되지 않습니다.  확인 좀 부탁드립니다.

그리고  10봉전에서 6봉전까지 상한가가 2번 나오고(마지막 상한가 종가가 첫 상한가보다 더 커야 합니다) 0봉전에 1~4봉전 최고음봉시가를 돌파하는 종목 검색식

, 최저음봉시가를 돌파하는 검색식 도 부탁드립니다. 번거롭게 해서 죄송합니다.



2-1  시가돌파 var : 상한가(0), UpLimit(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;       } } var1 = ma(C,5); var2 = ma(C,20); Condition1 = H == 상한가 and CrossUp(var1,var2); if Condition1 == true Then { value1 = O; value2 = (C+O)/2; value3 = C; } if Condition1[5] == true and CrossUp(C,value1) Then Find(1); 2-3  몸통중심돌파 var : 상한가(0), UpLimit(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;       } } var1 = ma(C,5); var2 = ma(C,20); Condition1 = H == 상한가 and CrossUp(var1,var2); if Condition1 == true Then {   value1 = O;   value2 = (C+O)/2;   value3 = C; } if Condition1[5] == true and CrossUp(C,value2) Then   Find(1); 2-2  종가돌파 var : 상한가(0), UpLimit(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;       } } var1 = ma(C,5); var2 = ma(C,20); Condition1 = H == 상한가 and CrossUp(var1,var2); if Condition1 == true Then {   value1 = O;   value2 = (C+O)/2;   value3 = C; } if Condition1[5] == true and CrossUp(C,value3) Then   Find(1);


종목검색
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2025-12-19 11:57:02

안녕하세요 예스스탁입니다. 1 상한가와 이평 골드가 동시 만족한 봉 수식이 5봉전에 위 조건이 만족한 것으로는 되어 있습니다. 다만 5봉전에 만족하고 1~4봉전에도 위 조건이 만족한 경우도 발생할 수 있는데 시가, 중심, 종가가 가장 최근 만족한 값으로 지정되게 되어 있어 5봉전으로 지정되게 수정해 드립니다. var : 상한가(0), UpLimit(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;   } } var1 = ma(C,5); var2 = ma(C,20); Condition1 = H >= 상한가 and CrossUp(var1,var2); if Condition1 == true then {   value1 = O;   value2 = (C+O)/2;   value3 = C; } if Condition1[5] == true and CrossUp(C,value1[5]) Then   Find(1); 2 var : 상한가(0), UpLimit(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; } } #현재봉 상한가 발생 #최근 5봉이내에 상한가가 2번 발생 #최근 상한가봉의 종가가 직전 상한가봉 종가보다 크면 #Condition1은 true 아니면 False Condition1 = False; if H >= 상한가 Then { var1 = C; var2 = var1[1]; if CountIf(H>=상한가,5) == 2 and var2 > 0 and var1 > var2 Then Condition1 = true; } value1 = IFf(C<O,O,0); Value2 = highest(value1,4); #5봉전 조건만족하고 1~4봉전 최고음봉시가를 돌파하는 종목 검색 if Condition1[5] == true and CrossUp(c,Value2[1]) Then Find(1); 즐거운 하루되세요