커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

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

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

Bu = BBandUp 무슨 함수 인가요?

제가 수식관리에서 신호를 넣을려는데 Bu = BBandUp(60,2); CrossUp(C,Bu(13)) 이런 메시지가 뜨네요 BBandUp가 정의되지 않습니다. 이유를 알려주세용
프로필 이미지
필승하고불패
2023-03-29
1157
글번호 167684
사용자 함수
답변완료

검색식 작성 문의 드립니다.

바쁘신 업무에 수고 많으십니다. 아래와 같이 검색식 작성 문의 드립니다. ㅁ 요청사항 1. 일봉챠트에서 일목 후행스팬선이 => 26일 신고가라인 골드크로스 돌파 하는 검색식 문의 드립니다.
프로필 이미지
옥스
2023-03-29
888
글번호 167683
검색
답변완료

종목검색 문의

아래 수식으로된 지표를 사용중인데요 'Red"선 또는 "Pink"선이 시작될 때의 종목을 찾는 종목검색 수식 부탁드려요 Input : Period(8); var : T(0); var1 = ma(C,Period*1); var2 = ma(C,Period*2); var3 = ma(C,Period*3); var4 = ma(C,Period*4); var5 = ma(C,Period*5); var6 = ma(C,Period*6); var7 = ma(C,Period*7); var8 = ma(C,Period*8); var8 = ma(C,Period*8); var9 = ma(C,Period*9); var10 = ma(C,Period*10); if var1 > Var2 and Var2 > Var3 and Var3 > Var4 and Var4 > Var5 and Var5 > Var6 and Var6 > Var7 and Var7 > Var8 and Var8 > Var9 and Var9 > Var10 Then T = 1; else if var1 < Var2 and Var2 < Var3 and Var3 < Var4 and Var4 < Var5 and Var5 < Var6 and Var6 < Var7 and Var7 < Var8 and Var8 < Var9 and Var9 < Var10 Then T = -1; Else T = 0; #이평최고 value1 = var1; if var1 > value1 Then value1 = var1; if var2 > value1 Then value1 = var2; if var3 > value1 Then value1 = var3; if var4 > value1 Then value1 = var4; if var5 > value1 Then value1 = var5; if var6 > value1 Then value1 = var6; if var7 > value1 Then value1 = var7; if var8 > value1 Then value1 = var8; if var9 > value1 Then value1 = var9; if var10 > value1 Then value1 = var10; #이평최저 value2 = var1; if var1 < value2 Then value2 = var1; if var2 < value2 Then value2 = var2; if var3 < value2 Then value2 = var3; if var4 < value2 Then value2 = var4; if var5 < value2 Then value2 = var5; if var6 < value2 Then value2 = var6; if var7 < value2 Then value2 = var7; if var8 < value2 Then value2 = var8; if var9 < value2 Then value2 = var9; if var10 < value2 Then value2 = var10; if T == 1 Then { if C > value1 Then Plot1(1,"지표",Red); Else Plot1(1,"지표",Pink); } if T == -1 Then { if C < value2 Then Plot1(-1,"지표",Blue); Else Plot1(-1,"지표",Yellow); }
프로필 이미지
anj
2023-03-29
882
글번호 167682
종목검색

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

프로필 이미지
아침
2023-03-29
123
글번호 167681
시스템
답변완료

현재봉의 지표값이 0보다 큰 종목을 검색하려면?

