커뮤니티

예스랭귀지 Q&A

글쓰기

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

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

문의 드립니다.~~~~

안녕하세요 아래식으로 cme clude oil 온종일(8시에서 5시)거래시 11시에서 14시 사이와 20시에서 23시 사이에는 잔고에 대한 청산은 되고 진입은 안되는 것으로 하려면 어떻게 해야하나요? input : ntime(60),N(4),N1(120),A1(3); input : 익절틱수(0),손절틱수(0); input : StartTime(80000),EndTime(50000); var : S1(0),D1(0),TM(0),TF(0); var : cnt(0),SumSqrt(0),Stdv(0); var : sum(0),BBmd(0),Bbup(0),BBdn(0); Array : CC[100](0); var : Tcond(false); if (NextBarSdate != sdate and NextBarStime >= EndTime) or (NextBarSdate == sdate and NextBarStime >= EndTime and stime < EndTime) Then Tcond = False; if (NextBarSdate != sdate and NextBarStime >= StartTime) or (NextBarSdate == sdate and NextBarStime >= StartTime and stime < StartTime) Then { Tcond = true; S1 = TimeToMinutes(NextBarStime); D1 = NextBarSdate; } if D1 > 0 then { if NextBarSdate == D1 Then TM = TimeToMinutes(NextBarStime)-S1; Else TM = TimeToMinutes(NextBarStime)+1440-S1; TF = TM%ntime; if NextBarSdate != sdate or (NextBarSdate == sdate and ntime > 1 and TF < TF[1]) or (NextBarSdate == sdate and ntime > 1 and TM >= TM[1]+ntime) or (NextBarSdate == sdate and ntime == 1 and TM > TM[1]) Then { var1 = NextBarOpen; } if Tcond == true and MarketPosition <= 0 Then if Bdate == Bdate[n-1] and C>O Then Buy(); if Bdate == Bdate[n-1] and C<0 Then Sell(); } IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(50000); } if (sdate != sdate[1] and stime >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { IF Endtime <= starttime Then { SetStopEndofday(0); } }
프로필 이미지
예스요
2023-12-10
1047
글번호 174712
시스템
답변완료

확인요청 드립니다. 83933글

좋은 한주 되십시요. [ 요청1 ] Input : Period(15),Upsim(50); var1 = Simrido(Period); if var1 >= Upsim Then PlotPaintBar(High, Low, "투자심리선",MAGENTA,Def,7); else NoPlot(1); 상기 강조 지표에서 첫신호가 발생하고 10개봉(변수)중에 5개(변수) 이상이면 PlaySound("C:₩예스트레이더₩data₩Sound₩alert.wav"); 소리가 날수 있도록 수식 좀 요청 드립니다. [ 요청2] 아래글 재 확인 요청 드립니다. 83933글 즉 신호가 발생하면 다음신호에 의해서 수평선이 짧게(점수준) 됨니다. 이 점수준 수평선을 다음신호가 발생 해도 기본으로 Index <= var1 + 5 까지는 수평선이 그어지도록 요청 드립니다. ############################################################ 83933글 ############################################################ "기본 5봉 까지 수평 추세선을 그리고 5봉 보다 크면 다음신호가 발생할때 까지 계속 추세선을 그린다" 수정 좀 부탁 드립니다. ▶ 아래 수식 var : TX(0); input : P(5),n(8),틱(3); var : cnt(0),LL(0),HH(0); Array : LTL[10](0),HTL[10](0); var : LTL1(0),LTL2(0),LTL3(0),LTL4(0),LTL5(0),LTL6(0); var : HTL1(0),HTL2(0),HTL3(0),HTL4(0),HTL5(0),HTL6(0); if L < Lowest(L,P)[1] and (LL == 0 or (LL > 0 and abs(L-LL) >= PriceScale*틱)) Then { LL = L; For cnt = 9 DownTo 1 { LTL[cnt] = LTL[cnt-1]; } LTL[0] = TL_new(sDate,sTime,LL,NextBarSdate,NextBarStime,LL); TL_SetColor(LTL[0],Black); TL_Delete(LTL[n]); TL_SetSize(LTL[0],2); } Else { TL_SetEnd(LTL[0],sDate,sTime,LL); } if H > highest(H,P)[1] and (HH == 0 or (HH > 0 and abs(H-HH) >= PriceScale*틱)) Then { HH = H; For cnt = 9 DownTo 1 { HTL[cnt] = HTL[cnt-1]; } HTL[0] = TL_new(sDate,sTime,HH,NextBarSdate,NextBarStime,HH); TL_SetColor(HTL[0],Magenta); TL_SetSize(HTL[0],2); TL_Delete(HTL[n]); } Else { TL_SetEnd(HTL[0],sDate,sTime,HH); } #######################################################################33 수고하십시요.
프로필 이미지
요타
2023-12-10
1017
글번호 174711
검색
답변완료

문의 드립니다

안녕하세요 키움수식 변환입니다 키움bwi 지표(볼밴 보조지표입니다) (수식 1) bwi(4,2) (수식 2) bwi(20,2) 입니다 감사합니다
프로필 이미지
만강
2023-12-09
949
글번호 174710
지표

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

프로필 이미지
만강
2023-12-09
0
글번호 174709
지표
답변완료

수정 부탁드립니다.

안녕하세요? 담당자님, 친절하고 자세한 설명 매우큰 도움 되어서 감사함을 표시합니다. 정말 감사합니다. 아래의 수식에서 봉이 마감후 진입할수있게 진입을 변경하고싶습니다. 진입신호가나온후 봉마감할때 진입할수있게 해주시면 감사하겠습니다~ inputs: Length(10), Pval(0.05),당일청산(153000); input : 익절틱수(10), 손절틱수(10), 진입횟수(3); var : entry(0); if Bdate != Bdate[1] Then entry = 0; if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1 ; if entry < 진입횟수 then Sell("CBI", AtStop, Lowest(Low, Length) - Pval); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); SetStopEndofday(당일청산);
프로필 이미지
대구어린울프
2023-12-09
1046
글번호 174708
시스템
답변완료

