커뮤니티

예스랭귀지 Q&A

글쓰기

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

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

종목 검색부탁드립니다.

1.아래수식에서, 종목검색 부탁드립니다 1) K 가(수식1) T 를(수식2) 골든크로스 할때 검색식 2) K 가(수식1) 전일보다 상승한 종목 검색식 3) K 가(수식1) 기준선 0 을 돌파할때 검색식 4) T 가(수식2) 기준선 0 을 돌파할때 검색식 5) K 가(수식1) 기준선 0선 위에 있는 모든종목 검색식 ---아래---- (수식1) K A=(H+L+C)/3; xTrend=if(A>A(1),volume*100,-volume*100); xFast=eavg(xTrend,FastX); xSlow=eavg(xTrend,SlowX); xKVO=xFast-xSlow; (수식2) T A=(H+L+C)/3; xTrend=if(A>A(1),volume*100,-volume*100); xFast=eavg(xTrend,FastX); xSlow=eavg(xTrend,SlowX); xKVO=xFast-xSlow; xTrigger=eavg(xKVO,TrigLen); <지표변수> TrigLen 10 FastX 30 SlowX 50 기준선 0 ---------------------------------------------------- ---------------------------------------------------- 2. 아래수식에서, 기준선 0을 돌파한 종목을, 0봉전~30봉전까지 모든 종목을 검색하고자 합니다 종목검색식 부탁 드려요. ----아래---- 수식: C-C (기간 1 ) 지표변수 : 기간1 25 기준선 0
프로필 이미지
일지매7
2024-10-28
660
글번호 184628
종목검색
답변완료

저가, 고가 대비

늘 감사합니다. 당일에 매수 1회, 매도1회만 익절 20틱, 손절 10틱 10시 30분 강제 청산 당일 저가대비 +25틱 상승 하면 매도 하루에 한번만 거래 당일 고가대비 -25틱 하락 하면 매수 하루에 한번만 거래 감사합니다.
프로필 이미지
상암동
2024-10-26
693
글번호 184627
시스템
답변완료

수고하십니다

