커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

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

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

트레이딩뷰 지표 변환 요청

트레이딩뷰 지표소스로 종목 검색식을 만들고 싶은데 가능할까요? 지표상 Buy 신호 종목 검색을 하고 싶습니다. //@version=4 study("Hull Trend", shorttitle="HMA Trend",overlay=true) length = input(24) src = input(hl2) showcross = input(true, "Show cross over/under") hma(_src, _length)=> wma((2 * wma(_src, _length / 2)) - wma(_src, _length), round(sqrt(_length))) hma3(_src, _length)=> p = length/2 wma(wma(close,p/3)*3 - wma(close,p/2) - wma(close,p),p) a = hma(src, length) b = hma3(src, length) c = b > a ? color.lime : color.red p1 = plot(a,color=c,linewidth=1,transp=75) p2 = plot(b,color=c,linewidth=1,transp=75) fill(p1,p2,color=c,transp=55) crossdn = a > b and a[1] < b[1] crossup = b > a and b[1] < a[1] plotshape(showcross and crossdn ? a : na, location=location.absolute, style=shape.labeldown, color=color.red, size=size.tiny, text="Sell", textcolor=color.white, transp=0, offset=-1) plotshape(showcross and crossup ? a : na, location=location.absolute, style=shape.labelup, color=color.green, size=size.tiny, text="Buy", textcolor=color.white, transp=0, offset=-1)
프로필 이미지
무서운라냐
2025-06-20
390
글번호 191949
종목검색
답변완료

수식변환요청

수고 많으십니다 다음 수식 변환 부탁드립니다 A=avg(V,5); B1=( (avg(ma(v, n, 단순),Period)+D*stdev(ma(v, n, 단순),Period)) - (avg(ma(v, n, 단순),Period)-D*stdev(ma(v, n, 단순),Period))) / avg(ma(v, n, 단순),Period); 조건=V>A && B1>=비율1 조건 && !조건(1)
프로필 이미지
김승빈
2025-06-20
300
글번호 191948
종목검색
답변완료

부틱드립니다

