커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

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

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

안녕하세요, 수식을 문의드립니다

안녕하세요, 수식을 문의드립니다 1, 연속된 3개의 음봉(Candle)이 -0.75P 하락하면 매도 2, 5개의 봉(Candle)이 +0.75P 상승하면 매수 감사합니다 향상 건강하시고 행복하세요
프로필 이미지
금보
2025-08-06
250
글번호 193050
시스템
답변완료

다시 문의드립니다.

이전 글 93804번을 봉갯수 800바로 하고 적용했는데 밴드가 차트에 표시되지 않습니다. 다시한번 살펴주시기 바랍니다. 감사합니다. 수고하세요!!!
프로필 이미지
해암
2025-08-06
252
글번호 193048
지표
답변완료

어떻게 고쳐야 할까요?

차트상 매수(빨간삼각형), 매도(파란삼각형) 신호와 무관하게 신호가 나타납니다. 수정 부탁 드림니다. input : length(15); input : show_levl(true); var : up(0),dn(0),A(0),emaValue(0),correction(0),zlma(0); var : signalUp(False),signalDn(False),zlma_color(0),ema_col(0); var : TOP(0),BTM(0),box(0),tx(0),tx1(0),check_signals(False); up = Black; dn = Blue; #var box1 = box(na) // Variable to store the box a = atr(200); emaValue = ema(close, length); correction = close + (close - emaValue); zlma = ema(correction, length); signalUp = CrossUp(zlma, emaValue); signalDn = CrossDown(zlma, emaValue); zlma_color = iff(zlma > zlma[3] , up , iff(zlma < zlma[3] , dn , Nan)); ema_col = iff(emaValue < zlma , up , dn); if signalUp Then { Top = zlma; BTM = zlma-A; var3 = (Top+BTM)/2; } else if signalDn Then { Top = zlma+A; BTM = zlma; var3 = (Top+BTM)/2; } check_signals = signalUp or signalDn; if CrossDown(high, BTM) and emaValue > zlma Then { Buy("b"); } if CrossUp(low, Top) and emaValue < zlma Then { ExitLong("bx"); }
프로필 이미지
제너리
2025-08-06
335
글번호 193042
시스템
답변완료

문의드립니다,

Input : shortPeriod(12), longPeriod(26), Period(9); Inputs: RSILength(10), OverSold(30); Var : MACD1(0,Data1),MACD2(0,Data2),R(0,Data1); MACD1 = data1(MACD(shortPeriod, longPeriod)); MACD2 = data2(MACD(shortPeriod, longPeriod)); R = Data1(RSI(RSILength)); If MACD2 > 0 and Crossup(R, OverSold) Then Buy ("RSI"); if MarketPosition == 1 Then { if CrossDown(MACD1,0) or CrossDown(MACD2,0) Then ExitLong(); } 위 수식을 다음과같이 변경 문의드립니다. 1.data2 macd oscillator 골든시 data1매수 2.data2 macd oscillator 골든이후 data1 rsi bull oscillator 매수신호시 data1매수식 3.data1 rsi bull oscillator (70)매도시 or data2 macd oscillator 매도시 매도식 늘감사드립니다
프로필 이미지
2685up
2025-08-06
267
글번호 193041
시스템
답변완료

문의드립니다.

