커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내

안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
프로필 이미지
예스스탁
2026-02-27
6805
글번호 230811
지표
답변완료

재문의 드립니다.

1. 수식을 참고하여, 아래수식의 수식1) 이 수식2) 를 돌파할때 (골든크로스) 종목 검색식 부탁드려요.(일봉기준)2. 수식을 참고하여, 아래수식의 수식1) 이 수식2 )를 돌파할때 (골든크로스) 0봉전~5봉전까지의 종목 검색식 부탁드려요.(일봉기준)3. 수식을 참고하여, 수식1 ) 이 "상승전환 OR 연속상승"시 종목 검색식 부탁드려요--아래-- 수식1) A=EAVG(C,기간); ((A-lowest(A,기간))/(highest(A,기간)-lowest(A,기간)))*30; 수식2) B=AVG(C,기간); ((B-lowest(B,기간))/(highest(B,기간)-lowest(B,기간)))*30;지표변수 기간 200
프로필 이미지
일지매7
2026-05-19
288
글번호 232096
종목검색
답변완료

문의 드립니다.

안녕하세요 ~많은 도움을 주셔서 감사 드립니다.RSI(5)가 70 이상인 조건에서, 현재가격이 아래의 라인을 돌파하거나, 아래 라인 위에 있는 종목의 검색식을 부탁 드립니다. A = Lowest(L(1), 15);B = Highest(H(1), 15);D = Valuewhen(1, BarsSince(L<A(1))==(15-3), B)감사합니다.
프로필 이미지
ikksoo
2026-05-19
333
글번호 232095
종목검색
답변완료

문의드립니다