수고하십니다 예스로 부탁드립니다 // This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) https://creativecommons.org/licenses/by-nc-sa/4.0/ // &#169; LuxAlgo //@version=5 indicator("Order Block Detector [LuxAlgo]" , overlay = true , max_boxes_count = 500 , max_labels_count = 500 , max_lines_count = 500) //------------------------------------------------------------------------------ //Settings //-----------------------------------------------------------------------------{ length = input.int(5, 'Volume Pivot Length' , minval = 1) bull_ext_last = input.int(3, 'Bullish OB&#8196;' , minval = 1 , inline = 'bull') bg_bull_css = input.color(color.new(#169400, 80), '' , inline = 'bull') bull_css = input.color(#169400, '' , inline = 'bull') bull_avg_css = input.color(color.new(#9598a1, 37), '' , inline = 'bull') bear_ext_last = input.int(3, 'Bearish OB' , minval = 1 , inline = 'bear') bg_bear_css = input.color(color.new(#ff1100, 80), '' , inline = 'bear') bear_css = input.color(#ff1100, '' , inline = 'bear') bear_avg_css = input.color(color.new(#9598a1, 37), '' , inline = 'bear') line_style = input.string('&#9135;&#9135;&#9135;', 'Average Line Style' , options = ['&#9135;&#9135;&#9135;', '----', '····']) line_width = input.int(1, 'Average Line Width' , minval = 1) mitigation = input.string('Wick', 'Mitigation Methods' , options = ['Wick', 'Close']) //-----------------------------------------------------------------------------} //Functions //-----------------------------------------------------------------------------{ //Line Style function get_line_style(style) => out = switch style '&#9135;&#9135;&#9135;' => line.style_solid '----' => line.style_dashed '····' => line.style_dotted //Function to get order block coordinates get_coordinates(condition, top, btm, ob_val)=> var ob_top = array.new_float(0) var ob_btm = array.new_float(0) var ob_avg = array.new_float(0) var ob_left = array.new_int(0) float ob = na //Append coordinates to arrays if condition avg = math.avg(top, btm) array.unshift(ob_top, top) array.unshift(ob_btm, btm) array.unshift(ob_avg, avg) array.unshift(ob_left, time[length]) ob := ob_val [ob_top, ob_btm, ob_avg, ob_left, ob] //Function to remove mitigated order blocks from coordinate arrays remove_mitigated(ob_top, ob_btm, ob_left, ob_avg, target, bull)=> mitigated = false target_array = bull ? ob_btm : ob_top for element in target_array idx = array.indexof(target_array, element) if (bull ? target < element : target > element) mitigated := true array.remove(ob_top, idx) array.remove(ob_btm, idx) array.remove(ob_avg, idx) array.remove(ob_left, idx) mitigated //Function to set order blocks set_order_blocks(ob_top, ob_btm, ob_left, ob_avg, ext_last, bg_css, border_css, lvl_css)=> var ob_box = array.new_box(0) var ob_lvl = array.new_line(0) //Fill arrays with boxes/lines if barstate.isfirst for i = 0 to ext_last-1 array.unshift(ob_box, box.new(na,na,na,na , xloc = xloc.bar_time , extend= extend.right , bgcolor = bg_css , border_color = color.new(border_css, 70))) array.unshift(ob_lvl, line.new(na,na,na,na , xloc = xloc.bar_time , extend = extend.right , color = lvl_css , style = get_line_style(line_style) , width = line_width)) //Set order blocks if barstate.islast if array.size(ob_top) > 0 for i = 0 to math.min(ext_last-1, array.size(ob_top)-1) get_box = array.get(ob_box, i) get_lvl = array.get(ob_lvl, i) box.set_lefttop(get_box, array.get(ob_left, i), array.get(ob_top, i)) box.set_rightbottom(get_box, array.get(ob_left, i), array.get(ob_btm, i)) line.set_xy1(get_lvl, array.get(ob_left, i), array.get(ob_avg, i)) line.set_xy2(get_lvl, array.get(ob_left, i)+1, array.get(ob_avg, i)) //-----------------------------------------------------------------------------} //Global elements //-----------------------------------------------------------------------------{ var os = 0 var target_bull = 0. var target_bear = 0. n = bar_index upper = ta.highest(length) lower = ta.lowest(length) if mitigation == 'Close' target_bull := ta.lowest(close, length) target_bear := ta.highest(close, length) else target_bull := lower target_bear := upper os := high[length] > upper ? 0 : low[length] < lower ? 1 : os[1] phv = ta.pivothigh(volume, length, length) //-----------------------------------------------------------------------------} //Get bullish/bearish order blocks coordinates //-----------------------------------------------------------------------------{ [bull_top , bull_btm , bull_avg , bull_left , bull_ob] = get_coordinates(phv and os == 1, hl2[length], low[length], low[length]) [bear_top , bear_btm , bear_avg , bear_left , bear_ob] = get_coordinates(phv and os == 0, high[length], hl2[length], high[length]) //-----------------------------------------------------------------------------} //Remove mitigated order blocks //-----------------------------------------------------------------------------{ mitigated_bull = remove_mitigated(bull_top , bull_btm , bull_left , bull_avg , target_bull , true) mitigated_bear = remove_mitigated(bear_top , bear_btm , bear_left , bear_avg , target_bear , false) //-----------------------------------------------------------------------------} //Display order blocks //-----------------------------------------------------------------------------{ //Set bullish order blocks set_order_blocks(bull_top , bull_btm , bull_left , bull_avg , bull_ext_last , bg_bull_css , bull_css , bull_avg_css) //Set bearish order blocks set_order_blocks(bear_top , bear_btm , bear_left , bear_avg , bear_ext_last , bg_bear_css , bear_css , bear_avg_css) //Show detected order blocks plot(bull_ob, 'Bull OB', bull_css, 2, plot.style_linebr , offset = -length , display = display.none) plot(bear_ob, 'Bear OB', bear_css, 2, plot.style_linebr , offset = -length , display = display.none) //-----------------------------------------------------------------------------} //Alerts //-----------------------------------------------------------------------------{ alertcondition(bull_ob, 'Bullish OB Formed', 'Bullish order block detected') alertcondition(bear_ob, 'Bearish OB Formed', 'bearish order block detected') alertcondition(mitigated_bull, 'Bullish OB Mitigated', 'Bullish order block mitigated') alertcondition(mitigated_bear, 'Bearish OB Mitigated', 'bearish order block mitigated') //-----------------------------------------------------------------------------}
프로필 이미지
파생돌이
2025-06-20
466
글번호 191947
지표
답변완료

키움신호를 예스트레이더 종목검색식으로 변경 부탁드립니다.

1,2번의 2가지 키움용 지표를 Macd와 연관하여 검색식으로 사용하려고 합니다. 각각의 신호를 예스트레이더 종목검색식으로 변경 부탁드립니다. 수고에 감사드립니다. 1. A=eavg(((Log(C/((((Highest(H(9),9)+Lowest(L(9),9))/2)))))+1)*50,10); AS=ma(A,9); Crossup(A,AS) 2. Hu=(HuLL(C,Period)-Hull(C(1),Period))/Hull(C(1),Period)*100; D=Hull(Hu,signal); Crossup(Hu,D)
프로필 이미지
작은소망1
2025-06-20
334
글번호 191946
종목검색
답변완료

문의 드립니다.