부탁드립니다.

변환 부탁 드립니다. 감기조심하세요 선형회귀 관련 캔들입니다. study("Linear Regression Channel", overlay = true, max_bars_back = 1000, max_lines_count = 300) src = input(defval = close, title = "Source") len = input(defval = 100, title = "Length", minval = 10) devlen = input(defval = 2., title = "Deviation", minval = 0.1, step = 0.1) extendit = input(defval = true, title = "Extend Lines") showfibo = input(defval = false, title = "Show Fibonacci Levels") showbroken = input(defval = true, title = "Show Broken Channel", inline = "brk") brokencol = input(defval = color.blue, title = "", inline = "brk") upcol = input(defval = color.lime, title = "Up/Down Trend Colors", inline = "trcols") dncol = input(defval = color.red, title = "", inline = "trcols") widt = input(defval = 2, title = "Line Width") var fibo_ratios = array.new_float(0) var colors = array.new_color(2) if barstate.isfirst array.unshift(colors, upcol) array.unshift(colors, dncol) array.push(fibo_ratios, 0.236) array.push(fibo_ratios, 0.382) array.push(fibo_ratios, 0.618) array.push(fibo_ratios, 0.786) get_channel(src, len)=> mid = sum(src, len) / len slope = linreg(src, len, 0) - linreg(src, len, 1) intercept = mid - slope * floor(len / 2) + ((1 - (len % 2)) / 2) * slope endy = intercept + slope * (len - 1) dev = 0.0 for x = 0 to len - 1 dev := dev + pow(src[x] - (slope * (len - x) + intercept), 2) dev := sqrt(dev/len) [intercept, endy, dev, slope] [y1_, y2_, dev, slope] = get_channel(src, len) outofchannel = (slope > 0 and close < y2_ - dev * devlen) ? 0 : (slope < 0 and close > y2_ + dev * devlen) ? 2 : -1 var reglines = array.new_line(3) var fibolines = array.new_line(4) for x = 0 to 2 if not showbroken or outofchannel != x or nz(outofchannel[1], -1) != -1 line.delete(array.get(reglines, x)) else line.set_color(array.get(reglines, x), color = brokencol) line.set_width(array.get(reglines, x), width = 2) line.set_style(array.get(reglines, x), style = line.style_dotted) line.set_extend(array.get(reglines, x), extend = extend.none) array.set(reglines, x, line.new(x1 = bar_index - (len - 1), y1 = y1_ + dev * devlen * (x - 1), x2 = bar_index, y2 = y2_ + dev * devlen * (x - 1), color = array.get(colors, round(max(sign(slope), 0))), style = x % 2 == 1 ? line.style_solid : line.style_dashed, width = widt, extend = extendit ? extend.right : extend.none)) if showfibo for x = 0 to 3 line.delete(array.get(fibolines, x)) array.set(fibolines, x, line.new(x1 = bar_index - (len - 1), y1 = y1_ - dev * devlen + dev * devlen * 2 * array.get(fibo_ratios, x), x2 = bar_index, y2 = y2_ - dev * devlen + dev * devlen * 2 * array.get(fibo_ratios, x), color = array.get(colors, round(max(sign(slope), 0))), style = line.style_dotted, width = widt, extend = extendit ? extend.right : extend.none)) var label sidelab = label.new(x = bar_index - (len - 1), y = y1_, text = "S", size = size.large) txt = slope > 0 ? slope > slope[1] ? "&#8657;" : "&#8663;" : slope < 0 ? slope < slope[1] ? "&#8659;" : "&#8664;" : "⇒" stl = slope > 0 ? slope > slope[1] ? label.style_label_up : label.style_label_upper_right : slope < 0 ? slope < slope[1] ? label.style_label_down : label.style_label_lower_right : label.style_label_right label.set_style(sidelab, stl) label.set_text(sidelab, txt) label.set_x(sidelab, bar_index - (len - 1)) label.set_y(sidelab, slope > 0 ? y1_ - dev * devlen : slope < 0 ? y1_ + dev * devlen : y1_) label.set_color(sidelab, slope > 0 ? upcol : slope < 0 ? dncol : color.blue) alertcondition(outofchannel, title='Channel Broken', message='Channel Broken') // direction trendisup = sign(slope) != sign(slope[1]) and slope > 0 trendisdown = sign(slope) != sign(slope[1]) and slope < 0 alertcondition(trendisup, title='Up trend', message='Up trend') alertcondition(trendisdown, title='Down trend', message='Down trend')
프로필 이미지
다올
2023-12-09
1243
글번호 174707
지표
답변완료

