커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

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

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

수식부탁드립니다.

항상 감사드립니다. 분봉 10분봉 과 30분봉에서 검색될수있게 종목검색식으로 부탁드립니다. a=valuewhen(1,dayclose()>predayclose()*p,dayhigh()); b=valuewhen(1,dayclose()>predayclose()*p,predayclose()); X=a-((a-b)*1.975); CrossUp(C,X) 조건 P는 5.20 입니다. 감사드립니다.
프로필 이미지
잔차
2025-04-13
351
글번호 190068
종목검색
답변완료

문의

indicator("HTF Trend Tracker [BigBeluga]", overlay = true, max_lines_count = 500, max_labels_count = 500) // INPUTS ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{ tf = input.timeframe("D", "Timeframe") bull_col = input.color(color.rgb(12, 193, 142), "✓", inline = "col") bear_col = input.color(color.red, "✕", inline = "col") mid_col = input.color(color.rgb(121, 121, 121), "-", inline = "col") var line_1 = line(na) var line_2 = line(na) var color_trend = color(na) var trend = bool(na) // } // CALCULATIONS――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{ draw_line(x1, x2, y, txt, color)=> l = line.new(x1, y, x2, y, color = color, style = line.style_dashed) label.delete(label.new(x1, y, txt, color = color(na), style = label.style_label_right)[1]) l var h = float(na) var l = float(na) var count = 0 if not timeframe.change(tf) count +=1 h := ta.highest(count) l := ta.lowest(count) if timeframe.change(tf) count := 0 line_1 := draw_line(bar_index, bar_index, h[1], tf + " High", bear_col) line_2 := draw_line(bar_index, bar_index, l[1], tf + " Low", bull_col) line_1.set_x2(bar_index) line_2.set_x2(bar_index) if barstate.islast line.delete(line.new(line_1.get_x1(), line_1.get_y1(), bar_index+15, line_1.get_y1(), color = bear_col, style = line.style_arrow_right)[1]) line.delete(line.new(line_2.get_x1(), line_2.get_y1(), bar_index+15, line_2.get_y1(), color = bull_col, style = line.style_arrow_right)[1]) mid = math.avg(line_1.get_y1(),line_2.get_y1()) if ta.crossover(close, line_1.get_y1()) and barstate.isconfirmed color_trend := bull_col trend := true if ta.crossunder(close, line_2.get_y1()) and barstate.isconfirmed color_trend := bear_col trend := false // } // PLOT ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{ if trend and trend != trend[1] label.new(bar_index, low - ta.sma(high-low, 100), "✓", style = label.style_label_up, size = size.tiny, color = bull_col) if not trend and trend != trend[1] label.new(bar_index, high + ta.sma(high-low, 100), "✕", style = label.style_label_down, size = size.tiny, color = bear_col) high_sdv = (high- mid) low_sdv = (mid - low) color_bars = trend ? color.from_gradient(high_sdv, 0, ta.highest(high_sdv, 100), mid_col, bull_col) : color.from_gradient(low_sdv, 0, ta.highest(low_sdv,100), mid_col, bear_col) plotcandle(open, high, low, close, title ='Candles', color = color_bars, wickcolor=color_bars, bordercolor = color_bars) plot(mid, "Trend", color = color_trend, linewidth = 2) // } 예스식으로 부탁드립니다
프로필 이미지
레전드
2025-04-13
492
글번호 190067
지표
답변완료

신호 기호 굵게 표현하는 방법없나요?

안녕하세요. 수고가 많으십니다. # 매도 If CrossDown(value3, value4) Then { tx = Text_New(sdate,sTime,H,"♣"); Text_SetStyle(tx,2,1);#좌우상하정렬 Text_SetColor(tx,BLUE);#색상 Text_SetSize(tx,25);#크기 } 제가 사용하는 신호의 일부분입니다. ♣ 이 표시를 굵게표현(볼드체)하는 방법이 없을까요? -- 크기 조절한 것 말고요.진하게 표현하는 방법을 문의합니다. 감사합니다.
프로필 이미지
knoll
2025-04-13
393
글번호 190066
지표