input : 익절틱수(40000),손절틱수(520);var : Ema100(0);ema100 = ema(close, 100);input : atrPeriod(10),factor(3);var : src(0), alpha(0),ATRV(0),upperBand(0),lowerBand(0),direction(0),SuperTrend(C);if CurrentBar > 1 Then { src = (H+L)/2; alpha = 1 / atrPeriod ; ATRV = IFf(IsNan(ATRV[1]) == true, ma(TrueRange,atrPeriod) , alpha * TrueRange + (1 - alpha) * IFf(isnan(ATRV[1])==true,0,ATRV[1])); upperBand = src + factor * AtrV; lowerBand = src - factor * AtrV; if lowerBand > lowerBand[1] or close[1] < lowerBand[1] Then lowerBand = lowerBand; Else lowerBand = lowerBand[1]; if upperBand < upperBand[1] or close[1] > upperBand[1] Then upperBand = upperBand; Else upperBand = upperBand[1]; if C > UpperBand Then direction = 1; if C < LowerBand Then direction = -1; if direction == 1 Then SuperTrend = lowerband; Else SuperTrend = upperband;}var : R(0),A(0),longCondition(False),shortCondition(False);R = rsi(14);A = adx(14);longCondition = close > ema100 and direction > 0 and R > 50 and A > 25;shortCondition = close < ema100 and direction < 0 and R <50 and A > 25;var : S3(0);if longCondition == true ThenS3 = 1;if shortCondition == true ThenS3 = -1;input : atrMult(4.5);input : atrlen(12);input : rsmlen(3);input : tplen(14);var : i(0),sum(0),source(0);var : atrValue1(0),upperLevel(0),lowerLevel(0);var : previousLowerLevel(0),previousUpperLevel(0);var : trendDirection(Nan),superTrendValue(Nan);var : previousTrend(0);if CurrentBar > 1 Then { sum = 0; for i = 0 to rsmlen-1 { sum = sum + c[i]*c[i]; } source = sqrt(sum/rsmlen); alpha = 1 / atrlen ; atrValue1 = IFf(IsNan(atrValue1[1]) == true, ma(TrueRange,atrlen) , alpha * TrueRange + (1 - alpha) * IFf(isnan(atrValue1[1])==true,0,atrValue1[1])); upperLevel = source + atrMult * atrValue1; lowerLevel = source - atrMult * atrValue1; previousLowerLevel = iff(isnan(lowerLevel[1])==true,0,lowerLevel[1]); previousUpperLevel = iff(isnan(upperLevel[1])==true,0,upperLevel[1]); // Ensure continuity of lower and upper bands lowerLevel = iff(lowerLevel > previousLowerLevel or source[1] < previousLowerLevel , lowerLevel , previousLowerLevel); upperLevel = iff(upperLevel < previousUpperLevel or source[1] > previousUpperLevel , upperLevel , previousUpperLevel); // Determine direction and SuperTrend previousTrend = superTrendValue[1]; // Initialize direction if IsNan(atrValue1[1]) == true Then trendDirection = 1; else if previousTrend == previousUpperLevel Then trendDirection = iff(source > upperLevel , -1 , 1); else trendDirection = iff(source < lowerLevel , 1 , -1); // Set SuperTrend value based on direction superTrendValue = iff(trendDirection == -1 , lowerLevel , upperLevel);}var : dist(0),chg(0),lvlCol(0);var : tp1(0),tp2(0),tp3(0),tp4(0),tp5(0),tp6(0),tp7(0);var : printedtp1(0),printedtp2(0),printedtp3(0),printedtp4(0),printedtp5(0),printedtp6(0),printedtp7(0);dist = abs(close-superTrendValue);lvlCol = iff(trendDirection > 0 , red , green);var : key1(0);var : key2(0);var : key3(0);var : key4(0);var : key5(0);var : key6(0);var : key7(0);if CrossUp(trendDirection, 0) or CrossDown(trendDirection, 0) Then{ //TL_Delete(keys); printedtp1 = 0; printedtp2 = 0; printedtp3 = 0; printedtp4 = 0; printedtp5 = 0; printedtp6 = 0; printedtp7 = 0; chg = abs(superTrendValue-superTrendValue[1]); tp1 = superTrendValue[1] + IFF(trendDirection > 0 , -chg , chg); tp2 = superTrendValue[1] + IFF(trendDirection > 0 , -chg * 2 , chg * 2); tp3 = superTrendValue[1] + IFF(trendDirection > 0 , -chg * 3 , chg * 3); tp4 = superTrendValue[1] + IFF(trendDirection > 0 , -chg * 4 , chg * 4); tp5 = superTrendValue[1] + IFF(trendDirection > 0 , -chg * 5 , chg * 5); tp6 = superTrendValue[1] + IFF(trendDirection > 0 , -chg * 6 , chg * 6); tp7 = superTrendValue[1] + IFF(trendDirection > 0 , -chg * 7 , chg * 7); key1 = TL_new(sdate[1],stime[1],tp1, sDate,sTime, tp1); TL_SetColor(Key1,lvlCol); TL_SetSize(Key1,2); printedtp1 = 1;}Else TL_SetEnd(key1,sDate,sTime,TP1); var : u(0),d(0),alp(0),ur(0),dr(0),rs(0),tp(False);u = max(dist - dist[1], 0);d = max(dist[1] - dist, 0);alp = 1/tplen;ur = IFf(IsNan(ur[1]) == true, ma(u,tplen) , alp * u + (1 - alp) * IFf(isnan(ur[1])==true,0,ur[1]));dr = IFf(IsNan(dr[1]) == true, ma(d,tplen) , alp * d + (1 - alp) * IFf(isnan(dr[1])==true,0,dr[1]));rs = ur / dr;R = 100 - 100 / (1 + rs);tp = CrossDown(R, 60);var : extreme(0);var : extreme_tp1_dist(0);var : extreme_tp2_dist(0);var : extreme_tp3_dist(0);var : extreme_tp4_dist(0);var : extreme_tp5_dist(0);var : extreme_tp6_dist(0);var : extreme_tp7_dist(0);extreme = iff(trendDirection > 0 , low , high);extreme_tp1_dist = abs(extreme - tp1);extreme_tp2_dist = abs(extreme - tp2);extreme_tp3_dist = abs(extreme - tp3);extreme_tp4_dist = abs(extreme - tp4);extreme_tp5_dist = abs(extreme - tp5);extreme_tp6_dist = abs(extreme - tp6);extreme_tp7_dist = abs(extreme - tp7);var : tx(0),S2(0);if tp and trendDirection > 0 Then// ==========================================// 2. S2 슈퍼트렌드 & RSI 구간 점수 (수정본)// ==========================================// 기존의 CrossDown(R, 60) 대신 '구간' 점수로 변경하여 // 다른 지표(S1, S3)와 합산 점수를 맞추기 쉽게 만들었습니다.if trendDirection > 0 Then // 슈퍼트렌드 상승 구간{ if R > 50 Then S2 = 1; // RSI가 50 위면 매수 힘 우세 (+1점) Else S2 = 0;}else if trendDirection < 0 Then // 슈퍼트렌드 하락 구간{ if R < 50 Then S2 = -1; // RSI가 50 아래면 매도 힘 우세 (-1점) Else S2 = 0;}else{ S2 = 0;}// 차트 시각화용 (기존 X 표시는 그대로 둡니다)if tp and trendDirection > 0 Then{ tx = Text_New(sDate,sTime,L,"X"); Text_SetStyle(tx,2,0); Text_SetColor(tx,Red); Text_SetSize(tx,20); Text_SetBold(tx,1);}if tp and trendDirection < 0 Then{ tx = Text_New(sDate,sTime,H,"X"); Text_SetStyle(tx,2,1); Text_SetColor(tx,Green); Text_SetSize(tx,20); Text_SetBold(tx,1);}if printedtp2 == 0 and extreme_tp2_dist < extreme_tp1_dist Then{ key2 = TL_new(sdate[1],stime[1],tp2, sDate,sTime, tp2); TL_SetColor(Key2,lvlCol); TL_SetSize(Key2,2); printedtp2 = 1;}Else{ if printedtp2 == 1 Then TL_SetEnd(key2,sDate,sTime,TP2);}if printedtp3 == 0 and extreme_tp3_dist < extreme_tp2_dist Then{ key3 = TL_new(sdate[1],stime[1],tp3, sDate,sTime, tp3); TL_SetColor(Key3,lvlCol); TL_SetSize(Key3,2); printedtp3 = 1;}Else{ if printedtp3 == 1 Then TL_SetEnd(key3,sDate,sTime,TP3);}if printedtp4 == 0 and extreme_tp4_dist < extreme_tp3_dist Then{ key4 = TL_new(sdate[1],stime[1],tp4, sDate,sTime, tp4); TL_SetColor(Key4,lvlCol); TL_SetSize(Key4,2); printedtp4 = 1;}Else{ if printedtp4 == 1 Then TL_SetEnd(key4,sDate,sTime,TP4);}if printedtp5 == 0 and extreme_tp5_dist < extreme_tp4_dist Then{ key5 = TL_new(sdate[1],stime[1],tp5, sDate,sTime, tp5); TL_SetColor(Key5,lvlCol); TL_SetSize(Key5,2); printedtp5 = 1;}Else{ if printedtp5 == 1 Then TL_SetEnd(key5,sDate,sTime,TP5);}if printedtp6 == 0 and extreme_tp6_dist < extreme_tp5_dist Then{ key6 = TL_new(sdate[1],stime[1],tp6, sDate,sTime, tp6); TL_SetColor(Key6,lvlCol); TL_SetSize(Key6,2); printedtp6 = 1;}Else{ if printedtp6 == 1 Then TL_SetEnd(key6,sDate,sTime,TP6);}if printedtp7 == 0 and extreme_tp7_dist < extreme_tp6_dist Then{ key7 = TL_new(sdate[1],stime[1],tp7, sDate,sTime, tp7); TL_SetColor(Key7,lvlCol); TL_SetSize(Key7,2); printedtp7 = 1;}Else{ if printedtp7 == 1 Then TL_SetEnd(key7,sDate,sTime,TP7);}// 1. 매수 진입: S2(순자RSI) + S3(표준슈트) 합이 2점일 때if MarketPosition <= 0 and (S2 + S3 == 2) Then Buy("순자매수");// 2. 매수 청산: 합이 0 이하로 떨어지면 (힘 빠지면 탈출)if MarketPosition == 1 and (S2 + S3 <= 0) Then ExitLong("매수청산");// 3. 매도 진입: 합이 -2점일 때 (둘 다 하락 신호)if MarketPosition >= 0 and (S2 + S3 == -2) Then Sell("순자매도");// 4. 매도 청산: 합이 0 이상으로 올라오면 (반등하면 탈출)if MarketPosition == -1 and (S2 + S3 >= 0) Then ExitShort("매도청산");SetStopProfittarget(PriceScale*익절틱수,PointStop);SetStopLoss(PriceScale*손절틱수,PointStop);수고많으십니다 문의드릴 내용은 위 수식에서손절이나 익절이 돼면 다음 봉에서 바로 재진입해서손절이나 익절 돼면 다음 진입신호까지 대기하는 수식을 부탁드립니다 감사합니다
프로필 이미지
cjfdk
2026-05-19
1096
글번호 232091
시스템
답변완료

시스템매매 질문드립니다.

크루드오일 매매시 시스템매매 기준을 마이크로 크루드오일로 기준으로 삼고 매매신호시 크루드 오일을 매매하는 방법이 있는지 궁금합니다.예를 들어 아래와 같은 매수 진입신호시 if MarketPosition == 0 and Xcond == false and Tcond1 == true and Bcnt < 연속횟수 and CrossUp(stok,하단) Then Buy("매수1",AtLimit,EntryPrice);
프로필 이미지
미완
2026-05-19
550
글번호 232090
시스템
답변완료

종목검색식 부탁드립니다.

1. 아래수식을 참고하여 수식1) 이 수식2)를 돌파할때 (골든크로스) 종목 검색식 부탁드려요.2. 아래수식을 참고하여 수식1) 이 수식2)를 돌파할때 (골든크로스) 0봉전~5봉전까지의 종목 검색식 부탁드려요.--아래--수식1) A=EAVG(C,기간); ((A-lowest(A,기간))/(highest(A,기간)-lowest(A,기간)))*30;수식2) A=AVG(C,기간); ((A-lowest(A,기간))/(highest(A,기간)-lowest(A,기간)))*30; 지표변수 기간 200
프로필 이미지
일지매7
2026-05-19
249
글번호 232089
종목검색
답변완료

