커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

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

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

검토 부탁드립니다.

input : 기간(20); var :a(0),m5(0),m20(0), cnt(-1); m5=wma(c,5) ; m20=wma(c,20) ; a = wma(h,기간); if a<a[1] && a[1]>a[2] Then var1 = a[1]; if crossup(c,var1) Then var2 = 1; if var2 && c[1]<c && m20<m5 Then cnt=0; if cnt >= 0 Then { cnt = cnt+1; if cnt == 1 or cnt == 2 Then Find(c>1000 && v>100000); } var1을 c로 돌파 그후 cnt조건을 만족하는 첫째,둘째 검색. var2 이후 cnt 부분이 문제가 있는것으로 보입니다. 검토부탁드립니다 그리고 cnt의 사용법에 대해 이해부족 이니 설명좀 부탁드립니다. cnt(-1)는 왜 -1인지 등등
프로필 이미지
nams60
2025-09-07
255
글번호 193760
종목검색
답변완료

수식 문의 드립니다

안녕하십니까? 프로그램 수식 문의 드립니다. 1) 매수: 이전 5봉중 최 고점의 0.5% 를 상향하는 종목 즉시매수 2) 매수: 이전 1봉 중 1봉의 종가를 0.5% 상향하는 종목 을 즉시 매수 3) 매도: 이전 매수 점을 0.5% 하향시 즉시 매도 4) 매도: 이전 1봉중 1봉의 종가를 0.5% 하향시 즉시 매도 5) 매도: 매수가 대비 5% 상향시 즉시 매도 6) 매도: 20이평선을 0,5% 하향시 즉시 매도
프로필 이미지
회원
2025-09-06
204
글번호 193759
시스템
답변완료

수식 문의 드립니다

안녕하십니까? 프로그램 수식 문의 드립니다. 1) 매수: 이전 5봉중 최 고점의 0.5% 를 상향하는 종목 즉시매수 2) 매수: 이전 1봉 중 1봉의 종가를 0.5% 상향하는 종목 을 즉시 매수 3) 매도: 이전 매수 점을 0.5% 하향시 즉시 매도 4) 매도: 이전 1봉중 1봉의 종가를 0.5% 하향시 즉시 매도 5) 매도: 매수가 대비 5% 상향시 즉시 매도 6) 매도: 20이평선을 0,5% 하향시 즉시 매도
프로필 이미지
회원
2025-09-06
234
글번호 193758
시스템
답변완료

수식 문의 드립니다

안녕하십니까? 종목 검색 수기 부탁 드립니다 1) 이전 5봉이내 전고점을 0.5% 상향종목 2) 이전 1봉 전 종가를 0.5 % 상향하는 종목
프로필 이미지
회원
2025-09-06
198
글번호 193757
종목검색
답변완료

수식 부탁드립니다

