커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

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

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

문의드립니다.

/*스윙 고/저점을 이용한 자동 추세선 생성 + 추세선 돌파 매수·매도 시스템*/input : len(1); var : sh1(0), sh2(0), shBar1(0), shBar2(0);var : sl1(0), sl2(0), slBar1(0), slBar2(0);var : TL_HighVal1(0), TL_HighVal2(0);var : TL_LowVal1(0), TL_LowVal2(0);var : highTrend(0), lowTrend(0);// 최근 두 스윙고점sh1 = SwingHigh(1, H, len, len, 100);sh2 = SwingHigh(2, H, len, len, 100);shBar1 = SwingHighBar(1, H, len, len, 100);shBar2 = SwingHighBar(2, H, len, len, 100);// 최근 두 스윙저점sl1 = SwingLow(1, L, len, len, 100);sl2 = SwingLow(2, L, len, len, 100);slBar1 = SwingLowBar(1, L, len, len, 100);slBar2 = SwingLowBar(2, L, len, len, 100);// ① 하락추세선 공식 : 두 스윙고점을 연결한 직선의 현재봉 y값if shBar2 > shBar1 and sh1 > 0 and sh2 > 0 then{ TL_HighVal1 = H[shBar2]; TL_HighVal2 = H[shBar1]; highTrend = TL_HighVal2 + (TL_HighVal1 - TL_HighVal2) * (shBar1) / (shBar2 - shBar1);}// ② 상승추세선 공식 : 두 스윙저점을 연결한 직선의 현재봉 y값if slBar2 > slBar1 and sl1 > 0 and sl2 > 0 then{ TL_LowVal1 = L[slBar2]; TL_LowVal2 = L[slBar1]; lowTrend = TL_LowVal2 + (TL_LowVal1 - TL_LowVal2) * (slBar1) / (slBar2 - slBar1);}if C > highTrend and C[1]<= highTrend[1] then{ Buy("추세상향돌파");}if marketposition == 1 then{ exitlong("롱청산",AtStop,low[1]);}######################################################################################################// ? 하락추세선(스윙고점 연결)if shBar2 > shBar1 and sh1 > 0 and sh2 > 0 then{ TL_High = TL_New( sdate[shBar2], stime[shBar2], H[shBar2], sdate[shBar1], stime[shBar1], H[shBar1] ); TL_SetColor(TL_High, Red); TL_SetSize(TL_High, 2);}// ? 상승추세선(스윙저점 연결)if slBar2 > slBar1 and sl1 > 0 and sl2 > 0 then{ TL_Low = TL_New( sdate[slBar2], stime[slBar2], L[slBar2], sdate[slBar1], stime[slBar1], L[slBar1] ); TL_SetColor(TL_Low, Green); TL_SetSize(TL_Low, 2);}########################################################################질문1. 추세선이 왜 중간에 끊어지는지 모르겠습니다. swinghigh를 연결하며 이어져야 할것 같은데 말입니다. 질문2. 진입이 왜 저기서 일어나는지 모르겠습니다. 빨간선을 크로스업했을때 진입을 의도한것인데...질문3. 청산이 왜 2봉전 저가에서 일어나는지 모르겠습니다. 코드는 1봉전 저가인데...항상 감사드립니다.
프로필 이미지
시고르시고르
2025-11-17
197
글번호 228129
시스템
답변완료

글번호 228046의 추가문의

답변내용에 더해서 시장가주문을 냈으나 특별한 이벤트 발생해서 주문거부나 주문자체가 없어진 경우 30초 뒤에 2차 시장가 주문 하고 역시 미체결이면 30초뒤 다시 3차 시장가 주문 을 내는 식을 추가해서 부탁드립니다.(3차까지 나가면 거의 체결될듯 합니다.)
프로필 이미지
산수유
2025-11-17
155
글번호 228128
시스템
답변완료

변환 부탁 드립니다.