항상감사드리며 트레이딩뷰 챠트인데 간곡히 변환 부탁드립니다 indicator("Market Structure Algo", "MS Algo", true) left = input.int(5, "Internal MS", minval = 2) left1 = input.int(30, "External MS", minval = 7) dist = input.float(2.00, "Zone Distance", minval = 1, step = 0.1, inline = "zone") zone = input.bool(true, "", inline = "zone") right = left right1 = left1 upcolor = input.color(#2962ff, "Positive color", group = "Appearence") downcolor = input.color(#e91e63, "Negative color", group = "Appearence") // Internal pvh = ta.pivothigh(left, right) pvl = ta.pivotlow(left, right) var float ph = na var float pl = na ph := pvh != 0 ? pvh : ph[1] pl := pvl != 0 ? pvl : pl[1] currenth = ta.valuewhen(pvh != 0, high[right], 0) lasth = ta.valuewhen(pvh != 0, high[right], 1) currentl = ta.valuewhen(pvl != 0, low[right], 0) lastl = ta.valuewhen(pvl != 0, low[right], 1) var int ms = na ms := if currenth > lasth and currentl > lastl and close > ph ms := 2 else if close > ph ms := 1 else if currenth < lasth and currentl < lastl and close < pl ms := -2 else if close < pl ms := -1 else ms[1] var int last = na longsig = close > ph and ms[1] < 0 shortsig = close < pl and ms[1] > 0 longsig1 = close > ph and ms[1] > 0 shortsig1 = close < pl and ms[1] < 0 longsig2 = longsig1 and longsig1[1] == false and longsig[1] == false shortsig2 = shortsig1 and shortsig1[1] == false and shortsig[1] == false longexit = high > ph and close < ph shortexit = low < pl and close > pl // External pvh1 = ta.pivothigh(left1, right1) pvl1 = ta.pivotlow(left1, right1) var float ph1 = na var float pl1 = na ph1 := pvh1 != 0 ? pvh1 : ph1[1] pl1 := pvl1 != 0 ? pvl1 : pl1[1] // Zone ma = ta.sma(close, left1) atr = ta.atr(left1) ma2 = ms > 0 and ms[1] > 0 ? ma - atr * dist : ms < 0 and ms[1] < 0 ? ma + atr*dist : na ma3 = ms > 0 and ms[1] > 0 ? ma2 + atr : ms < 0 and ms[1] < 0 ? ma2 - atr : na // Plot if pvh != 0 l1 = line.new(x1 = bar_index - right, y1 = ph, x2 = bar_index + math.round(right/2), y2 = ph, color = color.new(upcolor, 50), style = line.style_dashed) if pvl != 0 l2 = line.new(x1 = bar_index - right, y1 = pl, x2 = bar_index + math.round(right/2), y2 = pl, color = color.new(downcolor, 50), style = line.style_dashed) if pvh1 != 0 l3 = line.new(x1 = bar_index - right1, y1 = ph1, x2 = bar_index + math.round(right1/2), y2 = ph1, color = upcolor, width = 2) if pvl1 != 0 l4 = line.new(x1 = bar_index - right1, y1 = pl1, x2 = bar_index + math.round(right1/2), y2 = pl1, color = downcolor, width = 2) barcolor(ms >= 2 ? upcolor : ms == 1 ? color.new(upcolor, 50) : ms <= -2 ? downcolor : ms == -1 ? color.new(downcolor, 50) : na) plotshape(longsig, "Long Signal", shape.labelup, location.belowbar, upcolor, 0, "↑", textcolor = color.new(color.white, 50)) plotshape(longsig2, "Buy Signal", shape.triangleup, location.belowbar, upcolor) plotshape(shortsig, "Short Signal", shape.labeldown, location.abovebar, downcolor, 0, "↓", textcolor = color.new(color.white, 50)) plotshape(shortsig2, "Sell Signal", shape.triangledown, location.abovebar, downcolor) plotshape(longexit, "Long Exit", shape.triangledown, location.abovebar, color.gray) plotshape(shortexit, "Short Exit", shape.triangleup, location.belowbar, color.gray) p1 = plot(zone ? ma2 : na, "External Zone", close > ma2 ? upcolor : close < ma2 ? downcolor : na, 1, plot.style_linebr) p2 = plot(zone ? ma3 : na, "Internal Zone", close > ma2 ? color.new(upcolor, 80) : close < ma2 ? color.new(downcolor, 80) : na, 1, plot.style_linebr) fill(p1, p2, color = close > ma2 ? color.new(upcolor, 80) : color.new(downcolor, 80), title = "Zone fill") alertcondition(longsig, "Long CHoCH") alertcondition(shortsig, "Short CHoCH") alertcondition(longsig2, "Long BOS") alertcondition(shortsig2, "Short BOS")
프로필 이미지
비듬싸순
2024-10-26
993
글번호 184626
지표
답변완료

문의드립니다

var : xClose(0),xOpen(0),xHigh(0),xLow(0); #Heiken Ashi 시고저종 if index == 0 then { xOpen = dayopen; xClose = (dayOpen+dayHigh+daylow+dayClose)/4; xHigh = MaxList( dayhigh, xOpen, xClose); xLow = MinList( daylow, xOpen,xClose); } else { xClose = (dayOpen+dayHigh+daylow+dayClose)/4; xOpen = (xOpen[1] + xClose[1])/2 ; xHigh = MaxList(dayhigh, xOpen, xClose) ; xLow = MinList(daylow, xOpen, xClose) ; } if XClose > Xopen Then Plot1(xclose, "1", red); Else Plot1(xclose, "1", blue); ------------------------------------- 위식이 일봉용 하이킨아시가 맞나요? 식이 제대로 맞는지 좀 봐주시구요 하락색상 블루색으로 바뀌면 그 봉위에 블루점 "●") 상승 빨강색으로 바뀌면 그 봉 아래에 빨간점이 나오게 부탁합니다 감사합니다
프로필 이미지
러블리
2024-10-25
803
글번호 184625
지표
답변완료

수식수정,89649

var1 = BollBandDown(20,2); Var2 = EnvelopeDown(20,5); Var3 = RSI(20); if countif(var1 <= Var2*1.01 or var2 <= Var1*1.01,5)[1] == 5 and C >= C[1]*1.05 and Var3 > 60 and CountIf(Var3 < 59.9,5)[1] == 5 Then Find(1); 위와 같이 89649에서 주신 수식으로 25일에 종목검색해보니 송원산업,에이직랜드,피플바이오,디아이같이 var1과 var2의 간격이 1%를 훨씬 상회하는 것이 검색되었읍니다. 예스랭기지 편집기상으로는 검증완료로 나옵니다만. 무엇이 문제인지요? if 줄에 문제가 있는건가요? (참고로 예를들면 SK스퀘어 2024.1.25~2.1, 네이처셀 2021.4.29 ~ 5.7 같은 걸 찾는 것입니다)
프로필 이미지
ksks
2024-10-25
864
글번호 184624
종목검색
답변완료

전략작성등

수고많으십니다 그리고 항상 감사드립니다 다름아니옵고 같은 봉에 두개의강조수식을 표시하고 싶은데 첫번째는 PLOTPAINTBAR(C,O,"강조",GOLD)로 표시되어 멋지고 만족스러운데 두번째 신호는 PLOTPAINTBAR(C,O,"강조",GREEN)으로 하니까 앞에것은 안나오고 두번째것만 나옵니다.그래서 두번째것은 검색식 PLOT1(L-PRICESCALE*1,"검색",GREEN)으로 해서 점으로 표시되도록하니 전후 모든캔들에 점이 찍혀나옵니다 원하는 캔들에만 점이 표시되게 할수 있는 방법을 좀 알으켜 주시기 바랍니다^^
프로필 이미지
트라이
2024-10-25
581
글번호 184623
강조
답변완료

트레이딩뷰 사용중인 Zero-Lag MA Trend Levels 수정요망

항상 감사드립니다.. 트레이딩뷰 사이트에서 제공하여 사용중인 아래의 수식을 예스스탁에서 사용할수 있도록 수식을 부탁 드립니다. indicator("Zero-Lag MA Trend Levels [ChartPrime]", overlay = true) // --------------------------------------------------------------------------------------------------------------------} // &#120400;&#120398;&#120384;&#120397; &#120388;&#120393;&#120395;&#120400;&#120399;&#120398; // --------------------------------------------------------------------------------------------------------------------{ int length = input.int(15, title="Length") // Length for the moving average calculations bool show_levl = input.bool(true, "Trend Levels") // Toggle to show trend levels // Colors for the trend levels color up = input.color(#30d453, "+", group = "Colors", inline = "i") color dn = input.color(#4043f1, "-", group = "Colors", inline = "i") var box1 = box(na) // Variable to store the box series float atr = ta.atr(200) // Average True Range (ATR) for trend levels // --------------------------------------------------------------------------------------------------------------------} // &#120388;&#120393;&#120383;&#120388;&#120382;&#120380;&#120399;&#120394;&#120397; &#120382;&#120380;&#120391;&#120382;&#120400;&#120391;&#120380;&#120399;&#120388;&#120394;&#120393;&#120398; // --------------------------------------------------------------------------------------------------------------------{ series float emaValue = ta.ema(close, length) // EMA of the closing price series float correction = close + (close - emaValue) // Correction factor for zero-lag calculation series float zlma = ta.ema(correction, length) // Zero-Lag Moving Average (ZLMA) bool signalUp = ta.crossover(zlma, emaValue) // Signal for bullish crossover bool signalDn = ta.crossunder(zlma, emaValue) // Signal for bearish crossunder // Determine the color of ZLMA based on its direction color zlma_color = zlma > zlma[3] ? up : zlma < zlma[3] ? dn : na color ema_col = emaValue < zlma ? up : dn // Determine the EMA color // --------------------------------------------------------------------------------------------------------------------} // &#120401;&#120388;&#120398;&#120400;&#120380;&#120391;&#120388;&#120405;&#120380;&#120399;&#120388;&#120394;&#120393; // --------------------------------------------------------------------------------------------------------------------{ // Plot the Zero-Lag Moving Average p1 = plot(zlma, color = zlma_color, linewidth = 1) // Plot ZLMA p2 = plot(emaValue, color = ema_col, linewidth = 1) // Plot EMA fill(p1, p2, zlma, emaValue, color.new(zlma_color, 80), color.new(ema_col, 80)) // Fill between ZLMA and EMA // Method to draw a box on the chart method draw_box(color col, top, bot, price)=> box.new( bar_index, top, bar_index, bot, col, 1, bgcolor = color.new(col, 90), text = str.tostring(math.round(price, 2)), text_size = size.tiny, text_color = chart.fg_color, text_halign = text.align_right ) // Logic to draw trend levels as boxes on the chart if show_levl bool check_signals = signalUp or signalDn // Check if there is an up or down signal switch // Draw a box when a bullish signal is detected signalUp => box1 := up.draw_box(zlma, zlma - atr, close) // Draw a box when a bearish signal is detected signalDn => box1 := dn.draw_box(zlma + atr, zlma, close) switch // Extend the right side of the box if no new signal is detected not signalUp or not signalDn => box1.set_right(bar_index + 4) => box1 := box(na) // Otherwise, reset the box switch // Add a downward label when price crosses below the bottom of the box ta.crossunder(high, box1.get_bottom()) and not check_signals[1] and not check_signals and emaValue > zlma=> label.new(bar_index - 1, high[1], "▼", color = color(na), textcolor = dn, style = label.style_label_down) // Add an upward label when price crosses above the top of the box ta.crossover(low, box1.get_top()) and not check_signals and not check_signals[1] and emaValue < zlma=> label.new(bar_index - 1, low[1], "▲", color = color(na), textcolor = up, style = label.style_label_up) // Plot shapes for up and down signals plotshape(signalUp ? zlma : na, "", shape.diamond, location.absolute, color = up, size = size.tiny) plotshape(signalDn ? zlma : na, "", shape.diamond, location.absolute, color = dn, size = size.tiny) // --------------------------------------------------------------------------------------------------------------------}
프로필 이미지
유경완
2024-10-25
1269
글번호 184618
시스템

파생돌이 님에 의해서 삭제되었습니다.

프로필 이미지
파생돌이
2024-10-25
5
글번호 184617
지표
답변완료

문의드립니다.

89646번 재문의 드립니다. 오픈가로 할 때는 NextBarOpen이라는 함수가 있어서 간단히 해결이 되던데 만약에 변수가 이동평균선 5일선일 경우는 어떻게 해야 하는지 궁금합니다. 이평은 장중에 달라지니까 장 마감 동시호가 때를 기준으로 매수, 매도를 시장가로 진행하고 싶습니다. ma(C,5)[6] = ma(C,5)[5] = ma(C,5)[4] = ma(C,5)[3] = ma(C,5)[2] = ma(C,5)[1] ≠ ma(C,5)[0] * 이평5일선이 이전과 같으면 매수(ma(c,5)[5]), 달라지면 매도 (ma(C,5)[0])
프로필 이미지
확실한수익
2024-10-25
698
글번호 184614
시스템