1.아래의 트레이딩뷰수식을 변환부탁드립니다. 2 위1번에서 차트는 과거봉 500개까지 밴드가 그려지는 것으로 보이는데, 과거봉 5000개까지 확장적용하려면 어떻게 해야 하는지요? ===================== indicator("Nadaraya-Watson Envelope [LuxAlgo]", "LuxAlgo - Nadaraya-Watson Envelope", overlay = true, max_lines_count = 500, max_labels_count = 500, max_bars_back=500) //------------------------------------------------------------------------------ //Settings //-----------------------------------------------------------------------------{ h = input.float(8.,'Bandwidth', minval = 0) mult = input.float(1.6., minval = 0) src = input(close, 'Source') repaint = input(true, 'Repainting Smoothing', tooltip = 'Repainting is an effect where the indicators historical output is subject to change over time. Disabling repainting will cause the indicator to output the endpoints of the calculations') //Style upCss = input.color(color.teal, 'Colors', inline = 'inline1', group = 'Style') dnCss = input.color(color.red, '', inline = 'inline1', group = 'Style') //-----------------------------------------------------------------------------} //Functions //-----------------------------------------------------------------------------{ //Gaussian window gauss(x, h) => math.exp(-(math.pow(x, 2)/(h * h * 2))) //-----------------------------------------------------------------------------} //Append lines //-----------------------------------------------------------------------------{ n = bar_index var ln = array.new_line(0) if barstate.isfirst and repaint for i = 0 to 499 array.push(ln,line.new(na,na,na,na)) //-----------------------------------------------------------------------------} //End point method //-----------------------------------------------------------------------------{ var coefs = array.new_float(0) var den = 0. if barstate.isfirst and not repaint for i = 0 to 499 w = gauss(i, h) coefs.push(w) den := coefs.sum() out = 0. if not repaint for i = 0 to 499 out += src[i] * coefs.get(i) out /= den mae = ta.sma(math.abs(src - out), 499) * mult upper = out + mae lower = out - mae //-----------------------------------------------------------------------------} //Compute and display NWE //-----------------------------------------------------------------------------{ float y2 = na float y1 = na nwe = array.new<float>(0) if barstate.islast and repaint sae = 0. //Compute and set NWE point for i = 0 to math.min(499,n - 1) sum = 0. sumw = 0. //Compute weighted mean for j = 0 to math.min(499,n - 1) w = gauss(i - j, h) sum += src[j] * w sumw += w y2 := sum / sumw sae += math.abs(src[i] - y2) nwe.push(y2) sae := sae / math.min(499,n - 1) * mult for i = 0 to math.min(499,n - 1) if i%2 line.new(n-i+1, y1 + sae, n-i, nwe.get(i) + sae, color = upCss) line.new(n-i+1, y1 - sae, n-i, nwe.get(i) - sae, color = dnCss) if src[i] > nwe.get(i) + sae and src[i+1] < nwe.get(i) + sae label.new(n-i, src[i], '▼', color = color(na), style = label.style_label_down, textcolor = dnCss, textalign = text.align_center) if src[i] < nwe.get(i) - sae and src[i+1] > nwe.get(i) - sae label.new(n-i, src[i], '▲', color = color(na), style = label.style_label_up, textcolor = upCss, textalign = text.align_center) y1 := nwe.get(i) //-----------------------------------------------------------------------------} //Dashboard //-----------------------------------------------------------------------------{ var tb = table.new(position.top_right, 1, 1 , bgcolor = #1e222d , border_color = #373a46 , border_width = 1 , frame_color = #373a46 , frame_width = 1) if repaint tb.cell(0, 0, 'Repainting Mode Enabled', text_color = color.white, text_size = size.small) //-----------------------------------------------------------------------------} //Plot //-----------------------------------------------------------------------------} plot(repaint ? na : out + mae, 'Upper', upCss) plot(repaint ? na : out - mae, 'Lower', dnCss) //Crossing Arrows plotshape(ta.crossunder(close, out - mae) ? low : na, "Crossunder", shape.labelup, location.absolute, color(na), 0 , text = '▲', textcolor = upCss, size = size.tiny) plotshape(ta.crossover(close, out + mae) ? high : na, "Crossover", shape.labeldown, location.absolute, color(na), 0 , text = '▼', textcolor = dnCss, size = size.tiny) //-----------------------------------------------------------------------------} ================== 매번 감사드립니다. 수고하세요!!!
프로필 이미지
해암
2025-08-06
517
글번호 193040
지표
답변완료

수식수정바랍니다

안녕하세요 아래 vwap지표를 이용 표준편차밴드(볼린져밴드처럼) 지표를 만들수 있나요? 작성가능하면 부탁드립니다. var : sum(0),VWAP(0),PreVWAP(0); if date != date[1] Then{ sum = 0; PreVWAP = VWAP; } sum = sum+((H+L+C)/3*v); VWAP = sum/DayVolume; plot1(VWAP,"Volume-Weighted Average Price"); 수고하세요
프로필 이미지
바닥차기
2025-08-06
318
글번호 193039
지표
답변완료

등가 옵션 기준 지표 부탁드려요.