볼밴돌파수식

84895번에 답변에 대한 후속문의 있읍니다. =================================================== 이건 다른건데요, 아래 수식은 종전에 60봉간 좁은 볼밴폭 유지 후 볼밴상한선 돌파하는 봉을 검색하는 것이었는데, 거의 나오지 않아 다음과 같이 단순화하고 싶어 수식수정바랍니다. .동일 볼밴 이용(120,1) .종가가 120봉간 볼밴상한선 미만(120봉간 한번도 상한선돌파하는 종가가 없음) .상/하 볼밴의 폭은 무시 .0봉에 볼밴상한선 돌파 간단한거 같아 시도해봐도 안되어서 할 수 없이 문의드립니다. ==================================================== input : Period(120),dv(1); input : N(60),Per1(10),Per2(5); var : BBup(0),BBdn(0),Emav(0),R(0); BBup = BollBandUp(Period,dv); BBdn = BollBandDown(Period,dv); Emav = Ema(c,Period); R = (Emav-Emav[N])/Emav[N]*100; value1 = highest(BBup,Period); value2 = lowest(BBdn,Period); if CrossUp(c,bbup) and CountIf(H > bbup,N)[1] < 1 and value1[1] <= Value2[1]*(1+Per1/100) and R <= Per2 and R >= -Per2 Then Find(1);
프로필 이미지
ksks
2023-12-11
1227
글번호 174706
종목검색
답변완료

수식작성 부탁드립니다.

안녕하세요. 운영자님 의뢰드릴 사항은, 매수조건 : 1) RSI(7), RSI(14), RSI(21) 선을 겹쳐 놓았을 때 정배열 2) ADX(14) 가 기준선 (20) 위에 위치 3) MACD (12, 26, 9) 선이 MACD signal 선보다 위 (정배열) 4) 파라볼릭 (af(0.02), maxAF(0.2))점위에 종가위치 5) EMA (50) 위에 종가 위치 매도조건 : 1) RSI(7), RSI(14), RSI(21) 선을 겹쳐 놓았을 때 역배열 2) ADX(14) 가 기준선 (20) 아래에 위치 3) MACD (12, 26, 9) 선이 MACD signal 선보다 아래 (역배열) 4) 파라볼릭 (af(0.02), maxAF(0.2))점 아래에 종가위치 5) EMA (50) 아래에 종가 위치 각 지표의 기간값 및 익절/손절값을 변수로 지정하여 최적화가 가능하도록 부탁드립니다. 수고하세요
프로필 이미지
고박사122
2023-12-09
1280
글번호 174705
시스템
답변완료

수식수정

input : EmaPeriod(50); input : RSIPeriod1(7),RSIPeriod2(14),RSIPeriod3(21),RSI차이(7); input : ADXPeriod(10); input : 익절(50),손절(50); var : Emav(0),RSI1(0),RSI2(0),RSI3(0),ADXv(0); var : Bcond(False),Scond(False); Emav = Ema(C,EmaPeriod); RSI1 = RSI(RSIPeriod1); RSI2 = RSI(RSIPeriod2); RSI3 = RSI(RSIPeriod3); ADXv = ADX(ADXperiod); Bcond = MarketPosition == 0 and MarketPosition(1) == 1 and MarketPosition(2) == 1; Scond = MarketPosition == 0 and MarketPosition(1) == -1 and MarketPosition(2) == -1; if C > Emav and RSI1 >= RSI2+RSI차이 and RSI2 >= RSI3+RSI차이 and ADXV >= 21 and Bcond == False Then buy(); if C < Emav and RSI1 <= RSI2-RSI차이 and RSI2 <= RSI3-RSI차이 and ADXV >= 21 and Scond == False Then Sell(); SetStopProfittarget(익절, PointStop); SetStopLoss(손절, PointStop); 위식에서 청산조건 (익절.손절) 기능삭제. 수정 일일 누적수익 100틱시 매매중지로 수정 부탁드립니다
프로필 이미지
아트정
2023-12-09
1030
글번호 174704
시스템