커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

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

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

키움지표인데 예스랭귀지로 변환될수 있도록 도와주세요.

안녕하세요. 키움지표인데 예스랭귀지로 변환 부탁 드립니다. S = sar(0.015, 0.2); 하단 = Valuewhen(1, CrossUp(C, S), S); crossup(C,하단) 즐거운 성탄절 보내세요~~
프로필 이미지
스톰82
2024-12-24
625
글번호 186589
종목검색
답변완료

지표 수식 부탁드립니다.

HH=highest(C,기간) ; Bnt=BarsSince(C==HH)+1 ; ma(C,Bnt) 키움의 기간내 최고종가와 현재 종가가 같은 봉 이후의 봉수를 계산한 자동 이평선을 구현하고싶습니다. 부탁드립니다.
프로필 이미지
사랑민
2024-12-24
707
글번호 186588
지표
답변완료

검색식 부탁 드려요

*문의 드립니다. 1) 일목균형표의 기준선이 단순이평 10일선을 골든크로스 할때,종목 검색식 부탁드립니다 단, 0봉전~10봉전까지의 모든종목을 검색 2) 지수이평을 백분율로 나타낸 키움수식입니다. 지수이평이 밑바닥에서 고개를 처음들때의 종목을 검색하고자 합니다.(일봉) 검색식부탁드려요 --수식-- A=EAVG(C,기간); ((A-lowest(A,기간))/(highest(A,기간)-lowest(A,기간)))*100; 기간 120 3) 양봉캔들이 20이평(단순)을 돌파하는(관통) 검색식 4) 양봉캔들이 일목 기준선을 돌파하는(관통) 검색식 5) 아래는 키움수식입니다. 일봉기준 상승할때 종목 검색식 부탁드립니다. 단,0봉전~ 10봉전 까지의 모든 종목을 검색 --수식-- sum(v* ((Pow((C-L),2) - Pow((H-C),2)) / (H - L)) )
프로필 이미지
일지매7
2024-12-25
714
글번호 186587
종목검색
답변완료

질문드리겠습니다

이전글에서 crossup, crossdown 사용자 함수 내용이 어떻게 되는지 여쭤봤는데요 각각 crossu, crossd 이라는 이름으로 직접 만들려고 한다면 작성을 어떻게 해야되는지 여쭤본거에요 아래 답변주신 내용은 그냥 단순 의미이고,,, 함수에 사용된 코드가 궁금해서요.. CrossUp(A,B) A >= B and A[1] < B[1] CrossDown(A,B) A <= B and A[1] > B[1]
프로필 이미지
yamu
2024-12-24
703
글번호 186581
사용자 함수
답변완료

파워종목검색 질문

파워종목검색에서 조건A를 검색할 경우 (1번질문)1봉전 A조건을 만족하지 않고, 0봉전 A조건을 만족하는 조건식을 만들수 있나요? (2번질문)일거래대금 100억이상 또는 일거래량 10만주이상 종목을 지정할수 있나요? 혹시 이런 것들은 예스랭귀지로 편집기 작성해야 하나요? var : a(0),b(0),d(0),e(0),Ev(0); a=adx(11); b=((C - C[10]) / C[10])*100; d=(ma(V,5)-ma(V,10))/ma(V,10)*100; e=cci(20); Ev=ENVELOPEUP(70,3); if C>Ev and a[1] <= a and b >= 0 and d >= 0 and e >= 0 and diplus(14) > diminus(14) Then Find(1); 위의 조건식이 1봉전에는 만족하지 않고, 0봉전에 만족하는 조건을 만들수 있나요?
프로필 이미지
보이저
2024-12-24
682
글번호 186578
종목검색
답변완료

조건검색식 부탁드립니다.