1. "전략실행차트" 주봉에서 data1은 코스피종목 data2은 코스피지수으로 표시하였습니다. 2. "사용자함수"에 'MansfiedRS'라는 이름으로 Mansfied 상대강도 값을 구하는 함수를 만들었습니다. input : N(numeric); var : RSD(0),MAV(0),MRS(0); RSD = Data1(c)/data2(c) * 100; mav = Data1(ma(RSD,N)); MRS = ((RSD /mav) - 1 ) * 100; MansfieldRS = MRS; 3. "지표"에서 'Mansfied 상대강도_52'라고 만들었습니다. Plot1(MansfieldRS(52)); //52주 맨스필드상대강도 값 plot2(0); //기준선 0선 표시 4. "전략실행차트" 주봉에서 'Mansfied 상대강도_52' 지표 표시 했습니다.(첨부파일1) data1은 코스피종목 data2은 코스피지수 'Mansfied 상대강도_52' // 52주 맨스필드상대강도 표시 5. "종목검색"에서 현재봉에서 맨스필드상대강도값이 0보다 큰 종목을 검색하고 싶어서 '#0스탠와인스타인)0'을 작성했습니다. var1 = MansfieldRS(52); if var1 > 0 Then Find(1); 6."[5201]종목검색" 화면에서 '#0스탠와인스타인)0'검색식을 선택하고 검색실행했습니다.(첨부파일2) 검색되는 종목이 없습니다. 현재봉에서 맨스필드상대강도값이 0보다 큰 종목을 검색하고 싶습니다. 어디가 잘못되었는지요?
프로필 이미지
두둥실
2023-03-29
1731
글번호 167680
종목검색
답변완료

수식작성 부탁드립니다.