안녕하세요 ~ 평소 많은 지식 나눔에 감사드립니다. 현재 가격이 아래의 2가지 조건을 Cross up 하는 종목의 검색식을 부탁드립니다. 1. Stochasticsslow(12,5) 가 70 이상 과열 2. V> avg(V(1),p1) * m && C> highest(C(1),p2) 지표변수 P1 10 P2 40 m 3 감사합니다.
프로필 이미지
ikksoo
2025-06-20
281
글번호 191945
검색
답변완료

문의드립니다

if var1<Var2 Then Buy(); if var1>Var2 Then ExitLong(); if sDate != sDate[1] Then SetStopEndofday(153000); ================================ 위식처럼 당일청산식을 작성했는데.. 차트에 적용하면 어느날은 당일청산이 되고 어느날은 당일청산이 안됩니다. 왜 그럴까요? 주간차트에 적용하는 당일청산식 부탁드립니다 감사합니다
프로필 이미지
러블리
2025-06-19
266
글번호 191944
시스템
답변완료

부탁드립니다

초보자의 여러 질문에 성심껏 답변 주심에 항상 감사드립니다. 1> 아래 수식에 분홍● 생길때 봉의 고가선 종가선(연한그레이) 생기고 고가선과 종가선 사이는 연한 분홍색이 채워져 박스형식으로 생기도록 부탁드립니다. 다음 ●이 생기면 그전의 선은 없어지고 새로 생겨 선은 항상 하나만 유지합니다. 초록● 저가선 종가선 (연한그레이) --- 연한 연두색 채워지게 ● 생길때 알림음 지원될 수 있는 방법도 부탁드립니다. input : 분(60),틱수(20); var : S1(0),D1(0),TM(0),TF(0),tx1(0),tx2(0); var : OO(0),HH(0),LL(0); if Bdate != Bdate[1] Then { S1 = TimeToMinutes(stime); D1 = sdate; } if D1 > 0 then { if sdate == D1 Then TM = TimeToMinutes(stime)-S1; Else TM = TimeToMinutes(stime)+1440-S1; TF = TM%분; if Bdate != Bdate[1] or (Bdate == Bdate[1] and 분 > 1 and TF < TF[1]) or (Bdate == Bdate[1] and 분 > 1 and TM >= TM[1]+분) or (Bdate == Bdate[1] and 분 == 1 and TM > TM[1]) Then { OO = O; HH = H; Condition1 = false; LL = L; Condition2 = False; } if h > HH Then { HH = H; if HH >= OO+PriceScale*틱수 Then { if Condition1 == false Then { tx1 = text_new(sDate,sTime,HH,"●"); Text_SetColor(tx1,rgb(255, 0, 255)); Text_SetStyle(tx1,2,1); Text_SetSize(tx1,24); } Else { Text_SetLocation(tx1,sDate,sTime,HH); } Condition1 = true; } } if Condition1 == true and L <= HH*0.75 Then { Text_Delete(tx1); Condition1 = False; } if L < LL Then { LL = L; if LL <= OO-PriceScale*틱수 Then { if Condition2 == False Then { tx2 = text_new(sDate,sTime,LL,"●"); Text_SetColor(tx2,rgb(0, 194, 136)); Text_SetStyle(tx2,2,0); Text_SetSize(tx2,24); } Else { Text_SetLocation(tx2,sDate,stime,LL); } Condition2 = true; } } if Condition2 == true and H >= LL*1.25 Then { Text_Delete(tx2); Condition2 = False; } } Plot1(OO); ____________________ 2> 기준선인 50선을 통과시 통과한 봉 위 아래에 "●" 20정도 크기로 나타나게 부탁드립니다 기준선에는 통과시 작은 화살표 위아래표시도 부탁드립니다. input : length(14); input : smoType1(3); #1:EMA, 2:SMA, 3:RMA, 4TMA input : arsiCss(silver); input : autoCss(true); //Signal Line input : smooth(14); input : smoType2(1);#1EMA, 2SMA, 3RMA, 4TMA input : signalCss(Orange); //OB/OS Style input : obValue(80); input : obCss(Green); input : obAreaCss(LightGreen); input : osValue(20); input : osCss(Red); input : osAreaCss(LightRed); var : src(0); var : upper(0),lower(0),r(0); var : d(0),diff(0),alpha(0),num(0),den(0),arsi(0),signal(0),a(0),tx(0); src = close; upper = highest(src, length); lower = lowest(src, length); r = upper - lower; d = src - src[1]; diff = iff(upper > upper[1] , r , iff(lower < lower[1] , -r , d)); if smoType1 == 1 Then { num = ema(diff, length); den = ema(abs(diff), length); } if smoType1 == 2 Then { num = ma(diff, length); den = ma(abs(diff), length); } if smoType1 == 3 Then { alpha = 1/length; num = iff(isnan(num[1]) == true, ma(diff, length) , alpha * diff + (1 - alpha) * iff(isnan(num[1])==true,0,num[1])); den = iff(isnan(den[1]) == true, ma(abs(diff), length) , alpha * abs(diff) + (1 - alpha) * iff(isnan(den[1])==true,0,den[1])); } if smoType1 == 4 Then { num = ma(ma(diff, length),length); den = ma(ma(abs(diff), length), length); } arsi = num / den * 50 + 50; if smoType2 == 1 Then { signal = ema(arsi, smooth); } if smoType2 == 2 Then { signal = ma(arsi, smooth); } if smoType2 == 3 Then { a = 1/smooth; signal = iff(isnan(signal[1]) == true, ma(arsi, length) , a * arsi + (1 - a) * iff(isnan(signal[1])==true,0,signal[1])); } if smoType2 == 4 Then { signal = ma(arsi, smooth); } plot1(arsi, "Ultimate RSI",IFf(arsi > obValue , obCss , IFF(arsi < osValue , osCss ,IFf( autoCss , Black , arsiCss)))); plot2(signal, "Signal Line", signalCss); PlotBaseLine1(obValue, "Overbought"); PlotBaseLine2(50, "Midline"); PlotBaseLine3(osValue, "Oversold"); .
프로필 이미지
어떤하루
2025-06-20
358
글번호 191943
지표
답변완료