항상감사하고 감사드립니다 연말 잘보내세요 신호1 h>c(1)*1.15 && c>o && c<c(1) * 1.07 && h>c * 1.1 && (거래대금 > 5000 or highest(거래대금(1),10)<거래대금) && c<eavg(c,224) 신호 2 조건= h>c(1)*1.15 && c>o && c<c(1) * 1.07 && h>c * 1.1 && (거래대금 > 5000 or highest(거래대금(1),10)<거래대금) && c<eavg(c,224); 기준가=valuewhen(1,조건,c); 기준봉상승률=valuewhen(1,조건, c/c(1)*100-100); 현재봉상승률=c/c(1)*100-100; 조건2= c>기준가*1.015 && c>c(1)*1.015 && c<c(1)*1.08 && 기준봉상승률+현재봉상승률<= 10 && barssince(조건)<5 && (eavg(c,10) <c or eavg(c,20) <c); 조건2&&!조건2(1)
프로필 이미지
날자삽사리
2024-12-24
685
글번호 186576
검색
답변완료

도사님 도움부탁드려요.

1.오늘시가가 전일시가보다 높으면 " ~~ " 이다. 오늘시가가 전일시가보다 높으면 " ~~ " 이다. 2. 텍스트2 창에 텍스트로 설정. ( 글자크기,굵기,색상 변경가능 ) 3. 변수 설정 (정배열일때, 역배열일때.) " ~~ " 로 바뀜. input : ShortPeriod(38), LongPeriod(62); var : EmaFast(0), EmaSlow(0), Trend(0); EmaFast = ema(C, ShortPeriod); EmaSlow = ema(C, LongPeriod); if CrossUp(EmaFast, EmaSlow) Then Trend = -1; if CrossDown(EmaFast, EmaSlow) Then Trend = 1; Plot1(Trend, "UpTrend", IFf(Trend == -1, RED, GREEN) ,0, 5); if EmaFast > EmaSlow and C < EmaFast Then plot2(-0.97,"정배열조정",RGB(255,102,0) ,0, 8); if EmaFast < EmaSlow and C > EmaFast Then plot3(0.97,"역배열조정",RGb(0,128,255) ,0, 8); if EmaFast > EmaSlow Then PlotBaseLine1(1,"기준선1",RGb(10,10,10)); if EmaFast < EmaSlow Then PlotBaseLine2(-1,"기준선2",RGb(10,10,10));
프로필 이미지
아이덜
2024-12-24
626
글번호 186575
지표
답변완료

도와주세요