//트레이딩 뷰 지표입니다....변환 부탁드립니다.//@version=5indicator('[@btc_charlie] Trader XO Macro Trend Scanner', overlay=true)// Variablesvar ok = 0var countBuy = 0var countSell = 0src = input(close, title='OHLC Type')i_fastEMA = input(12, title='Fast EMA')i_slowEMA = input(25, title='Slow EMA')i_defEMA = input(25, title='Consolidated EMA')// Allow the option to show single or double EMAi_bothEMAs = input(title='Show Both EMAs', defval=true)// Define EMAsv_fastEMA = ta.ema(src, i_fastEMA)v_slowEMA = ta.ema(src, i_slowEMA)v_biasEMA = ta.ema(src, i_defEMA)// Color the EMAsemaColor = v_fastEMA > v_slowEMA ? color.green : v_fastEMA < v_slowEMA ? color.red : #FF530D// Plot EMAsplot(i_bothEMAs ? na : v_biasEMA, color=emaColor, linewidth=3, title='Consolidated EMA')plot(i_bothEMAs ? v_fastEMA : na, title='Fast EMA', color=emaColor)plot(i_bothEMAs ? v_slowEMA : na, title='Slow EMA', color=emaColor)// Colour the barsbuy = v_fastEMA > v_slowEMAsell = v_fastEMA < v_slowEMAif buy countBuy += 1 countBuyif buy countSell := 0 countSellif sell countSell += 1 countSellif sell countBuy := 0 countBuybuysignal = countBuy < 2 and countBuy > 0 and countSell < 1 and buy and not buy[1]sellsignal = countSell > 0 and countSell < 2 and countBuy < 1 and sell and not sell[1]barcolor(buysignal ? color.green : na)barcolor(sellsignal ? color.red : na)// Plot Bull/Bearplotshape(buysignal, title='Bull', text='Bull', style=shape.triangleup, location=location.belowbar, color=color.new(color.green, 0), textcolor=color.new(color.black, 0), size=size.tiny)plotshape(sellsignal, title='Bear', text='Bear', style=shape.triangledown, location=location.abovebar, color=color.new(color.red, 0), textcolor=color.new(color.black, 0), size=size.tiny)bull = countBuy > 1bear = countSell > 1barcolor(bull ? color.green : na)barcolor(bear ? color.red : na)// Set Alertsalertcondition(ta.crossover(v_fastEMA, v_slowEMA), title='Bullish EMA Cross', message='Bullish EMA crossover')alertcondition(ta.crossunder(v_fastEMA, v_slowEMA), title='Bearish EMA Cross', message='Bearish EMA Crossover')// Stoch RSI codesmoothK = input.int(3, 'K', minval=1)smoothD = input.int(3, 'D', minval=1)lengthRSI = input.int(14, 'RSI Length', minval=1)lengthStoch = input.int(14, 'Stochastic Length', minval=1)rsi1 = ta.rsi(src, lengthRSI)k = ta.sma(ta.stoch(rsi1, rsi1, rsi1, lengthStoch), smoothK)d = ta.sma(k, smoothD)bandno0 = input.int(80, minval=1, title='Upper Band', group='Bands (change this instead of length in Style for Stoch RSI colour to work properly)')bandno2 = input.int(50, minval=1, title='Middle Band', group='Bands (change this instead of length in Style for Stoch RSI colour to work properly)')bandno1 = input.int(20, minval=1, title='Lower Band', group='Bands (change this instead of length in Style for Stoch RSI colour to work properly)')// AlertscrossoverAlertBgColourMidOnOff = input.bool(title='Crossover Alert Background Colour (Middle Level) [ON/OFF]', group='Crossover Alerts', defval=false)crossoverAlertBgColourOBOSOnOff = input.bool(title='Crossover Alert Background Colour (OB/OS Level) [ON/OFF]', group='Crossover Alerts', defval=false)crossoverAlertBgColourGreaterThanOnOff = input.bool(title='Crossover Alert >input [ON/OFF]', group='Crossover Alerts', defval=false)crossoverAlertBgColourLessThanOnOff = input.bool(title='Crossover Alert <input [ON/OFF]', group='Crossover Alerts', defval=false)maTypeChoice = input.string('EMA', title='MA Type', group='Moving Average', options=['EMA', 'WMA', 'SMA', 'None'])maSrc = input.source(close, title='MA Source', group='Moving Average')maLen = input.int(200, minval=1, title='MA Length', group='Moving Average')maValue = if maTypeChoice == 'EMA' ta.ema(maSrc, maLen)else if maTypeChoice == 'WMA' ta.wma(maSrc, maLen)else if maTypeChoice == 'SMA' ta.sma(maSrc, maLen)else 0crossupCHECK = maTypeChoice == 'None' or open > maValue and maTypeChoice != 'None'crossdownCHECK = maTypeChoice == 'None' or open < maValue and maTypeChoice != 'None'crossupalert = crossupCHECK and ta.crossover(k, d) and (k < bandno2 or d < bandno2)crossdownalert = crossdownCHECK and ta.crossunder(k, d) and (k > bandno2 or d > bandno2)crossupOSalert = crossupCHECK and ta.crossover(k, d) and (k < bandno1 or d < bandno1)crossdownOBalert = crossdownCHECK and ta.crossunder(k, d) and (k > bandno0 or d > bandno0)aboveBandalert = ta.crossunder(k, bandno0)belowBandalert = ta.crossover(k, bandno1)bgcolor(color=crossupalert and crossoverAlertBgColourMidOnOff ? #4CAF50 : crossdownalert and crossoverAlertBgColourMidOnOff ? #FF0000 : na, title='Crossover Alert Background Colour (Middle Level)', transp=70)bgcolor(color=crossupOSalert and crossoverAlertBgColourOBOSOnOff ? #fbc02d : crossdownOBalert and crossoverAlertBgColourOBOSOnOff ? #000000 : na, title='Crossover Alert Background Colour (OB/OS Level)', transp=70)bgcolor(color=aboveBandalert and crossoverAlertBgColourGreaterThanOnOff ? #ff0014 : crossdownalert and crossoverAlertBgColourMidOnOff ? #FF0000 : na, title='Crossover Alert - K > Upper level', transp=70)bgcolor(color=belowBandalert and crossoverAlertBgColourLessThanOnOff ? #4CAF50 : crossdownalert and crossoverAlertBgColourMidOnOff ? #FF0000 : na, title='Crossover Alert - K < Lower level', transp=70)alertcondition(crossupalert or crossdownalert, title='Stoch RSI Crossover', message='STOCH RSI CROSSOVER')
프로필 이미지
다올
2025-11-17
336
글번호 228127
지표
답변완료