등가 옵션 기준(총 16쌍) ----> ATM±40포인트 및 2.5포인트 간격 [예시] var1 = call(2.0)-put(0.5) var2 = call(0.7)-put(0.2) var3 = call(0.5)-put(1.2) 1.당일시가 abs(콜-풋) 차이가 가장 작은 값의 양합(콜+풋) ---> var2(0.9) 2.1번값의 ATM-1 양합(콜+풋) (단 당일시가 0이 아닌 콜,풋 가격이여야 유효한 경우) ---> var2-1(양합) = var1(2.5) 3.1번값의 ATM+1 양합(콜+풋) (단 당일시가 0이 아닌 콜,풋 가격이여야 유효한 경우) ---> var2+1(양합) = var3(1.7) 4.2,3번 모두 해당 상황 없으면 n/a 5.2,3번 중 1개만 있으면 2,3 양합(콜+풋) 음수 처리 ---> var1(-2.5) or var3(-1.7) 6.2.3번 양합 중 큰 값을 양수 작은 값을 음수 처리 ---> var1(2.5) var3(-1.7) 무더운 날씨 건강 조심하시고, 항상 도움을 주셔서 감사드립니다~~~
프로필 이미지
천장지구
2025-08-06
258
글번호 193038
지표
답변완료

지표 변환 부탁드립니다.

// This work is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International // https://creativecommons.org/licenses/by-nc-sa/4.0/ // &#169; BigBeluga //@version=6 indicator("Two Poles Trend Finder MTF [BigBeluga]", overlay = true) // INPUTS ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{ alpha = input.float(0.10, minval=0.01, maxval=1.0, step = 0.01, title="Alpha") source = input.source(close, "Source") offset = 3 tf1 = input.timeframe("60", "Timeframe1") tf2 = input.timeframe("120", "Timeframe2") tf3 = input.timeframe("240", "Timeframe3") tf4 = input.timeframe("720", "Timeframe4") tf5 = input.timeframe("D", "Timeframe5") c_up = input.color(#00b8a5, "") c_dn = input.color(#b80090, "") var float f = na var float f_prev1 = na var float f_prev2 = na // } // CALCULATIONS――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{ // Apply two-pole Gaussian filter if bar_index >= 2 f := math.pow(alpha, 2) * source + 2 * (1 - alpha) * f_prev1 - math.pow(1 - alpha, 2) * f_prev2 else f := source // Warm-up for first bars // Shift state f_prev2 := f_prev1 f_prev1 := f tp1 = request.security("", tf1, f_prev1 > f_prev1[offset]) tp2 = request.security("", tf2, f_prev1 > f_prev1[offset]) tp3 = request.security("", tf3, f_prev1 > f_prev1[offset]) tp4 = request.security("", tf4, f_prev1 > f_prev1[offset]) tp5 = request.security("", tf5, f_prev1 > f_prev1[offset]) avg = math.avg(tp1 ? 1 : 0, tp2 ? 1 : 0, tp3 ? 1 : 0, tp4 ? 1 : 0, tp5 ? 1 : 0) dash = table.new(position.bottom_right, 100, 100) if barstate.islast dash.merge_cells(0, 0, 8, 0) dash.cell(0, 0, str.tostring(syminfo.basecurrency) + (avg > 0.5 ? " &#129153;" : " &#129155;"), text_color = avg > 0.5 ? c_up : c_dn, tooltip = "Average Trend") draw_gauge(col, tf, trend)=> if barstate.islast s = timeframe.in_seconds(tf) m = timeframe.in_seconds(tf) / 60 h = timeframe.in_seconds(tf) / 60 / 60 d = timeframe.in_seconds(tf) / 60 / 60 / 24 tff = h < 24 and h >= 1 ? str.tostring(h) + "H" : m >= 1440 ? str.tostring(d) + "D" : m < 60 and m > 1 ? str.tostring(m) + "M" : m < 1 ? str.tostring(s) + "S" : tf color = trend ? c_up : c_dn dash.cell(col, 1, "", bgcolor = color) dash.cell(col, 2, tff, text_color = chart.fg_color, text_size = size.normal) dash.cell(col+1, 1, "", bgcolor = color(na), width = 1) // } // PLOT ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{ draw_gauge(0, tf1, tp1) draw_gauge(2, tf2, tp2) draw_gauge(4, tf3, tp3) draw_gauge(6, tf4, tp4) draw_gauge(8, tf5, tp5) plot(f_prev1, "1", color = f_prev1 > f_prev1[offset] ? c_up : c_dn, linewidth = 3) plot(f_prev1, "2", color = color.new(f_prev1 > f_prev1[offset] ? c_up : c_dn, 80), linewidth = 25) // }
프로필 이미지
삼손감자
2025-08-06
502
글번호 193032
지표
답변완료

함수

안녕하세요 아래식을 최대한 쉽게 설명부탁드려요 중이평 = ma(c,min(DayIndex+1,중이평봉수)); 감사합니다
프로필 이미지
달마7
2025-08-06
253
글번호 193023
사용자 함수