1.plot1목표에 닿거나 도달했을때마다, 추세선연결 및 꼭지점도형모양 2. plot1 ~6 소추세 , 7~12 대추세 ////////////////////////////////////////////////////////////// Plot1(var1,"상승목표"); --------- Plot2(var2,"HH1"); ]] Plot3(var3,"LL"); ]] Plot4(var4,"하락목표"); #녹밴 하락대칭 ]] Plot5(var5,"LL1"); ]] Plot6(var6,"HH"); --------- Plot7(var7,"하락목표1"); --------- Plot8(var8,"상승목표1"); ]] Plot9(var1+PriceScale,"상승목표+"); ]] Plot10(var8+PriceScale,"상승목표1+"); ]] Plot11(var4-PriceScale,"하락목표-"); ]] Plot12(var7-PriceScale,"하락목표1-"); --------- /////////////////////////////////////////////////////////////////////////////////// Input : AF(0.02), AFMAX(0.2); Var : Direction(0), SAR_Value(Close), AF_Value(.02), HighValue(High), LowValue(Low), EP(0),CSarv(0); if EP != 0 Then { if Direction == 1 then { EP = HighValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if High > HighValue then { HighValue = High; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } if Close < SAR_Value then { Direction = -1; SAR_Value = EP; AF_Value = 0; EP = 0; LowValue = low; } } else { EP = LowValue; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if Low < LowValue then { LowValue = Low; AF_Value = AF_Value + Af; if AF_Value >= AFMAX then AF_Value = AFMAX; } if Close > SAR_Value then { Direction = 1; SAR_Value = EP; AF_Value = 0; EP = 0; HighValue = High; } } CSarv = SAR_Value; } else { if SAR_Value != 0 && EP == 0 then { if Direction == 1 then { EP = HighValue; AF_Value = AF; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if High > HighValue then { HighValue = High; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } } else { EP = LowValue; AF_Value = Af; SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value); if Low < LowValue then { LowValue = Low; AF_Value = AF_Value + AF; if AF_Value >= AFMAX then AF_Value = AFMAX; } } CSarv = SAR_Value; } else { if Direction == 0 then { if Close > Close[1] then Direction = 1; else if Close < Close[1] then Direction = -1; } else { if Direction == 1 then { if Close < Close[1] then { Direction = -1; SAR_Value = HighValue; CSarv = SAR_Value; } } if Direction == -1 then { if Close > Close[1] then { Direction = 1; SAR_Value = LowValue; CSarv = SAR_Value; } } } LowValue = min(Low, LowValue); HighValue = max(High, HighValue); } } var : t(0),hh(0),hl(0),lh(0),ll(0); var : hh1(0),hl1(0),lh1(0),ll1(0); var : hh2(0),hl2(0),lh2(0),ll2(0); if CrossUp(C,CSarv) Then { t = 1; hh = h; hl = l; hh1 = hh[1]; hl1 = hl[1]; var1 = hh1*2-ll; Var2 = hh1; Var3 = ll; Var7 = ll*2-hh1; Var9 = CSarv; } if CrossDown(C,CSarv) Then { t = -1; lh = h; ll = l; lh1 = lh[1]; ll1 = ll[1]; var4 = ll1*2-hh; Var5 = ll1; Var6 = hh; Var8 = hh*2-ll1; Var10= CSarv; } if t == 1 Then { if h > hh Then hh = h; if l < hl Then hl = h; } if t == -1 Then { if h > lh Then lh = h; if l < ll Then ll = l; } Plot1(var1,"상승목표"); Plot2(var2,"HH1"); Plot3(var3,"LL"); Plot4(var4,"하락목표"); #녹밴 하락대칭 Plot5(var5,"LL1"); Plot6(var6,"HH"); Plot7(var7,"하락목표1"); Plot8(var8,"상승목표1"); Plot9(var1+PriceScale,"상승목표+"); Plot10(var8+PriceScale,"상승목표1+"); Plot11(var4-PriceScale,"하락목표-"); Plot12(var7-PriceScale,"하락목표1-"); var : tx1(0),tx2(0),tx3(0),tx4(0); var : tx5(0),tx6(0),tx7(0),tx8(0); var : tx9(0),tx10(0),tx11(0),tx12(0); if var1 != var1[1] Then { tx1 = text_new(sDate,sTime,var1,"상승목표"); Text_SetStyle(tx1,0,0); Text_SetColor(tx1,Black); Text_SetSize(tx1,12); } Else Text_SetLocation(tx1,sDate,sTime,var1); if var2 != var2[1] Then { tx2 = text_new(sDate,NextBarStime,var2,"HH1"); Text_SetStyle(tx2,0,0); Text_SetColor(tx2,Black); Text_SetSize(tx2,12); } Else Text_SetLocation(tx2,sDate,sTime,var2); if var3 != var3[1] Then { tx3 = text_new(sDate,NextBarStime,var3,"LL"); Text_SetStyle(tx3,0,0); Text_SetColor(tx3,Black); Text_SetSize(tx3,12); } Else Text_SetLocation(tx3,sDate,sTime,var3); if var4 != var4[1] Then { tx4 = text_new(sDate,NextBarStime,var4,"하락목표"); Text_SetStyle(tx4,0,0); Text_SetColor(tx4,Black); Text_SetSize(tx4,12); } Else Text_SetLocation(tx4,sDate,sTime,var4); if var5 != var5[1] Then { tx5 = text_new(sDate,NextBarStime,var5,"LL1"); Text_SetStyle(tx5,0,0); Text_SetColor(tx5,Black); Text_SetSize(tx5,12); } Else Text_SetLocation(tx5,sDate,sTime,var5); if var6 != var6[1] Then { tx6 = text_new(sDate,NextBarStime,var6,"HH"); Text_SetStyle(tx6,0,0); Text_SetColor(tx6,Black); Text_SetSize(tx6,12); } Else Text_SetLocation(tx6,sDate,sTime,var6); if var7 != var7[1] Then { tx7 = text_new(sDate,NextBarStime,var7,"하락목표1"); Text_SetStyle(tx7,0,0); Text_SetColor(tx7,Black); Text_SetSize(tx7,12); } Else Text_SetLocation(tx7,sDate,sTime,var7); if var8 != var8[1] Then { tx8 = text_new(sDate,NextBarStime,var8,"상승목표1"); Text_SetStyle(tx8,0,0); Text_SetColor(tx8,Black); Text_SetSize(tx8,12); } Else Text_SetLocation(tx8,sDate,sTime,var8); if var1 != var1[1] Then { tx9 = text_new(sDate,NextBarStime,var1+PriceScale,"상승목표+"); Text_SetStyle(tx9,0,2); Text_SetColor(tx9,Black); Text_SetSize(tx9,12); } Else Text_SetLocation(tx9,sDate,sTime,var1+PriceScale); if var8 != var8[1] Then { tx10 = text_new(sDate,NextBarStime,var8+PriceScale,"상승목표1+"); Text_SetStyle(tx10,0,0); Text_SetColor(tx10,Black); Text_SetSize(tx10,12); } Else Text_SetLocation(tx10,sDate,sTime,var8+PriceScale); if var4 != var4[1] Then { tx11 = text_new(sDate,NextBarStime,var4-PriceScale,"하락목표-"); Text_SetStyle(tx11,0,1); Text_SetColor(tx11,Black); Text_SetSize(tx11,12); } Else Text_SetLocation(tx11,sDate,sTime,var4-PriceScale); if var7 != var7[1] Then { tx12 = text_new(sDate,NextBarStime,var7-PriceScale,"하락목표1-"); Text_SetStyle(tx12,0,4); Text_SetColor(tx12,Black); Text_SetSize(tx12,12); } Else Text_SetLocation(tx12,sDate,sTime,var7-PriceScale);
프로필 이미지
아이덜
2024-12-24
627
글번호 186570
지표
답변완료