지표식, 시스템식 부탁 드립니다. //@version=6 indicator("DFR", overlay = true) // INPUTS ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{ factor = input.float(10, "Length", step = 0.01) col_up = input.color(color.rgb(26, 221, 127), "", inline = "Col") col_dn = input.color(color.rgb(231, 147, 20), "", inline = "Col") // } // CALCULATIONS――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{ float dist = ta.sma(high-low, 200) trend_line(factor)=> float src = hlc3 int _direction = na float trend_line = na upperBand = ta.ema(src, 15) + factor * dist lowerBand = ta.ema(src, 15) - factor * dist prevLowerBand = nz(lowerBand[1]) prevUpperBand = nz(upperBand[1]) lowerBand := lowerBand > prevLowerBand or src[1] < prevLowerBand ? lowerBand : prevLowerBand upperBand := upperBand < prevUpperBand or src[1] > prevUpperBand ? upperBand : prevUpperBand prevTrendLine = trend_line[1] if na(dist[1]) _direction := 1 else if prevTrendLine == prevUpperBand _direction := src > upperBand ? -1 : 1 else _direction := src < lowerBand ? 1 : -1 trend_line := _direction == -1 ? lowerBand : upperBand line_ = math.avg(lowerBand, upperBand) [line_, _direction, lowerBand, upperBand] [line_, _direction, lowerBand, upperBand] = trend_line(factor) // } // PLOT ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{ t_col = _direction == 1 ? col_dn : col_up plot(line_, "TrendLine", color = color.new(t_col, 0), linewidth = 4) plot(line_, "TrendLine", color = color.new(t_col, 80), linewidth = 10) plot(lowerBand+dist, "LowerBand1", color = _direction == -1 ? color.new(t_col, 80) : color.new(t_col, 100), linewidth = 1) plot(lowerBand+dist*0.5, "LowerBand2", color = _direction == -1 ? color.new(t_col, 60) : color.new(t_col, 100), linewidth = 1) plot(lowerBand, "LowerBand3", color = _direction == -1 ? color.new(t_col, 40) : color.new(t_col, 100), linewidth = 1) plot(lowerBand-dist*0.5, "LowerBand4", color = _direction == -1 ? color.new(t_col, 20) : color.new(t_col, 100), linewidth = 1) plot(lowerBand-dist, "LowerBand5", color = _direction == -1 ? color.new(t_col, 0) : color.new(t_col, 100), linewidth = 1) plot(upperBand+dist, "UpperBand5", color = _direction == 1 ? color.new(t_col, 0) : color.new(t_col, 100), linewidth = 1) plot(upperBand+dist*0.5, "UpperBand4", color = _direction == 1 ? color.new(t_col, 20) : color.new(t_col, 100), linewidth = 1) plot(upperBand, "UpperBand3", color = _direction == 1 ? color.new(t_col, 40) : color.new(t_col, 100), linewidth = 1) plot(upperBand-dist*0.5, "UpperBand2", color = _direction == 1 ? color.new(t_col, 60) : color.new(t_col, 100), linewidth = 1) plot(upperBand-dist, "UpperBand1", color = _direction == 1 ? color.new(t_col, 80) : color.new(t_col, 100), linewidth = 1) plotcandle(open, high, low, close, title='CandleStick Coloring', color = color.new(t_col, 50), wickcolor=color.new(t_col, 50), bordercolor = color.new(t_col, 50)) // }
프로필 이미지
사노소이
2025-09-08
312
글번호 193756
지표
답변완료

문의 드립니다.

const string calcGroup = 'Calculation' length = input.int(22, title = 'ATR Period', group = calcGroup) mult = input.float(3.0, step = 0.1, title = 'ATR Multiplier', group = calcGroup) useClose = input.bool(true, title = 'Use Close Price for Extremums', group = calcGroup) const string visualGroup = 'Visuals' showLabels = input.bool(true, title = 'Show Buy/Sell Labels', group = visualGroup) highlightState = input.bool(true, title = 'Highlight State', group = visualGroup) const string alertGroup = 'Alerts' awaitBarConfirmation = input.bool(true, title = 'Await Bar Confirmation', group = alertGroup) //--- atr = mult * ta.atr(length) longStop = (useClose ? ta.highest(close, length) : ta.highest(length)) - atr longStopPrev = nz(longStop[1], longStop) longStop := close[1] > longStopPrev ? math.max(longStop, longStopPrev) : longStop shortStop = (useClose ? ta.lowest(close, length) : ta.lowest(length)) + atr shortStopPrev = nz(shortStop[1], shortStop) shortStop := close[1] < shortStopPrev ? math.min(shortStop, shortStopPrev) : shortStop var int dir = 1 dir := close > shortStopPrev ? 1 : close < longStopPrev ? -1 : dir const color textColor = color.white const color longColor = color.green const color shortColor = color.red const color longFillColor = color.new(color.green, 85) const color shortFillColor = color.new(color.red, 85) buySignal = dir == 1 and dir[1] == -1 longStopPlot = plot(dir == 1 ? longStop : na, title = 'Long Stop', style = plot.style_linebr, linewidth = 2, color = longColor) plotshape(buySignal ? longStop : na, title = 'Long Stop Start', location = location.absolute, style = shape.circle, size = size.tiny, color = longColor) plotshape(buySignal and showLabels ? longStop : na, title = 'Buy Label', text = 'Buy', location = location.absolute, style = shape.labelup, size = size.tiny, color = longColor, textcolor = textColor) sellSignal = dir == -1 and dir[1] == 1 shortStopPlot = plot(dir == 1 ? na : shortStop, title = 'Short Stop', style = plot.style_linebr, linewidth = 2, color = shortColor) plotshape(sellSignal ? shortStop : na, title = 'Short Stop Start', location = location.absolute, style = shape.circle, size = size.tiny, color = shortColor) plotshape(sellSignal and showLabels ? shortStop : na, title = 'Sell Label', text = 'Sell', location = location.absolute, style = shape.labeldown, size = size.tiny, color = shortColor, textcolor = textColor) midPricePlot = plot(ohlc4, title = '', display = display.none, editable = false) fill(midPricePlot, longStopPlot, title = 'Long State Filling', color = (highlightState and dir == 1 ? longFillColor : na)) fill(midPricePlot, shortStopPlot, title = 'Short State Filling', color = (highlightState and dir == -1 ? shortFillColor : na)) await = awaitBarConfirmation ? barstate.isconfirmed : true alertcondition(dir != dir[1] and await, title = 'CE Direction Change', message = 'Chandelier Exit has changed direction, {{exchange}}:{{ticker}}') alertcondition(buySignal and await, title = 'CE Buy', message = 'Chandelier Exit Buy, {{exchange}}:{{ticker}}') alertcondition(sellSignal and await, title = 'CE Sell', message = 'Chandelier Exit Sell, {{exchange}}:{{ticker}}') 트레이딩뷰 수식인데 예스 지표로 만들어주시고 매수/매도 신호를 예스 시스템식으로 만들어주세요.
프로필 이미지
신대륙발견
2025-09-07
298
글번호 193755
시스템

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

