커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

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

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

문의드립니다.

안녕하세요 O[7] O[6] O[5] O[4] O[3] O[2] O[1] O[0] 오픈가가 이렇게 있을 때, 만약 O[5] = O[4] = O[3] = O[2] = O[1] 이런식으로 O[5]부터 오픈가가 같고, O[0]에서 다시 달라진다면 O[4]에서 매수하고 오픈가가 달라지는 O[0]에서 매도 할려면 어떻게 작성해야 하는지 궁금합니다. * 한마디로 이전 가격과 같으면 매수, 달라지면 매도 하고 싶습니다.
프로필 이미지
확실한수익
2024-10-24
652
글번호 184580
시스템
답변완료

차트 재실행시 봉이 변하는 이유

안녕하세요. 자동매매중에 차트 재실행시 봉이 변화하여 이평선이 틀어지는 것에 대해 질문드려요. 해외선물 270틱 봉을 사용중이었습니다. 1. 오전 9시경 차트를 열어서 자동매매 진행을 하였습니다. 2. 오후 5시까지 자동매매 2회 진행되었고, 수익실현하였습니다. 3. 자동매매를 일시중단하였습니다. 문제1. 차트를 재실행하니 봉모양이 바뀌었음. 그로인해 이평선이 틀어짐. 문제2. 실제 계좌에서는 익절한 부분이 모두 손절처리로(차트상) 바뀌어있음. Q1. 재실행하기전 차트모양은 왜 나왔던건가요? Q2. 재실행하면 왜 봉모양이 변화하나요? (재실행 이후는 동일하게 유지됨)
프로필 이미지
유르
2024-10-24
706
글번호 184579
지표
답변완료

검색식 부탁드립니다. 감사합니다.

다음과 같은 조건일때 CCI(14) > 100 && MACD > 0 && MFI(14) > 60 && C > Ma(60) 최근 5봉이상 수평으로 횡보하는 슈퍼트렌드(트레이딩뷰)상단선을 종가로 돌파하는 종목의 검색식 요청드립니다. 항상 감사드립니다.
프로필 이미지
하이모리
2024-10-24
644
글번호 184577
종목검색
답변완료

키움수식 변환 부탁드립니다.

일교차가 점점 심해지고 있네요. 감기 조심하시기 바래요. 키움지표 수식입니다. 예스랭귀지로 변환 부탁드립니다. A=Stochasticsfast(Period); B=eavg(Stochasticsfast(Period),Period1); D=crossup(A,B); E=avg(C,5)<avg(c,20); D&&E&&C>=O ------------ Period 5 Period1 3 즐거운 하루 보내세요~
프로필 이미지
스톰82
2024-10-24
650
글번호 184576
종목검색
답변완료

수식 부탁드립니다.

장 시작 전에 챠트에 제가 미리 정해 놓은 가격 선을 입력할 수 있도록 수식 부탁드립니다.
프로필 이미지
중방
2024-10-24
718
글번호 184563
지표
답변완료

수고하십니다