글번호 228073 번 추가 문의

앞서 글번호 228073 번에 아래 식을 주셨는데, 그럼 atr 을 500이 아니라 300으로 해서 30일치를 검색하는 식으로 부탁드립니다.1번과 2번으로 나눠 주셨는데, 어떻게 사용하는 것일까요?사용자 함수까지 조건식에 넣어서, 종목검색 창에 붙여 넣으면 되게 부탁드립니다.1 . 사용자함수함수명 : RngCheck반환값형 : 숫자형input : 기준(Numeric),범위(Numeric);var : C0(0),C1(0),C2(0),C3(0),C4(0);var : C5(0),C6(0),C7(0),C8(0),C9(0);var : C10(0),C11(0),C12(0),C13(0),C14(0);var : C15(0),C16(0),C17(0),C18(0),C19(0);C0=IFF(abs(C-기준)>범위,1,0); C1=IFF(abs(C[1]-기준)>범위,1,0); C2=IFF(abs(C[2]-기준)>범위,1,0); C3=IFF(abs(C[3]-기준)>범위,1,0); C4=IFF(abs(C[4]-기준)>범위,1,0); C5=IFF(abs(C[5]-기준)>범위,1,0); C6=IFF(abs(C[6]-기준)>범위,1,0); C7=IFF(abs(C[7]-기준)>범위,1,0); C8=IFF(abs(C[8]-기준)>범위,1,0); C9=IFF(abs(C[9]-기준)>범위,1,0); C10=IFF(abs(C[10]-기준)>범위,1,0); C11=IFF(abs(C[11]-기준)>범위,1,0); C12=IFF(abs(C[12]-기준)>범위,1,0); C13=IFF(abs(C[13]-기준)>범위,1,0); C14=IFF(abs(C[14]-기준)>범위,1,0); C15=IFF(abs(C[15]-기준)>범위,1,0); C16=IFF(abs(C[16]-기준)>범위,1,0); C17=IFF(abs(C[17]-기준)>범위,1,0); C18=IFF(abs(C[18]-기준)>범위,1,0); C19=IFF(abs(C[19]-기준)>범위,1,0); RngCheck = C0+C1+C2+C3+C4+C5+C6+C7+C8+ C9+C10+C11+C12+C13+C14+C15+C16+C17+C18+C19;2input : 기간(1),Rt(1),배수(1);var : at(0),mm(0),rg(0),chk(0),Range중(False),Range거래량(0);var : 전체합(0),Range봉수(0),평균거래량(0);var : 상단(0),양봉(False),돌파(False),거래량급증(False);var : A(0),b1(0),d(0),e(0),f(0),g(0),k(0),j(0),t(0),y(0),r(0),q(0);var : 볼밴라인(0),볼밴돌파(False),볼밴위(False);At = ATR(500);Mm = avg(C, 기간);Rg = At * Rt / 10;Chk = RngChk(Mm, Rg);Range중 = Chk == 0;Range거래량 = iff(Range중, V, 0);전체합 = Accum(Range거래량);Range봉수 = Accum(iff(Range중,1,0));평균거래량 = 전체합 / Range봉수;상단 = Mm + Rg;양봉 = C > O;돌파 = C > 상단;거래량급증 = V > 평균거래량 * 배수;A = BollBandUp(20, 2);B1 = Ema(A, 56);D = BollBandUp(40, 2);E = Ema(D, 56);F = BollBandUp(60, 2);G = Ema(F, 56);K = BollBandUp(90, 2);J = Ema(K, 56);T = BollBandUp(100, 2);Y = Ema(T, 56);R = (B1 + E + G + J + Y) / 5;Q = (C - O) / 3;볼밴라인 = iff(C > O, R - Q, R);볼밴돌파 = H > 볼밴라인;볼밴위 = C > 볼밴라인;if Range중[1] == true && 돌파 && 양봉 && 거래량급증 && (볼밴돌파 or 볼밴위) then var1 = sDate;Else var1 = 0;if CountIf(var1>0,30) >= 1 then Find(var1);
프로필 이미지
마을
2025-11-17
210
글번호 228125
사용자 함수
답변완료

