커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

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

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

진입횟수 조절

안녕하세요 일 진입횟수를 1~10회까지 변경 적용할 수 있도록 수식 부탁드리빈다. 진입 수식은 매수 crossup(C,H[10]) then buy 매도 crossdown(C, L[10]) then sell 이 두가지로 적용해주시면 됩니다.
프로필 이미지
소드노
2025-06-20
281
글번호 191952
시스템
답변완료

부틱드립니다

수고하십니다 매번 부탁드려서 죄송합니다 예스로 변경드립니다 // This Pine S cript™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ // &#169; ChartPrime //@version=5 indicator('Linear Regression Channel', overlay = true, max_lines_count = 3) // ---------------------------------------------------------------------------------------------------------------------} // &#120400;&#120398;&#120384;&#120397; &#120388;&#120393;&#120395;&#120400;&#120399;&#120398; // ---------------------------------------------------------------------------------------------------------------------{ bool bands = input.bool(true, "Plot Linear Regression Bands", group = "Settings Bands") int window = input.int(150, "Length", group = "Settings Bands") float devlen_b = input.float(3., "Deviation Linear Regression Bands",step=0.1, group = "Settings Bands") bool channel = input.bool(false, "Plot Linear Regression Channel", group = "Settings Channel") int window1 = input.int(150, "Channel Length", group = "Settings Channel") float devlen1 = input.float(1., "Deviation Linear Regression Channel",step=0.1, group = "Settings Channel") bool channel1 = input.bool(false, "Plot Future Projection of linear regression", group = "Future Projection Channel") bool arr_dirc = input.bool(false, "Plot Arrow Direction", group = "Future Projection Channel") int window2 = input.int(50, "Length", group = "Future Projection Channel") float devlen2 = input.float(1., "Deviation Future Projection Regression Channel",step=0.1, group = "Future Projection Channel") // Define colors for up, down, and mid lines color col_dn = #f01313 color col_up = color.aqua color col_mid = color.yellow color gray = color.gray color fg_col = chart.fg_color // Regression Channel Arrays Line var reglines = array.new_line(3) var reglines_ = array.new_line(3) // ---------------------------------------------------------------------------------------------------------------------} // &#120388;&#120393;&#120383;&#120388;&#120382;&#120380;&#120399;&#120394;&#120397; &#120382;&#120380;&#120391;&#120382;&#120400;&#120391;&#120380;&#120399;&#120388;&#120394;&#120393;&#120398; // ---------------------------------------------------------------------------------------------------------------------{ //@function linear_regression //@des cription Calculates linear regression coefficients for a given source and window. //@param src (series float) The data series on which linear regression is calculated. //@param window (int) The number of bars to use in the calculation. //@returns the intercept slope, Deviation, end of the channel. linear_regression(src, window) => sum_x = 0.0 sum_y = 0.0 sum_xy = 0.0 sum_x_sq = 0.0 // Calculate sums for i = 0 to window - 1 by 1 sum_x += i + 1 sum_y += src[i] sum_xy += (i + 1) * src[i] sum_x_sq += math.pow(i + 1, 2) // Calculate linear regression coefficients slope = (window * sum_xy - sum_x * sum_y) / (window * sum_x_sq - math.pow(sum_x, 2)) intercept = (sum_y - slope * sum_x) / window y1 = intercept + slope * (window - 1) dev = 0.0 for i = 0 to window - 1 dev := dev + math.pow(src[i] - (slope * (window - i) + intercept), 2) dev := math.sqrt(dev/window) [intercept, y1, dev, slope] [y2, y1, dev, slope] = linear_regression(close, window) [y2_, y1_, dev_, slope_] = linear_regression(close, window1) [y2__, y1__, dev__, slope__] = linear_regression(close, window2) // Linear Regression Channel Lines series float mid = y2 + slope series float upper = mid + ta.rma(high - low, window) * devlen_b series float lower = mid - ta.rma(high - low, window) * devlen_b // Returns True for window length period isAllowed = (last_bar_index - bar_index < window1) // ---------------------------------------------------------------------------------------------------------------------} // &#120401;&#120388;&#120398;&#120400;&#120380;&#120391;&#120388;&#120405;&#120380;&#120399;&#120388;&#120394;&#120393; // ---------------------------------------------------------------------------------------------------------------------{ // Plot upper, lower, and mid lines if channel is not enabled p_u = plot(upper, color = bands and channel ? na : bands ? gray : na, linewidth = 2) p_l = plot(lower, color = bands and channel ? na : bands ? gray : na, linewidth = 2) p_m = plot(mid, color = bands and channel ? na : bands ? gray : na) // Fill areas between upper/mid and lower/mid lines fill(p_u, p_m, mid, upper, na, bands and channel ? na : bands ? color.new(col_up, 80) : na) fill(p_m, p_l, lower, mid, bands and channel ? na : bands ? color.new(col_dn, 80) : na, na) if barstate.islast and channel for i = 0 to 2 array.set(reglines, i, line.new(x1 = bar_index - (window1 - 1), y1 = y1_ + dev_ * devlen1 * (i - 1), x2 = bar_index, y2 = y2_ + dev_ * devlen1 * (i - 1), color = color.gray, style = i % 2 == 1 ? line.style_dashed : line.style_solid, width = 2, extend = extend.none) ) linefill.new(array.get(reglines, 1), array.get(reglines, 2), color = color.new(col_up, 90)) linefill.new(array.get(reglines, 1), array.get(reglines, 0), color = color.new(col_dn, 90)) if barstate.islast and channel1 for i = 0 to 2 array.set(reglines_, i, line.new(x1 = bar_index - (window2 - 1), y1 = y1__ + dev__ * devlen2 * (i - 1), x2 = bar_index, y2 = y2__ + dev__ * devlen2 * (i - 1), color = color.gray, style = i % 2 == 1 ? line.style_dotted : line.style_dashed, width = 1, extend = extend.right) ) linefill.new(array.get(reglines_, 1), array.get(reglines_, 2), color = color.new(col_up, 95)) linefill.new(array.get(reglines_, 1), array.get(reglines_, 0), color = color.new(col_dn, 95)) if arr_dirc l1 = label.new(chart.point.from_index(bar_index, hl2 > y2__ ? high : low), text = hl2 > y2__ ? "&#8663;" : hl2 < y2__ ? "&#8664;" : "⇒", textcolor = hl2 > y2__ ? col_up : hl2 < y2__ ? col_dn : gray, color = color(na), size = size.huge, style = label.style_label_left ) label.delete(l1[1]) // Bar Heat Map b_c = (close - lower) / (upper - lower) b_c := b_c > 1 ? 1 : b_c < 0 ? 0 : b_c bar_color = channel ? (isAllowed ? (b_c <= 0.5 ? color.from_gradient(b_c, 0, 0.5, col_up, col_mid) : color.from_gradient(b_c, 0.5, 1, col_mid, col_dn)) : na) : (b_c >= 0.5 ? color.from_gradient(b_c, 0.5, 1, col_mid, col_up) : color.from_gradient(b_c, 0, 0.5, col_dn, col_mid)) plotcandle(open, high, low, close, title = "Bar HeatMap", color = bar_color, wickcolor = bar_color, bordercolor = bar_color ) barcolor(bar_color) // Conditions for crossovers condition1 = bands and channel ? na : bands ? ta.pivotlow(3, 3) and close < lower : na condition2 = bands and channel ? na : bands ? ta.pivothigh(3, 3) and close > upper: na // Plot markers for channel break outs plotchar(condition1, "", "◆", size=size.tiny, location=location.belowbar, color = col_up) plotchar(condition2, "", "◆", size=size.tiny, location=location.abovebar, color = col_dn) // ------------------------------------------------------------------------------------
프로필 이미지
파생돌이
2025-06-20
567
글번호 191951
지표
답변완료

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

항상 노고에 감사드림니다. 아래의 수식을 종목검색식으로 부탁드림니다. A=wavg(2*wavg(scr,len/2) - wavg(scr,len), floor(sqrt(len))); A>A(1) && A(1)<A(2); A1=MM=MA(C, 기간1, 종류); MN=MA(C, 기간2, 종류); 조건=CrossUp(MM, MN); Valuewhen(1, 조건, H); Crossup(C, A, A1) 지표변수 scr 종가 len 49 기간1 5 기간2 20 종류 가중
프로필 이미지
존슨비치
2025-06-20
331
글번호 191950
종목검색
답변완료

트레이딩뷰 지표 변환 요청

트레이딩뷰 지표소스로 종목 검색식을 만들고 싶은데 가능할까요? 지표상 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
408
글번호 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
317
글번호 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
563
글번호 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
354
글번호 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
295
글번호 191945
검색
답변완료

문의드립니다

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