커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

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

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

문의드립니다

#양봉갯수 if C > O Then var2 = var2+1; #음봉갯수 if C < O Then var3 = var3+1; Var4 = Var2 - Var3; ========================== 위식에서 var4 의 n일 평균 구하는 식 부탁드립니다 감사합니다
프로필 이미지
러블리
2025-06-29
282
글번호 192166
지표
답변완료

부틱드립니다

수고하십니다 예스로 부탁드립니다 // This Pine S cript™ code is subject to the terms of the Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) https://creativecommons.org/licenses/by-nc-sa/4.0/ // &#169; UAlgo //@version=5 indicator('Log Regression Channel [UAlgo]',shorttitle = 'Log Regression Channel [UAlgo]', overlay = true, max_lines_count = 500) source_input = input.source(close, title = "Source",group = "Log Regression Channel [UAlgo]") length_input = input.int(100, title='Length',group = "Log Regression Channel [UAlgo]") multiplier_input = input.int(2, title='Deviation Multiplier',group = "Log Regression Channel [UAlgo]") label_color = input.color(color.red, title='Label Color',group = "Log Regression Channel [UAlgo]") label_size_option = input.string(title='Label Size', defval='small', options=['small', 'normal', 'large', 'huge'],group = "Log Regression Channel [UAlgo]") var float[] series_price = array.new_float(length_input) var int[] series_time = array.new_int(length_input) array.unshift(series_price, source_input) array.pop(series_price) array.unshift(series_time, bar_index) array.pop(series_time) var line[] reg_lines = array.new_line() var line[] dev_up_lines = array.new_line() var line[] dev_down_lines = array.new_line() var label r_squared_label = label.new(x = na, y = na, style = label.style_label_upper_right, color = #00000000, textcolor = color.new(#FF1493, 0), size=size.large, textalign = text.align_right) float[] dev_up_series = array.new_float() float[] dev_down_series = array.new_float() var int line_step = na var int line_count = na if barstate.isfirst line_count := math.min(length_input, 250) for i = 0 to line_count - 1 array.unshift(reg_lines, line.new(x1=na, y1=na, x2=na, y2=na, color=color.red, style=line.style_solid)) if length_input > 250 line_step := math.ceil(length_input / 250) else line_step := 1 for i = 0 to math.floor(line_count / 2) - 1 array.unshift(dev_up_lines, line.new(x1=na, y1=na, x2=na, y2=na, color=color.new(#00FFFF, 0), style=line.style_solid)) array.unshift(dev_down_lines, line.new(x1=na, y1=na, x2=na, y2=na, color=color.new(#00FF00, 0), style=line.style_solid)) if barstate.islast int _length_price = array.size(series_price) int _length_time = array.size(series_time) float[] _log_price_array = array.new_float(_length_price) float[] _log_time_array = array.new_float(_length_time) for _index = 0 to _length_price - 1 array.set(_log_price_array, _index, math.log(array.get(series_price, _index))) array.set(_log_time_array, _index, math.log(array.get(series_time, _index))) float _total_log_time = array.sum(_log_time_array) float _total_log_price = array.sum(_log_price_array) float _total_log_time_price = 0.0 float _total_log_time_sq = 0.0 float _total_log_price_sq = 0.0 if _length_price == _length_time for _index = 0 to _length_price - 1 float _log_time_val = nz(array.get(_log_time_array, _index)) float _log_price_val = nz(array.get(_log_price_array, _index)) _total_log_time_price := _total_log_time_price + _log_time_val * _log_price_val _total_log_time_sq := _total_log_time_sq + math.pow(_log_time_val, 2) _total_log_price_sq := _total_log_price_sq + math.pow(_log_price_val, 2) _total_log_price_sq float _intercept = (_total_log_price * _total_log_time_sq - _total_log_time * _total_log_time_price) / (_length_time * _total_log_time_sq - math.pow(_total_log_time, 2)) float _slope_coef = (_length_time * _total_log_time_price - _total_log_time * _total_log_price) / (_length_time * _total_log_time_sq - math.pow(_total_log_time, 2)) float[] _predictions_array = array.new_float() for _index = 0 to _length_price - 1 float _predicted_val = _intercept + _slope_coef * array.get(_log_time_array, _index) array.push(_predictions_array, _predicted_val) _slope = (array.get(_predictions_array, 0) - array.get(_predictions_array, _length_price - 1)) / (array.get(_log_time_array, 0) - array.get(_log_time_array, _length_time - 1)) _mean_log_price = array.avg(_log_price_array) float _sum_squared_residuals = 0.0 float _sum_squared_totals = 0.0 for _index = 0 to _length_price - 1 float _predicted = array.get(_predictions_array, _index) float _log_price_val = array.get(_log_price_array, _index) _sum_squared_residuals := _sum_squared_residuals + math.pow(_predicted - _log_price_val, 2) _sum_squared_totals := _sum_squared_totals + math.pow(_mean_log_price - _log_price_val, 2) _sum_squared_totals _r_squared = 1 - _sum_squared_residuals / _sum_squared_totals float _sum_squared_errors = 0 for _index = 0 to _length_price - 1 _sum_squared_errors += math.pow(array.get(_predictions_array, _index) - array.get(_log_price_array, _index), 2) _std_dev = math.sqrt(_sum_squared_errors / _length_price) for i = 0 to array.size(_predictions_array) - 1 array.push(dev_up_series, math.exp(array.get(_predictions_array, i) + multiplier_input * _std_dev)) array.push(dev_down_series, math.exp(array.get(_predictions_array, i) - multiplier_input * _std_dev)) for i = 0 to array.size(_predictions_array) - 2 - line_step by line_step line.set_xy1(array.get(reg_lines, i / line_step), x=bar_index - i, y=math.exp(array.get(_predictions_array, i))) line.set_xy2(array.get(reg_lines, i / line_step), x=bar_index - i - line_step, y=math.exp(array.get(_predictions_array, i + line_step))) for i = 0 to array.size(dev_up_series) - 2 - line_step by line_step * 2 line.set_xy1(array.get(dev_up_lines, i / (line_step * 2)), x=bar_index - i, y=array.get(dev_up_series, i)) line.set_xy2(array.get(dev_up_lines, i / (line_step * 2)), x=bar_index - i - line_step, y=array.get(dev_up_series, i + line_step)) line.set_xy1(array.get(dev_down_lines, i / (line_step * 2)), x=bar_index - i, y=array.get(dev_down_series, i)) line.set_xy2(array.get(dev_down_lines, i / (line_step * 2)), x=bar_index - i - line_step, y=array.get(dev_down_series, i + line_step)) label.set_xy(r_squared_label, x = bar_index + 5, y = array.get(dev_down_series, 0)) label.set_text(r_squared_label, text = "R " + str.tostring(math.sqrt(_r_squared))) label.set_textcolor(r_squared_label, label_color) label.set_size(r_squared_label, label_size_option)
프로필 이미지
파생돌이
2025-06-28
437
글번호 192165
지표
답변완료