조건 검색관련 문의_일봉과 분봉의 차이점

var : A(0), A1(0), var1(0), AA(0), AA1(0), EQ(0), Z(0);// 1. 지표 계산 (변동성 돌파 + LRL 추세 + RSI 모멘텀)A = DAYHIGH[1] - DAYLOW[1];A1 = DAYOPEN() + A * 0.5;var1 = RSI(2);AA = LRL(C, 35);AA1 = LRL(AA, 35);eq = AA - AA1;Z = AA + eq;// 2. 매수 조건 (종목 코드 필터 없이 로직만 남깁니다)if CrossUp(C, A1) and var1 > 50 and C > Z Then Find(1); 상기 조건 검색을 저장 해놓고 일봉과 분봉에서 사용하려고 하는데 일봉에서는 별 문제가 없는데 분봉에서는 전종목이 매수 되는 경향이 보입니다 혹시 A = DAYHIGH[1] - DAYLOW[1];A1 = DAYOPEN() + A * 0.5;이부분을 분봉에서 인지 시켜 주는 방식이 따로 있는지요이 검색식의 요점은 그렇습니다 전일 일봉의 최고점과 최저점의 중간인 0.5에 선을 긋고 이선을 분봉에서 돌파 하는 것들 중 RSI(2)m, VL34등이 만족하는 종목을 검색하는 건데 예를 들어 관심종목에 9종목을 넣어 놓고 이 종목 중 3분봉에서 만족하는 것을 찾아라 라고 하면서 매수 신호는 넣으면 9종목 전종목이 다 매수 됩니다 만약에 관심종목이 아닌경우에는 한 100 종목이 매수 됩니다 중단 시키기 전까지는 아마 분봉으로 하면 전일 마지막 3분봉의 0.5를 초과하면 다 매수 하는 것 같아요해결 책이 있을까요?
프로필 이미지
모라리
2026-05-18
687
글번호 232088
검색
답변완료

