커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

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

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

수식변환 요청

다름 라인을 주가등락률 5% 범위 내에서 돌파하는 종목검색식 부탁드립니다. 전환선 = (highest(high,shortPeriod)+lowest(low,shortPeriod))/2; 기준선 = (highest(high,midPeriod)+lowest(low,midPeriod))/2; 선행1 = (highest(high,shortPeriod)+lowest(low,shortPeriod)+highest(high,midPeriod)+lowest(low,midPeriod))/4; 선행2 = (highest(high,longPeriod)+lowest(low,longPeriod))/2; 조건 = Crossup(선행1, 선행2) && 전환선>기준선; valueWhen(1, 조건, 선행1) ============= shortPeriod(9) midPeriod(26) longperiod(52)
프로필 이미지
saeroi
2025-06-29
408
글번호 192173
검색
답변완료

수식 문의드립니다.

안녕하세요. 항상 감사드립니다. input:con1(15000),con2(50000); var:대금(0),조건1(False),조건2(False),조건3(False),조건4(False); 대금=(H+O+L+C)/4*V/1000000; 조건1=(대금[1]>=con1 && (C[1]/O[1]-1)*100>=9 && (H[1]/O[1]-1)*100>=15 && O>C[1] && C>=C[1]*0.97); 조건2=(대금[2]>=con1 && (C[2]/O[2]-1)*100>=9 && (H[2]/O[2]-1)*100>=15 && O[1]>C[2] && C[1]>=C[2]*0.97 && O>=C[2]*0.97 && C>=C[2]*0.97); 조건3=(대금[1]>=con2 && (C[1]/O[1]-1)*100>=9 && (H[1]/O[1]-1)*100>=15 && O>C[1] && C>=C[1]*0.97); 조건4=(대금[2]>=con2 && (C[2]/O[2]-1)*100>=9 && (H[2]/O[2]-1)*100>=15 && O[1]>C[2] && C[1]>=C[2]*0.97 && O>=C[2]*0.97 && C>=C[2]*0.97); if(조건1 or 조건2) or (조건3 or 조건4) TheN FinD(1); 위와 같이 일봉에서 종목검색 사용하고 있는데 주봉으로 변경하고 싶습니다. C H O L V 수식 주봉으로 변경하려면 어떻게 바꿔야 될까요?
프로필 이미지
vhouse
2025-06-29
390
글번호 192172
종목검색
답변완료

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

여러 질문에 답해주신 것에 감사드리며,아래의 복합지표에 대한 검색식을 부탁드립니다. 감사합니다. 건강하세요~ M=MACD(short,long); CC=CCI(Period1); S=eavg(StochasticsSlow(sto1,sto2),sto3); R=RSI(Period2); MCSR=(M+CC+S+R)/4; Crossup (MCSR,100) or MCSR>100 지표변수 short 12 long 26 Period1 9 Period2 14 sto1 12 sto2 5 sto3 5
프로필 이미지
작은소망1
2025-06-29
361
글번호 192171
종목검색
답변완료

하루동안에 특정시간대만 표시되는 고,저가

안녕하세요 하루 동안에 16:00에서16:10에서의 고가와 저가표시 22:30에서 22:40에서의 고가와 저가표시를 하는 지표를 그리고 싶은데요 보통 수평선 차트를 보면 계단으로 어저깨 그저깨 것들고 나오는데요 당일것만 표시돼게가능한지 수식 부탁드립니다 제가 나름한것은 지정한 시간에서의 고저가가 안나오고 00:00~00:10의고저가와지정한 시간대의 고가만 나옵니다 왜이런지 하여튼 선생님의 오류없는 수식 부탁드립니다 Input :시작(223000),마감(224000); if date != date[1] Then{ var1 = H; var2 = L; } if stime >= 시작 and stime <= 마감 Then{ if H >= var1 Then var1 = H; if L <= var2 Then var2 = L; } plot1(var1); plot2(var2);
프로필 이미지
행복이
2025-06-29
428
글번호 192170
지표
답변완료

수식문의