가변기간 문의

안녕하세요. 지난 글들을 읽어보니 highest, loewest 함수에서 기간값을 가변으로 설정할 경우 최대 1024봉까지만 계산되는것을 확인 했습니다. 혹시 특정한 기간의 경우 어떻게 해야할까요? 예) 2025년 6월 17일 07:00 부터 2025년 6월 23일 05:20 까지의 구간을 설정하고 그안에서 1024봉 이상의 highest와 lowest 최고 최저값을 구하고 싶은데용~ 그리고 추가로 plot에서 novalue는 어떻게 사용하는것인지 알려주세요~ 지표상에서 N/A로 표시되는것과 데이터툴팁에서 N/A로 표시되는것을 안보이게 하고싶어요 설정에서 체크박스를 해제하지 않고!! 항상 감사드립니다~
프로필 이미지
oni
2025-06-29
386
글번호 192164
지표
답변완료

문의 드립니다.

안녕하세요 종가가 아래의 라인을 돌파할 때 종목 검색식 부탁 드립니다. T=MACD(short,long); TS=eavg(MACD(short,long),signal); TT=TS<T; a=Stochasticsfast(Period); b=eavg(Stochasticsfast(Period),Period1); d=crossup(a,b); e=avg(c,5)<avg(c,20); AA=d && e && TT && c>=o; IF(AA,MAX(C,O),0) 지표조건 short 12 long 26 signal 9 Period 5 Period1 3 감사합니다.
프로필 이미지
ikksoo
2025-06-27
314
글번호 192162
검색
답변완료

종목검색 부탁드립니다.

안녕하세요 아래수식의 신호가 10봉안에 5번이상 발생한 종목을 찾으려고하는식 부탁드립니다. 감사합니다 A=H-L; B=Max(C,O)-L; 조건=A/B>배수 && H/C(1)>(1*상승률/100); 기준가=Valuewhen(1,조건,H); CrossUp(C,기준가) 변수 배수 5 상승률 18
프로필 이미지
오말리
2025-06-28
345
글번호 192161
종목검색
답변완료

질문 부탁드립니다

답변 감사드립니다 아래식에서 조건만족 시점 사이의 소요된 영업일 수는 value1이 맞나요? 그리고 if h>l*1.08 ... 조건 사이 소요된 시간 단위를 알 수 있을까요 시간단위는 시간, 분 으로 해주시면 감사하겠습니다 질문2) 배열 hh[cnt] 사이의 시간차 관련 수식을 작성하고자 합니다 hh[n] 과 hh[n+1] 의 시간차를 구해서 가장 시간차가 짧은 값을 구하고 싶습니다 예를들어 hh[0]발생시간과 hh[1] 발생시간의 시간차, hh[1] 과 hh[2] 의 시간차...hh[19] 와 hh[20] 의 차 를 구해서 가장 짧은 값을 계산 하고 싶습니다 감사합니다 if Bdate != Bdate[1] Then { DD = DD+1; } if (h>l*1.08) and (d1 == 0 or (d1 > 0 and dd >= d1+5)) Then { d1=dd; value1 = dd; var1=index; var2=var1[1]; var3=h; for cnt = 1 to (var1-var2)-1 { if h[cnt] > var3 then { var3=h[cnt]; } } for cnt = 49 downto 1 { hh[cnt]=hh[cnt-1]; } hh[0]=var3; ... }
프로필 이미지
yamu
2025-06-27
295
글번호 192160
지표