수고하십니다

항상노고에 감사 드리며 즐거운 크리스마스 보내시길바라며 변환 부탁드립니다 indicator('Levels Strength Index [BigBeluga]', overlay = true, max_lines_count = 500) // INPUTS ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{ int length = input.int(20, 'Length') int transp = input.int(5, 'Levels Transparency', minval = 2, maxval = 10) string trend_col = input.string('Neutral', 'Price Color', ['Trend', 'Neutral', 'None']) color up_color = input.color(#17e05a, '', inline = 'col') color dn_color = input.color(#db621c, '', inline = 'col') float src = close // } // CALCULATIONS――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{ var level = array.new<float>(11) series int strength = 0 series float Lower_band = ta.lowest(length) series float Upper_band = ta.highest(length) series float step = (Upper_band - Lower_band) / 10 for i = 0 to 10 by 1 level.set(i, Lower_band + step * i) float lvl = level.get(i) bool cross_up = ta.crossover(src, lvl) bool cross_dn = ta.crossunder(src, lvl) if cross_up strength := strength + 1 strength if cross_dn strength := strength - 1 strength series float price = barstate.islast ? level.get(strength) : close draw_label(level1, level2, src) => if barstate.islast lvl = (level1 + level2) / 2 label.delete(label.new(bar_index + 1, lvl, src > level1 ? '▲' : '▼', textcolor = src > level1 ? up_color : dn_color, color = color(na), style = label.style_label_center)[1]) col1 = src < level.get(1) ? color.new(dn_color, 100 - transp * 11) : color.new(up_color, 100 - transp * 1) col2 = src > level.get(1) ? color.new(up_color, 100 - transp * 2) : color.new(dn_color, 100 - transp * 10) col3 = src > level.get(2) ? color.new(up_color, 100 - transp * 3) : color.new(dn_color, 100 - transp * 9) col4 = src > level.get(3) ? color.new(up_color, 100 - transp * 4) : color.new(dn_color, 100 - transp * 8) col5 = src > level.get(4) ? color.new(up_color, 100 - transp * 5) : color.new(dn_color, 100 - transp * 7) col6 = src > level.get(5) ? color.new(up_color, 100 - transp * 6) : color.new(dn_color, 100 - transp * 6) col7 = src > level.get(6) ? color.new(up_color, 100 - transp * 7) : color.new(dn_color, 100 - transp * 5) col8 = src > level.get(7) ? color.new(up_color, 100 - transp * 8) : color.new(dn_color, 100 - transp * 4) col9 = src > level.get(8) ? color.new(up_color, 100 - transp * 9) : color.new(dn_color, 100 - transp * 3) col10 = src > level.get(9) ? color.new(up_color, 100 - transp * 10) : color.new(dn_color, 100 - transp * 2) col11 = src > level.get(10) ? color.new(up_color, 100 - transp * 11) : color.new(dn_color, 100 - transp * 1) // } // PLOT ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{ color color = switch trend_col 'Trend' => color.from_gradient(strength, 4, 6, dn_color, up_color) 'Neutral' => chart.fg_color 'None' => color(na) disp = display.all p0 = plot(level.get(0), display = disp, color = col1) p1 = plot(level.get(1), display = disp, color = col2) p2 = plot(level.get(2), display = disp, color = col3) p3 = plot(level.get(3), display = disp, color = col4) p4 = plot(level.get(4), display = disp, color = col5) p5 = plot(level.get(5), display = disp, color = col6) p6 = plot(level.get(6), display = disp, color = col7) p7 = plot(level.get(7), display = disp, color = col8) p8 = plot(level.get(8), display = disp, color = col9) p9 = plot(level.get(9), display = disp, color = col10) p10 = plot(level.get(10), display = disp, color = col11) fill(p0, p1, col1) fill(p1, p2, col2) fill(p2, p3, col3) fill(p3, p4, col4) fill(p4, p5, col5) fill(p5, p6, col6) fill(p6, p7, col7) fill(p7, p8, col8) fill(p8, p9, col9) fill(p9, p10, col10) if barstate.islast color col_grad = strength > 5 ? up_color : dn_color float level_ = level.get(strength) float stren = strength * 10 draw_label(level.get(0), level.get(1), src) draw_label(level.get(1), level.get(2), src) draw_label(level.get(2), level.get(3), src) draw_label(level.get(3), level.get(4), src) draw_label(level.get(4), level.get(5), src) draw_label(level.get(5), level.get(6), src) draw_label(level.get(6), level.get(7), src) draw_label(level.get(7), level.get(8), src) draw_label(level.get(8), level.get(9), src) draw_label(level.get(9), level.get(10), src) label.delete(label.new(bar_index + 1, level_, str.tostring(100 - stren, format.percent) + '▼ | ' + str.tostring(stren, format.percent) + '▲', color = color.new(col_grad, 50), style = label.style_label_left, textcolor = col_grad)[1]) line.delete(line.new(bar_index, level_, bar_index + 1, level_, color = color.new(col_grad, 50))[1]) plot(price, color = color, linewidth = 3) // }
프로필 이미지
비듬싸순
2024-12-24
669
글번호 186564
지표