항상노고에 감사드리며 트레이딩뷰챠트인데 변환 부탁드립니다 주말 잘보내세요 /@version=5 indicator("DSL Trend Analysis [ChartPrime]", overlay = true) // --------------------------------------------------------------------------------------------------------------------} // &#120400;&#120398;&#120384;&#120397; &#120388;&#120393;&#120395;&#120400;&#120399;&#120398; // --------------------------------------------------------------------------------------------------------------------{ int len = input.int(10, "Length") // Length for calculating DSL int offset = input(30, "Offset") // Offset for threshold levels float width = input.float(1, "Bands Width", step = 0.1, maxval = 2, minval = 0.5) // Width for ATR-based bands // Colors for upper and lower trends color upper_col = input.color(color.lime, "+", inline = "col") color lower_col = input.color(color.orange, "-", inline = "col") // --------------------------------------------------------------------------------------------------------------------} // &#120388;&#120393;&#120383;&#120388;&#120382;&#120380;&#120399;&#120394;&#120397; &#120382;&#120380;&#120391;&#120382;&#120400;&#120391;&#120380;&#120399;&#120388;&#120394;&#120393;&#120398; // --------------------------------------------------------------------------------------------------------------------{ // Function to calculate DSL lines based on price dsl_price(float price, int len) => // Initialize DSL lines as NaN (not plotted by default) float dsl_up = na float dsl_dn = na float sma = ta.sma(price, len) // Dynamic upper and lower thresholds calculated with offset float threshold_up = ta.highest(len)[offset] float threshold_dn = ta.lowest(len)[offset] // Calculate the DSL upper and lower lines based on price compared to the thresholds dsl_up := price > threshold_up ? sma : dsl_up[1] dsl_dn := price < threshold_dn ? sma : dsl_dn[1] // Return both DSL lines [dsl_up, dsl_dn] // Function to calculate DSL bands based on ATR and width multiplier dsl_bands(float dsl_up, float dsl_dn) => float atr = ta.atr(200) * width // ATR-based calculation for bands float upper = dsl_up - atr // Upper DSL band float lower = dsl_dn + atr // Lower DSL band [upper, lower] // Get DSL values based on the closing price [dsl_up, dsl_dn] = dsl_price(close, len) // Calculate the bands around the DSL lines [dsl_up1, dsl_dn1] = dsl_bands(dsl_up, dsl_dn) // Linear regression on the close price over a short period float linreg = ta.linreg(close, 5, 0) // Determine the trend color based on the relationship between price, DSL lines, and bands color trend_col = high > dsl_up1 and high < dsl_up and high > dsl_dn1 ? color.new(upper_col, 60) : low > dsl_dn and low < dsl_dn1 ? color.new(lower_col, 60) : high > dsl_up ? upper_col : low < dsl_dn ? lower_col : na // --------------------------------------------------------------------------------------------------------------------} // &#120401;&#120388;&#120398;&#120400;&#120380;&#120391;&#120388;&#120405;&#120380;&#120399;&#120388;&#120394;&#120393; // --------------------------------------------------------------------------------------------------------------------{ // Plot the linear regression with color based on trend analysis plot(linreg, "Trend Line", color = trend_col, linewidth=4, style = plot.style_linebr, force_overlay = false) // If it's the last bar, display labels for the DSL upper and lower bands if barstate.islast label.delete(label.new(bar_index + 5, dsl_up, "Upper Band₩n" + str.tostring(dsl_up, "#.##"), style = label.style_label_left, color = color(na), textcolor = chart.fg_color)[1]) label.delete(label.new(bar_index + 5, dsl_dn, "Lower Band₩n" + str.tostring(dsl_dn, "#.##"), style = label.style_label_left, color = color(na), textcolor = chart.fg_color)[1]) // Plot the DSL lines on the chart pu = plot(dsl_up, color=color.gray, linewidth=1, title="DSL Up") pd = plot(dsl_dn, color=color.gray, linewidth=1, title="DSL Down") // Plot the DSL bands pu1 = plot(dsl_up1, color=color.gray, linewidth=1, title="DSL Upper Band") pd1 = plot(dsl_dn1, color=color.gray, linewidth=1, title="DSL Lower Band") // Fill the space between the DSL lines and bands with color fill(pu, pu1, dsl_up, dsl_up1, color.new(upper_col, 80), color.new(upper_col, 90)) fill(pd, pd1, dsl_dn, dsl_dn1, color.new(lower_col, 80), color.new(lower_col, 90)) // Uncomment the following line to plot candles with trend color // plotcandle(open, high, low, close, title='Title', color = trend_col, wickcolor=trend_col, bordercolor = trend_col) // --------------------------------------------------------------------------------------------------------------------}
프로필 이미지
비듬싸순
2024-10-24
1222
글번호 184562
지표
답변완료

추세전환 일정 크기 이상