요타 님에 의해서 삭제되었습니다.

프로필 이미지
요타
2025-04-12
18
글번호 190065
지표
답변완료

부틱드립니다

수고하십니다 아래수식은 제가 이것저것 갖다 붙인수식인데요 이상한선들이 나타나내요 수식수정 부탁드립니다 input : 타주기분(5); var : S1(0),D1(0),TM(0),TF(0),box(0),dd(0),tt(0); var : oo(0),hh(0),ll(0),cc(0),TL1(0),TL2(0),TL3(0),clr(0),ii(0),TL(0),TL4(0); var : box1(0),box2(0),box3(0),box4(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 { dd = sDate; tt = sTime; oo = O; hh = H; ll = L; //cc = C; box = Box_New(sDate,sTime,oo,NextBarSdate,NextBarStime,c); //------------------------------------------------------------------ TL1 = TL_New(sDate,sTime,max(C,oo),sDate,sTime,hh); TL2 = TL_New(sDate,sTime,min(C,oo),sDate,sTime,ll); box1 = box[1]; box2 = box1[1]; box3 = box2[1]; box4 = box3[1]; Box_Delete(Box4); ii = 1; } Else { ii = ii +1; if h > hh Then hh = h; if l < ll Then ll = l; var1 = Round(ii/2,1); Box_SetEnd(box,sDate,sTime,C); //------------------------------------------------------- TL_SetBegin(TL1,sDate[var1],sTime[var1],max(c,oo)); TL_SetEnd(TL1,sDate[var1],sTime[var1],hh); TL_SetBegin(TL2,sDate[var1],sTime[var1],min(c,oo)); TL_SetEnd(TL2,sDate[var1],sTime[var1],ll); TL = TL_New(dd,tt,c,sDate,sTime,c); TL_SetExtRight(TL,true); TL_SetColor(TL,Green); TL_SetSize(TL,1); TL1 = TL[1]; TL2 = TL1[1]; TL3 = TL2[1]; TL4 = TL3[1]; TL_Delete(TL4); TL_SetBegin(TL,dd,tt,c); TL_SetEnd(TL,sDate,sTime,c); } if C > oo Then clr = DarkRed; else if C < oo Then clr = Green; Else clr = White; Box_SetColor(box,clr); Box_SetSize(box,5); Box_SetFill(box,True,60);//내부채움 TL_SetColor(tl1,Yellow); TL_SetColor(tl2,Yellow); TL_SetColor(tl3,clr); TL_SetColor(tl,clr); TL_SetSize(TL1,5); TL_SetSize(TL2,5); }
프로필 이미지
파생돌이
2025-04-13
423
글번호 190064
지표
답변완료

92304번 재질문

안녕하세요? 아래 글번호 92304번 재질문입니다. 주가지수 일봉에 전략을 적용하면 신호가 다릅니다. "진입 후 7번째 봉이 완성되고 8번째봉의 시가가 진입가보다 크거나 같으면 8번째봉 시가에 청산 아니면 8번째 봉의 시가에 매도로 스위칭" 상기의 논리라면 진입 후 8번째 봉 후에서는 청산이 발생되어야 하니 그렇지 않습니다. #b2으로 진입 후 7번째 봉이 완성되고 if IsEntryName("b2",0) == true and BarsSinceEntry == 7 Then { #8번째봉의 시가가 진입가보다 크거나 같으면 8번째봉 시가에 청산 if NextBarOpen >= EntryPrice Then ExitLong("bx2",AtMarket); Else #아니면 8번째 봉의 시가에 매도로 스위칭 Sell("s4",AtMarket); } 주석주신대로 신호가 생성되도록 수정 부탁드립니다.
프로필 이미지
흰둥이아빠
2025-04-12
372
글번호 190063
시스템
답변완료

예스종목검색으로 요청합니다^^*

아래수식을 예스종목검색으로 변환부탁드립니다.. variables: LowestLo( 0 ) ; if CurrentBar == 1 then{ LowestLo = Low; } else if Low < LowestLo then { Plot1( Low, "NewLo-Ch" ) ; LowestLo = Low ; }
프로필 이미지
서민순
2025-04-12
401
글번호 190062
종목검색
답변완료

수식부탁합니다

스토캐스틱 A = (20,12,12) B = (25,6,6) C = (5,3,3) 두가지 종목 검색식 부탁합니다 1. 하나라도 (어떤 경우는 2개 이상) 지표가 골든크로스 발생하고 골든크로스가 발생하지 않은 지표는 스토캐스틱 K값 > D값 종목 검색식 2. A와 B 지표가 스토캐스틱 K값 > D값인 경우여야 하고 이때 C가 골든크로스 발생한 종목 검색식
프로필 이미지
미래테크
2025-04-12
409
글번호 190060
종목검색
답변완료

수식 부탁드립니다

지표식 부탁드리고요. 시스템식도 가능하면 부탁드립니다. // INPUTS ========================================================================================================{ //@variable len Length of the Gaussian filter for smoothing (minimum value: 5) int len = input.int(30, "Length", minval = 5) //@variable mode 선택 the mode of aggregation to be used: AVG (average), MEADIAN (median), or MODE (mode) string mode = input.string("AVG", "Type", ["AVG", "MEADIAN", "MODE"]) //@variable distance Multiplier for calculating the distance between the Gaussian filter and the volatility bands float distance = input.float(3, step = 0.1) //@variable show_retest Boolean input to determine if retest signals should be displayed bool show_retest = input.bool(false, "Retest Signals") //@variable up Color for upward trends and visual signals, represented in RGB color up = input.color(color.rgb(40, 218, 150), group = "Color") //@variable dn Color for downward trends and visual signals, represented in hex code color dn = input.color(#287bda, group = "Color") // } // CALCULATIONS ============================================================================================={ //@function Calculates a Gaussian filter for smoothing the data //@param src (series float) Source price series //@param length (int) Length of the filter //@param sigma (float) Standard deviation for the Gaussian function //@returns (float) Smoothed value for the current bar gaussian_filter(src, length, sigma) => var float[] weights = array.new_float(100) // Create an array to store weights for Gaussian filter float total = 0.0 // Sum of all weights, used for normalization float pi = math.pi // Define Pi constant // Calculate weights for Gaussian filter for i = 0 to length - 1 float weight = math.exp(-0.5 * math.pow((i - length / 2) / sigma, 2.0)) / math.sqrt(sigma * 2.0 * pi) weights.set(i, weight) total := total + weight // Normalize weights for i = 0 to length - 1 weights.set(i, weights.get(i) / total) // Apply Gaussian filter to the source series float sum = 0.0 for i = 0 to length - 1 sum := sum + src[i] * weights.get(i) sum //@function Multi-trend calculation using Gaussian filter //@param src (series float) Source price series //@param period (int) Lookback period for trend calculation //@returns (float[]) Returns score, value, color, trend line, and trend status multi_trend(src, period) => array<float> g_value = array.new<float>() // Array to store Gaussian filtered values float volatility = ta.sma(high - low, 100) // Calculate the average true range (ATR) volatility var float lower_band = 0.0 // Lower band for trend analysis var float upper_band = 0.0 // Upper band for trend analysis var float trend_line = 0.0 // Trend line value var bool trend = na // Trend direction status // Apply Gaussian filter with a step adjustment to calculate multiple trend lines for step = 0 to 20 by 1 float gaussian_filter = gaussian_filter(src, (period + step), 10) g_value.push(gaussian_filter) float coeff = 0.05 float score = 0.0 // Calculate score based on trend analysis for i = 0 to g_value.size() - 1 float g_f = g_value.get(i) if g_f > g_value.first() score += coeff // Determine color based on score color color = score > 0.5 ? color.from_gradient(score, 0.5, 1, na, dn) : color.from_gradient(score, 0, 0.5, up, na) // Determine value based on user-선택된 mode (AVG, MEDIAN, MODE) float value = switch mode "AVG" => g_value.avg() "MEADIAN" => g_value.median() "MODE" => g_value.mode() lower_band := value - volatility * distance // Calculate lower band based on value and volatility upper_band := value + volatility * distance // Calculate upper band based on value and volatility // Check crossover and crossunder of price with bands to determine trend if ta.crossover(close, upper_band) trend := true if ta.crossunder(close, lower_band) trend := false // Set trend line based on trend direction trend_line := trend ? lower_band : not trend ? upper_band : na // Return values: score, value, color, trend line, and trend status [score, value, color, trend_line, trend] // Get the result from the multi-trend function [score, avg, color, trend_line, trend] = multi_trend(close, len) // } // PLOT ============================================================================================================={ // Plot the average line returned from multi_trend function p2 = plot(avg, color = color, linewidth=6) // Plot the trend line based on trend status p1 = plot(ta.change(trend) ? na : trend_line, color = close > trend_line ? up : dn, linewidth = 7, style = plot.style_linebr) // Plot the trend line again with styling plot(trend_line, color = close > trend_line ? up : dn, linewidth=1, style = plot.style_linebr) // Add labels for cross under and crossover events if ta.crossunder(close, trend_line) label.new(bar_index, trend_line, score < 0.5 ? "▼" : "▼", color = dn, textcolor = chart.fg_color, style = label.style_label_lower_right, size = score < 0.5 ? size.tiny : size.tiny) if ta.crossover(close, trend_line) label.new(bar_index, trend_line, score > 0.5 ? "▲" : "▲", color = up, textcolor = chart.bg_color, style = label.style_label_upper_right, size = score > 0.5 ? size.tiny : size.tiny) // Determine trend color based on trend direction color trend_color = trend ? color.new(up, 100) : color.new(dn, 100) // Fill between trend line and average line to show areas of trend fill(p1, p2, trend_line, avg, trend_color, na) fill(p1, p2, trend_line, avg, trend_color, na) // Add retest labels if the option is enabled if show_retest if ta.crossunder(high, avg) and not trend label.new(bar_index[1], high[1], "▼", color = color(na), style = label.style_label_down, textcolor = chart.fg_color, size = size.small) if ta.crossover(close, avg) and trend label.new(bar_index[1], low[1], "▲", color = color(na), style = label.style_label_up, textcolor = chart.fg_color, size = size.small) // Calculate score-up and score-down for trend strength representation float score_up = (score - 1) * -1 float score_dn = 1 - score_up // Display trend strength as a table if on the last bar if barstate.islast table trend_strength_up = table.new(position.bottom_center, 100, 100) table trend_strength_dn = table.new(position.top_center, 100, 100) // Create cells to represent trend strength up for i = 0 to score_up * 20 trend_strength_up.cell(0 + i, 0, bgcolor = color.new(up, 100 - i * 5), text = i == 0 ? "|" : "", text_color = color.gray) if i == score_up * 20 trend_strength_up.cell(0 + i, 0, text = str.tostring(score_up * 100, format.percent) + " ▲", text_color = chart.fg_color, height = 2) // Create cells to represent trend strength down for i = 0 to score_dn * 20 trend_strength_dn.cell(0 + i, 0, bgcolor = color.new(dn, 100 - i * 5), text = i == 0 ? "|" : "", text_color = color.gray) if i == score_dn * 20 trend_strength_dn.cell(0 + i, 0, text = str.tostring(score_dn * 100, format.percent) + " ▼", text_color = chart.fg_color, height = 2) // }
프로필 이미지
사노소이
2025-04-11
861
글번호 190059
지표