수고많으십니다. 항상 감사드립니다. 그물망 차트를 이용하여 시스템을 만들어 보려합니다. 1. 매수진입 1-1 매수진입 조건 - 이동평균선(ex:단순 20)이 상승추세 일 것. - 그물망 이평이 모두 상승추세 일 것. - ADX지표값이 20 이상 일 것. 1-2 매수청산 조건 - 그물망 10개중 5개가 상승에서 하락으로 추세전환 일 것 2. 매도진입 1-1 매도진입 조건 - 단순 이동평균선(ex:단순 20)이 하락추세 일 것. - 그물망 이평이 모두 하락 추세 일 것. - ADX지표값이 20 이상 일 것. 1-2 매수청산 조건 - 그물망 10개중 5개가 하락에서 상승으로 추세전환 일 것 지표값은 모두 변경 가능하게 변수값으로 부탁드립니다. * 첨부한 그림의 그물망은 아래의 수식을 이용한 것입니다 Input : Period(5),간격(1); var : tx(0); var1 = Ema(C,Period+간격*0);//5 var2 = Ema(C,Period+간격*1); var3 = Ema(C,Period+간격*2); var4 = Ema(C,Period+간격*3); var5 = Ema(C,Period+간격*4); var6 = Ema(C,Period+간격*5);//10 var7 = Ema(C,Period+간격*6); var8 = Ema(C,Period+간격*7); var9 = Ema(C,Period+간격*8); var10 = Ema(C,Period+간격*9); var11 = Ema(C,Period+간격*10);//15 var12 = Ema(C,Period+간격*11); var13 = Ema(C,Period+간격*12); var14 = Ema(C,Period+간격*13); var15 = Ema(C,Period+간격*14); var16 = Ema(C,Period+간격*15); Plot1(var1,"지수이평0",IFf(var1>var1[1],RED,BLUE));//5 Plot2(var2,"지수이평1",IFf(var2>var2[1],RED,BLUE)); Plot3(var3,"지수이평2",IFf(var3>var3[1],RED,BLUE)); Plot4(var4,"지수이평3",IFf(var4>var4[1],RED,BLUE)); Plot5(var5,"지수이평4",IFf(var5>var5[1],RED,BLUE)); Plot6(var6,"지수이평5",IFf(var6>var6[1],RED,BLUE));//10 Plot7(var7,"지수이평6",IFf(var7>var7[1],RED,BLUE)); Plot8(var8,"지수이평7",IFf(var8>var8[1],RED,BLUE)); Plot9(var9,"지수이평8",IFf(var9>var9[1],RED,BLUE)); Plot10(var10,"지수이평9",IFf(var10>var10[1],RED,BLUE)); Plot11(var11,"지수이평10",IFf(var11>var11[1],RED,BLUE));//15 Plot12(var12,"지수이평11",IFf(var12>var12[1],RED,BLUE)); Plot13(var13,"지수이평12",IFf(var13>var13[1],RED,BLUE)); Plot14(var14,"지수이평13",IFf(var14>var14[1],RED,BLUE)); Plot15(var15,"지수이평14",IFf(var15>var15[1],RED,BLUE)); Plot16(var16,"지수이평15",IFf(var16>var16[1],RED,BLUE));//20 if CrossUp(C,var1) Then { tx = Text_New(sDate,sTime,H,"U"); Text_SetStyle(tx,3,1); } if CrossDown(c,var1) Then { tx = Text_New(sDate,sTime,H,"D"); Text_SetStyle(tx,3,1); } 미리 감사드립니다
프로필 이미지
나도부자1
2025-06-29
445
글번호 192169
시스템
답변완료

부탁드립니다

아래 수식에 대한 예스트레이더 종목검색식 부탁드립니다 [수식1] A = ma(C, 50); B1 = Lowest(A, 200); B2 = BarsSince(A == B1); D1 = Lowest(A(B2 + 10), 50 - (B2 + 10)); D2 = BarsSince(A == D1 and BarsSince(A == B1) > 3); D2 - B2 <= 20 아래 수식을 당일 분봉에 적용하고자 합니다. 예스트레이더 종목검색식 부탁드립니다. [수식2] 조건1 = if(C > (H+L)/2, 1, 0); 조건2 = if(C < (H+L)/2, 1, 0); 조건3 = Sum(조건1); 조건4 = Sum(조건2); 조건4 > 조건3;
프로필 이미지
파크에버뉴
2025-06-29
383
글번호 192168
종목검색
답변완료

수식 부탁드립니다

타주기 적용 부탁드립니다. input : length(100); var : trend(False),trend_value(nan),trend_color(0); var : up_color(0),dn_color(0),atr_value(0); var : alpha(0),ATRV(0); var : sma_high(0),sma_low(0); var : signal_up(False),signal_down(False); up_color = Green; dn_color = Red; alpha = 1 / 200 ; ATrV = IFf(IsNan(ATrV[1]) == true, ma(TrueRange,200) , alpha * TrueRange + (1 - alpha) * IFf(isnan(ATrV[1])==true,0,ATrV[1])); atr_value = ma(ATrV, 200) * 0.8; sma_high = ma(high, length) + atr_value; sma_low = ma(low, length) - atr_value; if CrossUp(close, sma_high) Then trend = true; if CrossDown(close, sma_low) Then trend = false; trend_value = IFf(trend, sma_low, sma_high); trend_color = iff(trend , up_color , IFf(trend == False, dn_color, Black)); signal_up = trend != trend[1] and trend[1] == False; signal_down = trend != trend[1] and trend[1] == true; if trend == true Then Plot1(trend_value,"trend true",trend_color); Else NoPlot(1); if trend == False Then Plot2(trend_value,"trend False",trend_color); Else NoPlot(2);
프로필 이미지
사노소이
2025-06-29
411
글번호 192167
지표
답변완료

문의드립니다

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