커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

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

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

지표입니다.

안녕하세요? 커뮤니티 게시판을 보다가 우연히 아래로직을 보았는데 이해가 어렵습니다. 이 로직의 설명좀 부탁드립니다. var : sumV(0),sumB(0),mav(0); if bdate != Bdate[1] Then { sumV = 0; sumB = 0; } sumV = sumV+c; sumB = sumB+1; mav = sumV/sumB; Plot1(mav+0.3); Plot2(mav-0.3); 감사합니다.
프로필 이미지
포보스
2021-09-26
837
글번호 152465
지표
답변완료

안녕하세요 스크립트 해석 부탁드립니다

안녕하세요 노고에 늘 감사드립니다 트레이딩뷰 스크립트 내용이 이해가 가지 않아서 헤매고 있는데요 아래 스크립트는 어떤 상황에서 buy신호를 발생하고 또 sell 신호를 발생하는지 가능하면 설명 부탁드립니다 대단히 감사합니다 -_- //@version=3 study(title="ATR Smoothed (By dysrupt)_BuySell version", shorttitle="ATR_SM_BuySell", overlay = true) //Modifyed by @guikroth ////////////////////////////////////////////////////////////////////////////////INPUTS nATRPeriod = input(21, "Period") nATRMultip = input(6.3, "Multiplier",type=float, minval=0.5, maxval=1000, step=0.1) /////////////////////////////////////////////////////////////////////////////////ATR xATR = atr(nATRPeriod) nLoss = nATRMultip * xATR xATRTrailingStop = na xATRTrailingStop := iff(close > nz(xATRTrailingStop[1], 0) and close[1] > nz(xATRTrailingStop[1], 0), max(nz(xATRTrailingStop[1]), close - nLoss), iff(close < nz(xATRTrailingStop[1], 0) and close[1] < nz(xATRTrailingStop[1], 0), min(nz(xATRTrailingStop[1]), close + nLoss), iff(close > nz(xATRTrailingStop[1], 0), close - nLoss, close + nLoss))) pos = na pos := iff(close[1] < nz(xATRTrailingStop[1], 0) and close > nz(xATRTrailingStop[1], 0), 1, iff(close[1] > nz(xATRTrailingStop[1], 0) and close < nz(xATRTrailingStop[1], 0), -1, nz(pos[1], 0))) color = pos == -1 ? red: pos == 1 ? lime : blue //patr=plot(xATRTrailingStop, color=color, linewidth=2, title="ATR Trailing Stop", transp=0) // Deternine if we are currently LONG isLong = false isLong := nz(isLong[1], false) // Determine if we are currently SHORT isShort = false isShort := nz(isShort[1], false) //Trading // Buy only if the buy signal is triggered and we are not already long LONG = not isLong and pos == 1 // Sell only if the sell signal is triggered and we are not already short SHORT = not isShort and pos == -1 if (LONG) isLong := true isShort := false if (SHORT) isLong := false isShort := true barcolor(isLong ? lime : isShort ? red : na) // Show Break Alerts plotshape(SHORT, title="Sell", style=shape.labeldown, location=location.abovebar, size=size.normal, text="Sell", transp=0, textcolor = white, color=red, transp=0) plotshape(LONG, title="Buy", style=shape.labelup, location=location.belowbar, size=size.normal, text="Buy", textcolor = white, color=green, transp=0) // === /PLOTTING === // Send alert to TV alarm sub-system alertcondition(LONG,title="Sell",message="Sell") alertcondition(SHORT,title="BuY",message="Buy") alertcondition(SHORT,title="BuY",message="Buy") alertcondition(SHORT,title="BuY",message="Buy") ////////////////////////////////////////////////////////////////////////////////VWMA len2 = input(100, minval=1, title="Smooth") src = input(close, title="Source") out = vwma(src, len2) avg1=avg(out, xATRTrailingStop) plot(avg1, color=aqua, transp=0, title="ATR")
프로필 이미지
chancebo
2021-09-26
892
글번호 152464
지표

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