안녕하세요. 운영자님 아래와 같은 트레이딩뷰 수식을 예스트레이더 수식으로 변환 부탁드립니다. 감사합니다. // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ // &#169; loxx //@version=5 indicator("STD-Filtered, N-Pole Gaussian Filter [Loxx]", shorttitle="STDFNPGF [Loxx]", overlay = true) import loxx/loxxexpandedsourcetypes/4 greencolor = #2DD204 redcolor = #D2042D //factorial calc fact(int n)=> float a = 1 for i = 1 to n a *= i a //alpha calc _alpha(int period, int poles)=> w = 2.0 * math.pi / period float b = (1.0 - math.cos(w)) / (math.pow(1.414, 2.0 / poles) - 1.0) float a = - b + math.sqrt(b * b + 2.0 * b) a //n-pole calc _makeCoeffs(simple int period, simple int order)=> coeffs = matrix.new<float>(order + 1, 3, 0.) float a = _alpha(period, order) for r = 0 to order out = nz(fact(order) / (fact(order - r) * fact(r)), 1) matrix.set(coeffs, r, 0, out) matrix.set(coeffs, r, 1, math.pow(a, r)) matrix.set(coeffs, r, 2, math.pow(1.0 - a, r)) coeffs //n-pole calc _npolegf(float src, simple int period, simple int order)=> var coeffs = _makeCoeffs(period, order) float filt = src * matrix.get(coeffs, order, 1) int sign = 1 for r = 1 to order filt += sign * matrix.get(coeffs, r, 0) * matrix.get(coeffs, r, 2) * nz(filt[r]) sign *= -1 filt //std filter _filt(float src, int len, float filter)=> float price = src float filtdev = filter * ta.stdev(src, len) price := math.abs(price - nz(price[1])) < filtdev ? nz(price[1]) : price price smthtype = input.string("Kaufman", "Heiken-Ashi Better Smoothing", options = ["AMA", "T3", "Kaufman"], group= "Source Settings") srcoption = input.string("Close", "Source", group= "Source Settings", options = ["Close", "Open", "High", "Low", "Median", "Typical", "Weighted", "Average", "Average Median Body", "Trend Biased", "Trend Biased (Extreme)", "HA Close", "HA Open", "HA High", "HA Low", "HA Median", "HA Typical", "HA Weighted", "HA Average", "HA Average Median Body", "HA Trend Biased", "HA Trend Biased (Extreme)", "HAB Close", "HAB Open", "HAB High", "HAB Low", "HAB Median", "HAB Typical", "HAB Weighted", "HAB Average", "HAB Average Median Body", "HAB Trend Biased", "HAB Trend Biased (Extreme)"]) period = input.int(25,'Period', group = "Basic Settings") order = input.int(5,'Order', group = "Basic Settings", minval = 1) filterop = input.string("Gaussian Filter", "Filter Options", options = ["Price", "Gaussian Filter", "Both", "None"], group= "Filter Settings") filter = input.float(1, "Filter Devaitions", minval = 0, group= "Filter Settings") filterperiod = input.int(10, "Filter Period", minval = 0, group= "Filter Settings") colorbars = input.bool(true, "Color bars?", group = "UI Options") showSigs = input.bool(true, "Show signals?", group= "UI Options") kfl=input.float(0.666, title="* Kaufman's Adaptive MA (KAMA) Only - Fast End", group = "Moving Average Inputs") ksl=input.float(0.0645, title="* Kaufman's Adaptive MA (KAMA) Only - Slow End", group = "Moving Average Inputs") amafl = input.int(2, title="* Adaptive Moving Average (AMA) Only - Fast", group = "Moving Average Inputs") amasl = input.int(30, title="* Adaptive Moving Average (AMA) Only - Slow", group = "Moving Average Inputs") [haclose, haopen, hahigh, halow, hamedian, hatypical, haweighted, haaverage] = request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period, [close, open, high, low, hl2, hlc3, hlcc4, ohlc4]) float src = switch srcoption "Close" => loxxexpandedsourcetypes.rclose() "Open" => loxxexpandedsourcetypes.ropen() "High" => loxxexpandedsourcetypes.rhigh() "Low" => loxxexpandedsourcetypes.rlow() "Median" => loxxexpandedsourcetypes.rmedian() "Typical" => loxxexpandedsourcetypes.rtypical() "Weighted" => loxxexpandedsourcetypes.rweighted() "Average" => loxxexpandedsourcetypes.raverage() "Average Median Body" => loxxexpandedsourcetypes.ravemedbody() "Trend Biased" => loxxexpandedsourcetypes.rtrendb() "Trend Biased (Extreme)" => loxxexpandedsourcetypes.rtrendbext() "HA Close" => loxxexpandedsourcetypes.haclose(haclose) "HA Open" => loxxexpandedsourcetypes.haopen(haopen) "HA High" => loxxexpandedsourcetypes.hahigh(hahigh) "HA Low" => loxxexpandedsourcetypes.halow(halow) "HA Median" => loxxexpandedsourcetypes.hamedian(hamedian) "HA Typical" => loxxexpandedsourcetypes.hatypical(hatypical) "HA Weighted" => loxxexpandedsourcetypes.haweighted(haweighted) "HA Average" => loxxexpandedsourcetypes.haaverage(haaverage) "HA Average Median Body" => loxxexpandedsourcetypes.haavemedbody(haclose, haopen) "HA Trend Biased" => loxxexpandedsourcetypes.hatrendb(haclose, haopen, hahigh, halow) "HA Trend Biased (Extreme)" => loxxexpandedsourcetypes.hatrendbext(haclose, haopen, hahigh, halow) "HAB Close" => loxxexpandedsourcetypes.habclose(smthtype, amafl, amasl, kfl, ksl) "HAB Open" => loxxexpandedsourcetypes.habopen(smthtype, amafl, amasl, kfl, ksl) "HAB High" => loxxexpandedsourcetypes.habhigh(smthtype, amafl, amasl, kfl, ksl) "HAB Low" => loxxexpandedsourcetypes.hablow(smthtype, amafl, amasl, kfl, ksl) "HAB Median" => loxxexpandedsourcetypes.habmedian(smthtype, amafl, amasl, kfl, ksl) "HAB Typical" => loxxexpandedsourcetypes.habtypical(smthtype, amafl, amasl, kfl, ksl) "HAB Weighted" => loxxexpandedsourcetypes.habweighted(smthtype, amafl, amasl, kfl, ksl) "HAB Average" => loxxexpandedsourcetypes.habaverage(smthtype, amafl, amasl, kfl, ksl) "HAB Average Median Body" => loxxexpandedsourcetypes.habavemedbody(smthtype, amafl, amasl, kfl, ksl) "HAB Trend Biased" => loxxexpandedsourcetypes.habtrendb(smthtype, amafl, amasl, kfl, ksl) "HAB Trend Biased (Extreme)" => loxxexpandedsourcetypes.habtrendbext(smthtype, amafl, amasl, kfl, ksl) => haclose src := filterop == "Both" or filterop == "Price" and filter > 0 ? _filt(src, filterperiod, filter) : src out = _npolegf(src, period, order) out := filterop == "Both" or filterop == "Gaussian Filter" and filter > 0 ? _filt(out, filterperiod, filter) : out sig = nz(out[1]) state = 0 if (out > sig) state := 1 if (out < sig) state := -1 pregoLong = out > sig and (nz(out[1]) < nz(sig[1]) or nz(out[1]) == nz(sig[1])) pregoShort = out < sig and (nz(out[1]) > nz(sig[1]) or nz(out[1]) == nz(sig[1])) contsw = 0 contsw := nz(contsw[1]) contsw := pregoLong ? 1 : pregoShort ? -1 : nz(contsw[1]) goLong = pregoLong and nz(contsw[1]) == -1 goShort = pregoShort and nz(contsw[1]) == 1 var color colorout = na colorout := state == -1 ? redcolor : state == 1 ? greencolor : nz(colorout[1]) plot(out, "N-Pole GF", color = colorout, linewidth = 3) barcolor(colorbars ? colorout : na) plotshape(showSigs and goLong, title = "Long", color = color.yellow, textcolor = color.yellow, text = "L", style = shape.triangleup, location = location.belowbar, size = size.tiny) plotshape(showSigs and goShort, title = "Short", color = color.fuchsia, textcolor = color.fuchsia, text = "S", style = shape.triangledown, location = location.abovebar, size = size.tiny) alertcondition(goLong, title = "Long", message = "STD-Filtered, N-Pole Gaussian Filter [Loxx]: Long₩nSymbol: {{ticker}}₩nPrice: {{close}}") alertcondition(goShort, title = "Short", message = "STD-Filtered, N-Pole Gaussian Filter [Loxx]: Short₩nSymbol: {{ticker}}₩nPrice: {{close}}")
프로필 이미지
고박사122
2023-03-29
1961
글번호 167679
지표

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