수식변환을 했는데 맞지 않는 종목이 검색됩니다.

화=macd(c,12,26);살=ema(화,9);표=ema(살,120);crossup(살,표) && C>O위와같은 타HTS 신호수식을 아래와 같이 변환하여 종목검색식으로 작성하였는데어째서인지 신호가 없는 종목들만 검색됩니다. 종목검색 속성의 검색기간도 500봉으로 설정하고 3202 파워종목검색에서 불러와검색하였는데도 신호가 없는 종목이 검색이 됩니다. 어디서 잘못된 건지 한번 살펴봐 주실수 있을까요?Var : A(0), B(0), K(0), cond(false);A = MACD(12, 26);B = EMA(A, 9);K = EMA(B, 120);cond = CrossUp(B, K) And C > O;If cond Then Find(1);
프로필 이미지
키움증권
2026-05-18
684
글번호 232086
종목검색
답변완료

종목검색문의드립니다

A = MA( c, 240 );b=(A + AvgIf( c - A, -1, 0.0 )- 2 * StdevIf( c - A, -1, 0.0 ));d=(b*k);crossup(C,d)k 1.2부탁드립니다
프로필 이미지
우주최강
2026-05-18
164
글번호 232083
종목검색
답변완료

종목검색문의드립니다

1.M=ma(c,기간,종류);HH=Highest(M,봉수);Hc=Valuewhen(1, HH>HH(1),HH);hc < hc(1)기간 20종류 단순봉수 202.max( avg(C,short), avg(C,mid), avg(C,long)) <min( avg(C,short), avg(C,mid), avg(C,long)) * (1+Percent/100) && C > highest(H(1),5) && C(1) <= highest(H(2),5)andCrossUp(h,BBandsUp(Period,D1))short 5mid 20long 224period 40percent 5d1 23.S=sum(1);M=ma(C,기간);MH=valuewhen(1,M>M(1), M);HH=HighestSince(1, crossup(S, 전체봉수-표시봉수), MH);CrossUP(C,HH) &&HH=HH(1) && HH(1)==HH(2)전체봉수 600표시봉수 120기간 25부탁드립니다~
프로필 이미지
우주최강
2026-05-18
520
글번호 232079
종목검색