input : Period(100); Var:j(0),T(0),txx(0); Var: date11(0),date12(0),time11(0),time12(0),TL1(0),TL(0), date21(0),date22(0),time21(0),time22(0), date31(0),date32(0),time31(0),time32(0),tx(0); Array:HiVal[20](0),LoVal[20](0),HiBar[20](0),LoBar[20](0); Plot1(value12); For j = 0 To 19 { HiBar[j] = HiBar[j] + 1; LoBar[j] = LoBar[j] + 1; } if crossup(c,highest(H,Period)[1]) Then T = 1; if CrossDown(c,Lowest(L,Period)[1]) Then T = -1; If T == -1 Then { If T[1] != -1 Then { For j = 18 DownTo 0 { LoVal[j+1] = LoVal[j]; LoBar[j+1] = LoBar[j]; } LoVal[0] = L; LoBar[0] = 0; date11 = date[HiBar[0]]; time11 = stime[HiBar[0]]; Value11 = HiVal[0]; date12 = date[LoBar[0]]; time12 = stime[LoBar[0]]; Value12 = LoVal[0]; TL_Delete(TL); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,Blue); date21 = date[HiBar[0]]; time21 = stime[HiBar[0]]; date22 = date[0]; time22 = stime[0]; if abs(value12[1]-value11[1]) < 0.5 Then Text_Delete(tx); tx = Text_New(sDate,stime,value12,NumToStr(value11-value12,2)); Text_SetColor(Tx,Blue); Text_SetStyle(tx,1,0); Text_SetSize(tx,25); Text_SetBold(tx,1); } If LoVal[0] > L Then { LoVal[0] = L; LoBar[0] = 0; date12 = date[LoBar[0]]; time12 = stime[LoBar[0]]; Value12 = LoVal[0]; TL_SetEnd(TL1, date12,time12,Value12); date22 = date[0]; time22 = stime[0]; Text_SetString(tx,NumToStr(value11-value12,2)); Text_SetLocation(tx,sDate,sTime,value12); } } If T == 1 Then { If T[1] != 1 Then { For j = 18 DownTo 0 { HiVal[j+1] = HiVal[j]; HiBar[j+1] = HiBar[j]; } HiVal[0] = H; HiBar[0] = 0; date11 = date[LoBar[0]]; time11 = stime[LoBar[0]]; Value11 = LoVal[0]; date12 = date[HiBar[0]]; time12 = stime[HiBar[0]]; Value12 = HiVal[0]; TL_Delete(TL); TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen); TL1 = TL_New(date11,time11,Value11,date12,time12,Value12); TL_SetColor(TL1,Red); date31 = date[LoBar[0]]; time31 = stime[LoBar[0]]; date32 = date[0]; time32 = stime[0]; if abs(value12[1]-value11[1]) < 0.5 Then Text_Delete(tx); tx = Text_New(sDate,stime,value12,NumToStr(value12-value11,2)); Text_SetColor(Tx,Red); Text_SetStyle(tx,1,1); Text_SetSize(tx,25); Text_SetBold(tx,1); } If HiVal[0] < H Then { HiVal[0] = H; HiBar[0] = 0; date12 = date[HiBar[0]]; time12 = stime[HiBar[0]]; Value12 = HiVal[0]; TL_SetEnd(TL1, date12,time12,Value12); date32 = date[0]; time32 = stime[0]; Text_SetString(tx,NumToStr(value12-value11,2)); Text_SetLocation(tx,sDate,sTime,value12); } } TL_SetSize(TL1,1); 0.5보다 작아도 조건만 맞으면 바뀌는 추세 전환을, 조건이 맞아도 강제로 보류하고 있다가, 새 추세선의 크기가 0.5 이상이 될 때, 추세 전환으로 변경. 즉 전환 조건에 새 추세선 크기가 0.5 이상일 때 추가. 감사합니다.
프로필 이미지
고성
2024-10-24
900
글번호 184561
지표

살빼고싶다 님에 의해서 삭제되었습니다.

프로필 이미지
살빼고싶다
2024-10-24
84
글번호 184560
검색
답변완료

문의 드립니다

키움에서 쓰는 슈퍼트렌드 지표수식으로 검색식을 만들고 싶습니다. A = supertrend(period, multiplier); ValueWhen(1, CrossUp(C, A), A(1)); 지표조건 period: 14 multiplier: 3 한가지 더 부탁 드리고 싶은것은 키움에서 저 수식으로 지표를 만들어서 보면 선이 위에서 떨어지는 경우가 있고 밑에서 위로 올라가는 경우도 있던데 떨어지는 부분만 검색이 가능 하도록 할 수도 있을런지요?
프로필 이미지
수지성
2024-10-24
861
글번호 184559
종목검색