프로필 이미지
아자으
2021-09-25
66
글번호 152463
시스템
답변완료

사용자함수 만들기

아래와 같은 식을 책에 나온대로 넣었는데 EntriesToday라는 사용자함수를 먼저 만들어야 한다고 합니다. 사용자함수로 들어갔는데 활성화도 안되고 어떻게 해야 이 식이 작동하는지 알려주세요 Input : P1(50), P2(40), P3(10), StopLoss(2); Var1 = StochasticsK(P1, P2); Var2 = StochasticsD(P1, P2, P3); If EntriesToday(date)<1 Then { if CrossUp(Var1, 80) Then Buy(); if CrossDown(var1, 20) Then Sell(); } if CrossDown(Var1, Var2) Then ExitLong(); if CrossUp(Var1, Var2) Then ExitShort(); SetStopLoss(stopLoss); SetStopEndofday(1450);
프로필 이미지
Ohare
2021-09-25
1075
글번호 152462
시스템
답변완료

키움수식변환좀 부탁드릴게요..

키움 수식은 아래와 같습니다. BBUP = BBandsUP( period, d1 ) ; BB = stochasticsslow(pds1,pds2) ; BBwiHH = highest(BB, period ) ; HHc = valuewhen(1, BBwiHH==BBwi, C ) ; HHCUP = valueWhen(1, crossup( BB, BBWIHH(1) ), C ) ; CDN = crossdown( bb, threshold ) ; CDN1 = valueWhen(1, CDN, C ) ; CDN2 = valueWhen( 2, CDN, C ) ; C1 = HHC < HHCUP && BB < threshold ; c2 = CDN1 < CDN2 ; c1 or ( c2 and !c2(1) ) 그럼 좋은 하루되세요.
프로필 이미지
예그리나
2021-09-25
1430
글번호 152461
검색
답변완료

지표 부탁드립니다.

안녕하세요! 다음은 참조데이터2의 최고최저 선긋기를 만들어주신것입니다. 감사드리고요. 한 가지 더 수정을 부탁드립니다. 1. 추세선 긋기를 0선을 기준으로 0선 위에서 최고, 0선 아래에서 최저를 그리게 해주세요. 2. 추세선이 캔들에도 같이 그려지게 해주세요. 꼭 부탁드립니다. 꾸뻑 var : C2(0,Data2),H2(0,Data2),L2(0,Data2),cnt(0,Data2); var : Sidx(0,Data2),Sidx1(0,Data2),Eidx(0,Data2),Eidx1(0,Data2),Pre1(0,Data2); C2 = Data2(c); if Data2(Bdate != Bdate[1]) Then { H2 = C2; L2 = C2; Sidx = data2(Index); Sidx1 = Sidx[1]; Eidx1 = Eidx[1]; } Eidx = data2(Index); if data2(Bdate != Bdate[1] or (Bdate == bdate[1] and C2 > h2)) Then h2 = C2; if data2(Bdate != Bdate[1] or (Bdate == Bdate[1] and C2 < l2)) Then l2 = C2; if Sidx1 > 0 Then { pre1 = 0; For cnt = data2(Index)-Eidx1 to data2(Index)-Sidx1 { if data2(sDate[cnt] < sDate and sTime[cnt] <= sTime) Then { pre1 = C2[cnt]; cnt = data2(Index-Sidx1+1); } } }
프로필 이미지
포보스
2021-09-25
1385
글번호 152460
지표
답변완료

지표 부탁드립니다.