검색식부탁드립니다

수고많습니다 피봇2차와 전일고점이 1%이내인 종목을 검색식으로부탁드립니다
프로필 이미지
달오
2025-06-19
291
글번호 191942
종목검색
답변완료

문의 드립니다.

안녕하세요 항상 감사드립니다. 아래의 서식에서 추가 서식 부탁드립니다. *청산조건추가 1. 손절: 5포인트 청산 (input) 2. 익절: 10포인트 청산 (input) *청산된 이후에는 진입횟수 이내에서 재진입가능 모두 최적화를 위해 input에 넣어주세요 감사합니다. # KOSPI 선물 10분봉 input: 당일진입횟수(3); Input: chkP(3), reChkP(10), stopChk(20); var: HH(0), LL(0), BS(0), SS(0); var: dayChk(0); var : TotalCount(0),PreDay(0),DayEntry(0); TotalCount = TotalTrades; if Bdate != Bdate[1] Then PreDay = TotalCount[1]; DayEntry = (TotalCount-PreDay)+IFF(MarketPosition != 0,1,0); if BarIndex == 0 then ClearDebug(); if dayindex == chkP then { HH = Highest(Max(C,O), chkP+1); LL = Lowest(Min(C,O), chkP+1); #if date == 20240612 then messageLog("--HH %.2f, LL: %.2f", HH, LL); } #if High >= HH and MarketPosition == 0 and ExitDate(1) < Date and time > 93000 then messageLog("HH %.2f, High: %.2f", HH, High); if DayIndex >= chkP # and Time < 95000 and sDate == NextBarSdate and EntryDate(0) < Date and EntryDate(1) < Date and DayEntry < 당일진입횟수 Then { Buy("B1", AtStop, HH); Sell("S1", AtStop, LL); } //if dayChk == 0 and High >= HH and MarketPosition == 0 and ExitDate(1) < Date and time > 93000 then { // messageLog("HH %.2f, High: %.2f", HH, High); // dayChk = 1; //} if ExitDate(1) == Date and Time < 150000 // and LatestEntryName(1) != "B2" // and LatestEntryName(1) != "S2" // and LatestEntryName(0) != "B2" // and LatestEntryName(0) != "S2" Then { if DayIndex < reChkP Then { HH = Highest(Max(C,O), DayIndex+1); LL = Lowest(Min(C,O), DayIndex+1); } Else { HH = Highest(Max(C,O), reChkP); LL = Lowest(Min(C,O), reChkP); } if DayEntry < 당일진입횟수 Then { Buy("B2", AtStop, HH); Sell("S2", AtStop, LL); } } if (MarketPosition == 1) Then { if DayIndex < stopChk Then { BS = Lowest(Min(C,O), DayIndex+1); } Else { BS = Lowest(Min(C,O), stopChk); } ExitLong("EL", AtStop, BS); } if (MarketPosition == -1) Then { if DayIndex < stopChk Then { SS = Highest(Max(C,O), DayIndex+1); } Else { SS = Highest(Max(C,O), stopChk); } #messageLog(" SS %.2f", SS); ExitShort("ES", AtStop, SS); } var : month(0),nday(0),week(0),X(False); month = int(date/100)-int(date/10000)*100; nday = date - int(date/100)*100; Week = DayOfWeek(date); #만기일 if (month%3 == 0 and nday >= 8 and nday <= 14 and week == 4) then { X = true; SetStopEndofday(151500); } Else#만기일아닐때 { X = False; SetStopEndofday(152000); }
프로필 이미지
가자아이
2025-06-19
350
글번호 191941
지표