프로필 이미지
nams60
2025-09-06
8
글번호 193754
종목검색
답변완료

수식어 검증 오류창

안녕하세요. 항상 감사합니다. 국내선물 수식어가 오류가 발생하여 수정본 수식어 부탁드립니다. 1.예스트레이드 #6132 편집기 2.예스랭귀지 #6109 편집기-시스템 클릭후 해서 입력해도 수식어가 오류가 발생합니다. // --- INPUT SERIES --- // close[], upperBand[], lowerBand[], chTop1[], chBot1[], dayIndex[], entryStage[] function generateSignals(data) { const n = data.close.length; const orders = []; let position = 0; // +: long qty, -: short qty let longQty = 0, shortQty = 0; const longEnterCount = new Map(); const shortEnterCount = new Map(); const hitTopCount = new Map(); const hitBotCount = new Map(); const getCnt = (m, d) => m.get(d) || 0; const inc = (m, d) => m.set(d, (m.get(d) || 0) + 1); const EPS = 1e-8; const eq = (a, b) => Math.abs(a - b) <= EPS; for (let i = 0; i < n; i++) { const C = data.close[i]; const U = data.upperBand[i]; const L = data.lowerBand[i]; const CT1 = data.chTop1[i]; const CB1 = data.chBot1[i]; const D = data.dayIndex[i]; const STG = (data.entryStage?.[i] ?? 0); const cntLong = getCnt(longEnterCount, D); const cntShort = getCnt(shortEnterCount, D); const cntTop = getCnt(hitTopCount, D); const cntBot = getCnt(hitBotCount, D); // ---- ENTRY ---- // If CountIF(MarketPosition > 0, DayIndex) < 1 && DayIndex>2 && DayIndex<80 && STG==0 && C>U => Buy 2 if (cntLong < 1 && D > 2 && D < 80 && STG === 0 && C > U) { const qty = 2; orders.push({ i, side: "BUY", qty, price: C, tag: "ENTRY_LONG" }); position += qty; longQty += qty; inc(longEnterCount, D); } // If CountIF(MarketPosition < 0, DayIndex) < 1 && ... && C<L => Sell 2 if (cntShort < 1 && D > 2 && D < 80 && STG === 0 && C < L) { const qty = 2; orders.push({ i, side: "SELL", qty, price: C, tag: "ENTRY_SHORT" }); position -= qty; shortQty += qty; inc(shortEnterCount, D); } // ---- TOUCH COUNTS (for partial exits) ---- if (eq(C, CT1)) inc(hitTopCount, D); if (C <= CB1 + EPS) inc(hitBotCount, D); // ---- PARTIAL EXITS ---- // if CountIF(C = chTop1, DayIndex) < 2 && C = chTop1 => ExitLong 1 of 2 if (position > 0 && cntTop < 2 && eq(C, CT1) && longQty > 0) { const q = Math.min(1, longQty); orders.push({ i, side: "SELL", qty: q, price: C, tag: "TP1_LONG" }); position -= q; longQty -= q; } // if CountIF(C = chBot1, DayIndex) < 2 && C <= chBot1 => ExitShort 1 of 2 if (position < 0 && cntBot < 2 && C <= CB1 + EPS && shortQty > 0) { const q = Math.min(1, shortQty); orders.push({ i, side: "BUY", qty: q, price: C, tag: "TP1_SHORT" }); position += q; shortQty -= q; } } return orders;
프로필 이미지
치치야
2025-09-05
325
글번호 193753
시스템

치치야 님에 의해서 삭제되었습니다.

프로필 이미지
치치야
2025-09-05
0
글번호 193752
시스템