가자아이 님에 의해서 삭제되었습니다.

프로필 이미지
가자아이
2025-06-27
9
글번호 192159
지표
답변완료

93339 재질문 답변요청드립니다

93339 재질문 답변요청드립니다 감사합니다
프로필 이미지
뮬란
2025-06-27
291
글번호 192158
시스템
답변완료

예스트레이더 수식으로 변환 부탁 드립니다.

Volumatic Trend 지표를 예스로 변환 부탁 드립니다. 주말 행복하게 보내세요~ 감사합니다.^^ //@version=6 indicator("Volumatic Trend [ChartPrime]", overlay = true, max_bars_back = 5000) // --------------------------------------------------------------------------------------------------------------------} // &#128204; &#120400;&#120398;&#120384;&#120397; &#120388;&#120393;&#120395;&#120400;&#120399;&#120398; // --------------------------------------------------------------------------------------------------------------------{ int length = input.int(40) bool vol_h = input.bool(true, "Volume Histogram") color color_up = input.color(#247ac0, "Up Trend") color color_dn = input.color(#c88829, "Down Trend") var upper = float(na) var lower = float(na) var lower_vol = float(na) var upper_vol = float(na) var step_up = float(na) var step_dn = float(na) var last_index = int(na) // --------------------------------------------------------------------------------------------------------------------} // &#128204; &#120388;&#120393;&#120383;&#120388;&#120382;&#120380;&#120399;&#120394;&#120397; &#120382;&#120380;&#120391;&#120382;&#120400;&#120391;&#120380;&#120399;&#120388;&#120394;&#120393;&#120398; // --------------------------------------------------------------------------------------------------------------------{ ema_swma(x, length) => ta.ema(x[3] * 1 / 6 + x[2] * 2 / 6 + x[1] * 2 / 6 + x[0] * 1 / 6, length) atr = ta.atr(200) ema1 = ema_swma(close, length) ema2 = ta.ema(close, length) trend = ema1[1] < ema2 if trend != trend[1] upper := ema1 + atr * 3 lower := ema1 - atr * 3 lower_vol := lower + atr*4 upper_vol := upper - atr*4 step_up := (lower_vol-lower) / 100 step_dn := (upper-upper_vol) / 100 last_index := bar_index vol = int(volume / ta.percentile_linear_interpolation(volume, 1000, 100) * 100) vol_up = step_up * vol vol_dn = step_dn * vol // --------------------------------------------------------------------------------------------------------------------} // &#128204; &#120401;&#120388;&#120398;&#120400;&#120380;&#120391;&#120388;&#120405;&#120380;&#120399;&#120388;&#120394;&#120393; // --------------------------------------------------------------------------------------------------------------------{ color color = trend ? color_up : color_dn color grad_col = color.from_gradient(vol, 0, 25, chart.bg_color, color) color grad_col1 = color.from_gradient(vol, 0, 10, chart.bg_color, color) color col_vol_up = trend ? grad_col : color(na) color col_vol_dn = not trend ? grad_col : color(na) plotcandle(open, high, low, close, title='Volumatic Candles Trend', color = grad_col1, wickcolor=grad_col1, bordercolor = grad_col1, force_overlay = true) plotcandle(lower, lower, lower + vol_up, lower + vol_up, title='Volume Up Trend', color = col_vol_up, wickcolor=col_vol_up, bordercolor = col_vol_up, display = vol_h ? display.all : display.none, editable = false, force_overlay = true) plotcandle(upper, upper, upper - vol_dn, upper - vol_dn, title='Volume Down Trend', color = col_vol_dn, wickcolor=col_vol_dn, bordercolor = col_vol_dn, display = vol_h ? display.all : display.none, editable = false, force_overlay = true) plot(trend and vol_h ? na : upper, color = color, style = plot.style_linebr, display = vol_h ? display.all : display.none, editable = false, force_overlay = true) plot(trend and vol_h ? lower : na, color = color, style = plot.style_linebr, display = vol_h ? display.all : display.none, editable = false, force_overlay = true) plot(ema1, "Trend Line", color = color.new(color, 20), linewidth = 2, force_overlay = true) plotshape(trend != trend[1] ? ema1[1] : na, "Trend Change", shape.diamond, location.absolute, color = color, size = size.tiny, offset = -1, force_overlay = true) volume_ = close > open ? volume : -volume if barstate.islast delta = 0. total = 0. for i = 0 to (bar_index - last_index) total += volume[i] delta += volume_[i] lblb = label.new(bar_index, vol_h ? (trend ? lower + vol_up : upper - vol_dn) : ema1 , "Delta > "+str.tostring(delta, format.volume) + "₩n" + "--------------------" + "₩n" + "Total > "+str.tostring(total, format.volume) , textalign = text.align_left , style = label.style_label_left, color = grad_col1) label.delete(lblb[1])
프로필 이미지
니콜라스킹
2025-06-27
408
글번호 192157
지표