프로필 이미지
아침
2023-03-29
126
글번호 167678
시스템
답변완료

시스템식 부탁드립니다.

항상 도움 주셔서 감사합니다. 종목 : 해외선물 차트 : 5분봉 최초 매수, 매도 진입이후 10틱 간격으로 불타기나 물타기 할경우 실제 진입한 가격을 보면 같은 가격에 진입되는 경우가 많은것 같습니다. 요청사항1 : 저는 일정한 간격으로 불타기나 물타기를 하고 싶습니다. 최대한 정확한 진입가격을 위한 방법이 무엇인지 도움 부탁드립니다. [일정한 간격으로 진입] 요청사항2 : 청산할때 일정계약수 이하에서는 개별청산, 일정계약수 이상에서는 평균진입가보다 10틱이상일 경우 일괄청산 하고 싶습니다. [개별청산은 진입건보다 10틱이상 수익시 청산 [일괄청산은 남아있는 계약의 평균가격 대비 10틱 이상 수익이면 일괄청산] # 매수의 경우 var : 이평(0) ; 이평 = ma(C,20) ; if marketposition == 0 and C > 이평 then buy("b",atlimit,C,1) ; 매수가격 = entryprice ; # 불타기 # 방법1 if marketposition == 1 then { buy("b2",atlimit,매수가격+10*pricescale*2,1) ; buy("b3",atlimit,매수가격+10*pricescale*3,1) ; buy("b4",atlimit,매수가격+10*pricescale*4,1) ; buy("b5",atlimit,매수가격+10*pricescale*5,1) ; buy("b6",atlimit,매수가격+10*pricescale*6,1) ; # 방법2 if marketposition == 1 then { if MaxEntries == 1 Then buy("b2",atlimit,매수가격+10*pricescale*2,1) ; if MaxEntries == 2 Then buy("b3",atlimit,매수가격+10*pricescale*3,1) ; if MaxEntries == 3 Then buy("b4",atlimit,매수가격+10*pricescale*4,1) ; if MaxEntries == 4 Then buy("b5",atlimit,매수가격+10*pricescale*5,1) ; if MaxEntries == 5 Then buy("b6",atlimit,매수가격+10*pricescale*6,1) ; } #방법3 if MarketPosition == 1 Then { if highest(H,BarsSinceEntry) < 매수가격-10*pricescale*2 Then Buy("b2",AtLimit,매수가격+10*pricescale*MaxEntries,amt); if highest(H,BarsSinceEntry) < 매수가격-10*pricescale*3 Then Buy("b3",AtLimit,매수가격+10*pricescale*MaxEntries,amt); if highest(H,BarsSinceEntry) < 매수가격-10*pricescale*4 Then Buy("b4",AtLimit,매수가격+10*pricescale*MaxEntries,amt); if highest(H,BarsSinceEntry) < 매수가격-10*pricescale*5 Then Buy("b5",AtLimit,매수가격+10*pricescale*MaxEntries,amt); if highest(H,BarsSinceEntry) < 매수가격-10*pricescale*6 Then Buy("b6",AtLimit,매수가격+10*pricescale*MaxEntries,amt); } # 위 셋중 어느방법이 더 정확하게 진입이 되나요? # 위 방법외에 더 정확한 진입을 위한 수식이 있으면 수정 부탁드립니다. # 물타기 # 방법1 if marketposition == 1 then buy("bb2",atlimit,매수가격-10*pricescale*2,1) ; buy("bb3",atlimit,매수가격-10*pricescale*3,1) ; buy("bb4",atlimit,매수가격-10*pricescale*4,1) ; buy("bb5",atlimit,매수가격-10*pricescale*5,1) ; buy("bb6",atlimit,매수가격-10*pricescale*6,1) ; # 방법2 if marketposition == 1 then { if MaxEntries == 1 Then buy("b2",atlimit,매수가격-10*pricescale*2,1) ; if MaxEntries == 2 Then buy("b3",atlimit,매수가격-10*pricescale*3,1) ; if MaxEntries == 3 Then buy("b4",atlimit,매수가격-10*pricescale*4,1) ; if MaxEntries == 4 Then buy("b5",atlimit,매수가격-10*pricescale*5,1) ; if MaxEntries == 5 Then buy("b6",atlimit,매수가격-10*pricescale*6,1) ; } #방법3 if MarketPosition == 1 Then { if lowest(L,BarsSinceEntry) > 매수가격-10*pricescale*2 Then Buy("b2",AtLimit,매수가격-10*pricescale*MaxEntries,amt); if lowest(L,BarsSinceEntry) > 매수가격-10*pricescale*3 Then Buy("b3",AtLimit,매수가격-10*pricescale*MaxEntries,amt); if lowest(L,BarsSinceEntry) > 매수가격-10*pricescale*4 Then Buy("b4",AtLimit,매수가격-10*pricescale*MaxEntries,amt); if lowest(L,BarsSinceEntry) > 매수가격-10*pricescale*5 Then Buy("b5",AtLimit,매수가격-10*pricescale*MaxEntries,amt); if lowest(L,BarsSinceEntry) > 매수가격-10*pricescale*6 Then Buy("b6",AtLimit,매수가격-10*pricescale*MaxEntries,amt); } # 개별청산 if MarketPosition == 1 and CurrentContracts < 3 Then { SetStopProfittarget(PriceScale*10,PointStop); } Else SetStopProfittarget(0); # 일괄청산 #방법1: if MarketPosition == 1 and CurrentContracts >= 3 Then { exitlong("bx",atlimit,avgentryprice-PriceScale*10,PointStop); } #방법2: if MarketPosition == 1 and CurrentContracts >= 3 Then { if openpositionprofit/0.025[틱사이즈] < 10*pricescap then exitlong("bx",atlimit,c,PointStop); } # 둘중 어느것이 더 정확한 코딩인가요? # 위 방법외에 더 정확한 청산을 위한 방법이 있으면 수정 부탁드립니다. 도움 부탁드립니다. 감사합니다.
프로필 이미지
양치기
2023-03-29
1205
글번호 167677
시스템
답변완료

YesSpotMaker 클래스가 등록되지 않았습니다

안녕하세요, 다른 컴으로 YTS를 옮기는 과정에서 발생한 일인데, YesSpot 스크립트에 대한 스크립트 검증 과정에서 제목과 같은 메시지가 뜹니다. 문제가 뭘까요?
프로필 이미지
민현종
2023-03-29
973
글번호 167676
시스템