조건검색식 부탁드립니다

일목균형표 기준선26위에 캔들을 검색하려는 검색식 부탁드립니다
프로필 이미지
감땡
2025-11-17
155
글번호 228123
종목검색
답변완료

수식 부탁 드림니다

예스스탁 재질의(251117)안녕하십니까?수식 부탁 드립니다s10170512025-11-15 03:17:07글번호 228049------------------------------------------------답변 주셨는데챠트표시란에PlotNo1 ~ PlotNo10으로 해 주셨는데1.상단선_고점2.상단선_고점+K3.하단선_저점4.하단선_저점-K식으로 수정해 주시면 감사 하겠읍니다
프로필 이미지
s1017051
2025-11-17
174
글번호 228114
지표
답변완료

조건검색문의드립니다

2개 조건검색식 수정 부탁드립니다[1]CC=CCi(20);M=Macd(12,26);Ms=eavg(M,9);S=SuperTrend(60,2);R=RSI(14);bs_C=Barssince(CC<-100);bs_M=Barssince(M<0 && CrossUp(M,Ms));bs_S=Barssince(CrossUp(C,S));bs_R=Barssince(R<40);조건=bs_C=5 && bs_C <=10 &&bs_M=5 && bs_M <=10 &&bs_S=5 && bs_S <=10 &&bs_R=5 && bs_R <=10;조건 && !조건(1)[2]CrossUp(CCI(기간), 기준) && CrossUp(DiPlus(period),DiMinus(period))&& V>(1)*배수지표변수기간 20기준 0period 14배수 2
프로필 이미지
해피럭키
2025-11-17
162
글번호 228113
종목검색
답변완료

수식 부탁드립니다

글번호 227977(11월12일)와 관련된 수식 문의입니다. 내용중 신호조건이 두가지가 있었는데 조건a : (MD조건+STO조건+DM조건+PN조건+TX조건+핸들조건)>=2 조건b : Hm조건 or Hs조건수식1) 조건b 상태가 끝나고 최소 5봉이후에 조건a상태가 되면서 나온 첫양봉(전봉은 음봉이어야함)에 신호발생과 종목 검색가능 수식 또한 이 양봉의 시가대비 종가변동율은 2%이상 10%이내이어야 하고, 전일종가대비 종가변동율은 15%이내이어야한다. 만약 위 양봉의 상승율조건을 초과하는 양봉이거나 전일양봉후 양봉인 경우에는 이후 처음 출현하는 음봉후 양봉에 검색되어야 한다 음봉후 양봉발생시에 조건a상태가 유지되고 있어야 한다 수식2) 조건a 상태가 끝나고 최소 10봉이후에 조건a상태가 되면서 나온 첫양봉(전봉은 음봉이어야함)에 신호발생과 종목 검색가능 수식 또한 이 양봉의 시가대비 종가변동율은 2%이상 10%이내이어야 하고, 전일종가대비 종가변동율은 15%이내이어야한다. 만약 위 양봉의 상승율조건을 초과하는 양봉이거나 전일양봉후 양봉인 경우에는 이후 처음 출현하는 음봉후 양봉에 검색되어야 한다 음봉후 양봉발생시에 조건a상태가 유지되고 있어야 한다상기 수식 두가지를 or로 묶어서 해주셔도 되고 복잡해지면 각각 해주시기 바랍니다
프로필 이미지
해피오
2025-11-17
169
글번호 228111
종목검색
답변완료

종목검색식 변경

UM = C < O; UM3 = UM && UM(1) && UM(2); 음봉몸통 = O(1) - C(1); 양봉몸통 = C - O; 큰양봉 = UM3(1) && C > O && 양봉몸통 > 음봉몸통; 기준고가 = Valuewhen(1, 큰양봉, H); 평균거래량 = ma(V, 거래량기간); 거래량조건 = V >= 평균거래량 * 1.5; 돌파 = CrossUp(C, 기준고가); M20 = ma(C, 20); M60 = ma(C, 60); M120 = ma(C, 120); 정배열 = M20 > M60 && M60 > M120; 돌파 && 거래량조건 && 정배열 설정 거래량기간 20키움의 신호검색식입니다. 이 신호가 검색되는 조건검색식을 작성하고 싶습니다.날짜가 나오는 30일치 한번에 검색하는 버전으로 부탁드립니다.
프로필 이미지
마을
2025-11-17
156
글번호 228110
종목검색