안녕하세요! 일전에 아래와 같이 실매수 거래량과 최고최저 선긋기를 만들어주셔서 정말 감사드립니다. 한가지 더 수정을 부탁드립니다. 1. 추세선 긋기를 0선을 기준으로 0선 위에서 최고, 0선 아래에서 최저를 그리게 해주세요. 2. 추세선이 캔들에도 같이 그려지게 해주세요. 꼭 부탁드립니다. 꾸뻑 var : sum(0),sum1(0),idx(0),idx1(0),cnt(0),hh(0),ll(0); if Bdate != Bdate[1] Then { sum = 0; idx = 0; idx1 = idx[1]; } idx = idx+1; if C > O Then sum = sum+v; if C < O Then sum = sum-v; if Bdate != Bdate[1] or (Bdate == bdate[1] and sum > hh) Then hh = sum; if Bdate != Bdate[1] or (Bdate == Bdate[1] and sum < ll) Then ll = sum; sum1 = 0; Condition1 = False; For cnt = idx to (idx+idx1+1) { if Condition1 == False and sTime[cnt] <= stime Then { sum1 = sum[cnt]; Condition1 = true; } }
프로필 이미지
포보스
2021-09-25
1195
글번호 152459
지표
답변완료

수식수정 부탁드립니다.

Inputs: 카운팅시작일자(20210910), 카운팅시작시간(070000),Period(112); var : cnt(0),Tcond(false); var : hh(0),ll(0),tl11(0),tl12(0),tl21(0),tl22(0); if sdate >= 카운팅시작일자 and stime >= 카운팅시작시간 Then Tcond = true; if Tcond == true Then { if (sdate != sdate[1] and stime >= 카운팅시작시간) or (sdate == sdate[1] and stime >= 카운팅시작시간 and stime[1] < 카운팅시작시간) Then Variables: BullP(0), BearP(0); BullP = (HIGH - ma(Close,Period)); BearP = (LOW - ma(Close,Period)); if BullP>0 then { var1 = BullP; } Else { var2 = BearP; } Var3=bullp; Var4=-bearp; plot1(Var3,"1",iff(Var3<>0,REd,BLUe)); plot2(Var4,"2",iff(Var4<>0,BLUe,REd)); PlotBaseLine1(0, "중심",black); if Bdate != Bdate[1] Then { hh = BullP; LL = BearP; tl11 = TL_New(sDate,sTime,99999999,sDate,sTime,0); TL_SetColor(tl11,YELLOW); TL12 = TL_New_Self(sDate,sTime,99999999,sDate,sTime,0); TL_SetColor(TL12,YELLOW); TL21 = TL_New(sDate,sTime,99999999,sDate,sTime,0); TL_SetColor(TL21,GREEN); TL22 = TL_New_Self(sDate,sTime,99999999,sDate,sTime,0); TL_SetColor(TL22,GREEN); } Else { if BullP > hh Then { hh = BullP; TL_SetBegin(TL11,sdate,sTime,99999999); TL_SetEnd(TL11,sdate,sTime,-99999999); TL_SetBegin(TL12,sdate,sTime,99999999); TL_SetEnd(TL12,sdate,sTime,-99999999); TL_SetColor(TL11,YELLOW); } if BearP< ll Then { ll = BearP; TL_SetBegin(TL21,sdate,sTime,99999999); TL_SetEnd(TL21,sdate,sTime,-99999999); TL_SetBegin(TL22,sdate,sTime,99999999); TL_SetEnd(TL22,sdate,sTime,-99999999); TL_SetColor(TL21,GREEN); } }} 상기 수식에서 bullp-bearp=결과값을 PlotBaseLine1(0, "중심",black); 기준으로 오실레이터로 나타내고싶습니다. 수고하세요!!
프로필 이미지
수색대대
2021-09-27
1373
글번호 152458
지표
답변완료

지표식 부탁합니다

안녕하십니까? 전월종가 실선을 만들고 그 선이 다음달까지 점선으로 그려지도록 식을 만들었습니다. 그런데 점선이 그려지지 않습니다. 수정부탁합니다. var1 = monthclose(1); var2 = var1[1]; var3 = index; plot1(var1, "전월종가", BLACK); If C>var2*0.8 && C<var2*1.2 Then{ If index>=var3 && index<=var3 + 20 && var1>var2 Then plot2(var2, "연장선", BLACK);} 고맙습니다.
프로필 이미지
등정
2021-09-25
1283
글번호 152457
지표