커뮤니티

예스랭귀지 Q&A

글쓰기

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

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

수식부탁드립니다.

항상 감사드립니다. 1. 20일 신고가 2. 일봉상 전고점 돌파하는 종목 3. 240이평 위 종목 조건에 부합하는 종목 검색식 부탁드립니다.
프로필 이미지
잔차
2025-05-23
259
글번호 191103
종목검색
답변완료

문의 드립니다.

아래 식에서 익절가를 설정할 수 있도록 추가 부탁드립니다. 매수용과 매도용 각각 분리해서 부탁드립니다. var1 = (DayHigh+DayLow)/2; if CrossUp(c,Var1) Then Buy(); if CrossDown(C,Var1) Then ExitLong(); var1 = (DayHigh+DayLow)/2; if CrossDown(C,Var1) Then Sell(); if CrossUp(c,Var1) Then ExitShort();
프로필 이미지
선물대장
2025-05-22
247
글번호 191102
시스템
답변완료

부탁드립니다 항상 감사합니다

Input: len(10), FC(1), SC(150), TP_Ratio(0.985), SL_Ratio(1.01), 진입수량(1); Var: Price(0), Len1(0), w(0), H1(0), L1(0), N1(0), H2(0), L2(0), N2(0), H3(0), L3(0), N3(0), dimen1(0), dimen(0), alpha1(0), oldalpha(0), oldN(0), N(0), alpha_(0), alpha(0), out(0), 진입가(0), TP(0), SL(0), posFlag(0), tx(0); // FRAMA 계산 Price = (H + L) / 2; len1 = len / 2; w = log(2 / (SC + 1)); H1 = highest(H, len1); L1 = lowest(L, len1); N1 = (H1 - L1) / len1; H2 = highest(H, len)[len1]; L2 = lowest(L, len)[len1]; N2 = (H2 - L2) / len1; H3 = highest(H, len); L3 = lowest(L, len); N3 = (H3 - L3) / len; dimen1 = (log(N1 + N2) - log(N3)) / log(2); dimen = iff(N1 > 0 and N2 > 0 and N3 > 0, dimen1, iff(isnan(dimen1[1]), 0, dimen1[1])); alpha1 = exp(w * (dimen - 1)); oldalpha = iff(alpha1 > 1, 1, iff(alpha1 < 0.01, 0.01, alpha1)); oldN = (2 - oldalpha) / oldalpha; N = (((SC - FC) * (oldN - 1)) / (SC - 1)) + FC; alpha_ = 2 / (N + 1); alpha = iff(alpha_ < 2 / (SC + 1), 2 / (SC + 1), iff(alpha_ > 1, 1, alpha_)); out = (1 - alpha) * iff(isnan(out[1]), 0, out[1]) + alpha * Price; // 진입 조건 If Close < out and Close[1] >= out[1] and posFlag = 0 Then Begin SellShort("FRAMA Short") next bar at market; 진입가 = Close; TP = 진입가 * TP_Ratio; SL = 진입가 * SL_Ratio; posFlag = -1; tx = Text_New(Date, Time, High, "진입조건만족"); Text_SetColor(tx, Red); End; // 청산 조건 If posFlag = -1 Then Begin If Close <= TP or Close >= SL Then Begin BuyToCover("청산") next bar at market; posFlag = 0; End; End; // 시각화 Plot1(out, "FRAMA", Blue); 지표로 적용할수있게 수정부탁드립니다 감사합니다!!
프로필 이미지
윤호석
2025-05-22
307
글번호 191101
지표
답변완료

키움

가=(highest(high,midPeriod)+lowest(low,midPeriod))/2; 나=supertrend(period, multiplier); M50=ma(C, 50); M200=ma(C, 200); M5=ma(C, 5); M1=ma(C, 1); CrossUp(나, 가)OR crossUP(C, 가)OR CrossUp(M1, M5)OR CrossUp(M1, M200)OR CrossUp(M1, M50)OR C>가 AND C>나 AND C>M5 AND C>M200 period 60 multiplier 2 midPeriod 26 항상감사합니다
프로필 이미지
박셰프
2025-05-22
298
글번호 191100
종목검색
답변완료

질문 부탁드립니다

답변 감사드립니다 질문 1) 아래식에서 for문을 수행했는데 해당 값이 없을 경우, 그 다음에 if aa[0]*1.05 < aa[cnt] 를 for cnt=1 to 5 로 수행하려고 한다면 어떻게 작성을 해야 할까요? value1=0; for cnt=1 to 5 { if aa[0]*1.2 < aa[cnt] then { value1=aa[cnt]; } } 위의 질문과 별개로 아래와 같이 나눠서 작성한다면 for 문을 순차적으로 수행하게 되는건가요?? 첫번째 for 문에서 저장된 value1 값이 두번째 for문으로 의해서 두번째 value1 값으로 변경되는건가요? (기존 value1에 덮어씌움?) value1=0; for cnt=1 to 5 { if aa[0]*1.2 < aa[cnt] then { value1=aa[cnt]; } } for cnt=1 to 5 { if aa[0]*1.05 < aa[cnt] then { value1=aa[cnt]; } } 질문2)) if h>l*1.08 then { sum1=0; sumi1=0; For cnt = 49 DownTo 1 { id[cnt]=id[cnt-1]; } id[0]= index; For cnt = 1 to (id[0]-id[1]) { sum1=sum1+l[cnt]; sumi1=sumi1+1; } value1=sum1/sumi1; For cnt = 49 DownTo 1 { aa[cnt] = aa[cnt-1]; } aa[0] = value1; For cnt = 1 to (id[0]-id[1]) { if h[cnt]>aa[0] then value2=cnt; } } 위에 식에서 aa[0] 보다 큰 고가의 갯수를 value2 에 저장을 했는데요 만약에 cnt = 1 to (id[0]-id[2] ) cnt= 1 to (id[0]-id[3]) ,,, 이런식으로 cnt= 1 to (id[0]-id[4]) 까지 고가의 갯수를 각각 구했을때, value2 보다 처음으로 2배 이상의 값을 가지게 됐을때 id[] 의 번호와 고가값의 갯수를 저장하고자 하는데 통합된 식으로 작성을 도와주셨으면 합니다 예를들어서 기준이 되는 value2 가 5일때, 만약 id[3] 까지 구했을때는 8, id[4] 까지는 12개가 나왔다면 id[4]의 번호 (4번) 과 고가값의 갯수를 저장하고자 합니다 질문3) 질문2와 같이 갯수 비교하는 수식을 만들려고 하는데요 For cnt = 1 to (id[0]-id[1]) { if h[cnt]>aa[0] and l[cnt]<aa[0] then value2=cnt; } 위와 같은 식이 있을때, 같은 for 범위 ( cnt = 1 to (id[0]-id[1]) 인데 aa[] 값을 다르게 해서 비교하려고 합니다 if h[cnt]>aa[0] and l[cnt]<aa[0] h[cnt]>aa[1] and l[cnt]<aa[1] ... h[cnt]>aa[3] and l[cnt]<aa[3] 이렇게 각각의 cnt 값들을 구했을때 이들중에서 cnt 가 가장 클때 그 값과, 그때의 aa 배열의 의 순번을 저장하고 싶습니다 예를들어 aa[3] 일때 봉갯수가 가장 많다면 봉갯수와 aa[3] 을 저장을 하고 싶습니다 감사합니다
프로필 이미지
yamu
2025-05-23
264
글번호 191099
지표
답변완료

시작시간 문의

늘 감사합니다. 아래 수식이 안되네요 . 검토좀 해주세요. input : 시작시간(090000),ntime(30); var : S1(0),D1(0),TM(0),TF(0),TL(0); if data1((sDate != sDate[1] and sTime >= 시작시간) or (sDate == sDate and sTime >= 시작시간 and sTime[1] < 시작시간)) Then { S1 = data1(TimeToMinutes(시작시간)); D1 = data1(sdate); } if D1 > 0 then { if data1(sdate) == D1 Then TM = data1(TimeToMinutes(stime))-S1; Else TM = data1(TimeToMinutes(stime))+1440-S1; TF = TM%ntime; if Bdate != Bdate[1] or (Bdate == Bdate[1] and ntime > 1 and TF < TF[1]) or (Bdate == Bdate[1] and ntime > 1 and TM >= TM[1]+ntime) or (Bdate == Bdate[1] and ntime == 1 and TM > TM[1]) Then { TL = TL_New_Self(sDate,sTime,-999999999,sDate,sTime,999999999); TL_SetColor(TL,Black); TL_SetSize(TL,0); } } Plot1(data1(HighD(0)), "고가",Red); Plot2(data1(lowD(0)), "저가",Blue); Plot3(data1(OpenD(0)), "시가"); Plot4(data1(CloseD(0)), "현재"); 감사합니다.
프로필 이미지
상암동
2025-05-22
249
글번호 191097
지표

우유 님에 의해서 삭제되었습니다.

프로필 이미지
우유
2025-05-22
12
글번호 191095
시스템
답변완료

지표 변환 부탁드립니다.

//@version=6 indicator(title="Price Oscillator", shorttitle="PPO", format=format.price, precision=2, timeframe="", timeframe_gaps=true) shortlen = input.int(12, "Short Length", minval=1) longlen = input.int(26, "Long Length", minval=1) signallen = input.int(9, "Signal Length", minval=1) src = input.source(close, title="Source") exp = input.bool(true, "Use exponential MA") esma(source, length)=> s = ta.sma(source, length) e = ta.ema(source, length) exp ? e : s short = esma(src, shortlen) long = esma(src, longlen) po = (short - long) / long * 100 sl = esma(po, signallen) hist = po - sl plot(hist, title = "Histogram", style = plot.style_columns, color = (hist >= 0 ? (hist[1] < hist ? #26A69A : #B2DFDB) : (hist[1] < hist ? #FFCDD2 : #FF5252))) plot(po, color=color.teal, title="PPO") plot(sl, color=color.orange, title="Signal Line") hline(0, "Zero Line", color=#787B86)
프로필 이미지
삼손감자
2025-05-22
276
글번호 191093
지표
답변완료

다시 문의드립니다.

문의드린 이전 수식변환에서 아래와 같이 답을 주셨습니다. 1분봉 차트에, 같은 기간(50)과 승수(5)를 적용해서 트레이딩뷰와 비교했더니 첨부된 그림처럼 다르게 나옵니다. heikinashi supertrend 라기보다 그냥 supertrend 처럼 구현됩니다. 왜 다르게 나오는지 번거로우시겠지만 다시한번 검토부탁드립니다. 그리고 녹색선과 빨강선의 바뀌는 부분을 연결부탁드립니다. 감사합니다. ========================= 안녕하세요 예스스탁입니다. input : upertrendAtrPeriod(10); input : supertrendAtrMultiplier(2.7); var : haClose(0),haOpen(0),haHigh(0),haLow(0),haTR(0),alpha(0),haTrueRange(0); var : haSupertrendUp(0),haSupertrendDown(0),trendingUp(Nan),trendingDown(Nan); var : direction(0),supertrend(0),supertrendUp(False),supertrendDown(False); if index == 0 then { haClose = (O+H+L+C)/4; haOpen = open; haHigh = MaxList( high, haOpen, haClose); haLow = MinList( low, haOpen,haClose); } else { haClose = (O+H+L+C)/4; haOpen = (haOpen [1] + haClose [1])/2 ; haHigh = MaxList(High, haOpen, haClose) ; haLow = MinList(Low, haOpen, haClose) ; } haTR = iff(IsNan(haOpen[1]) == true, haOpen-haLow, max(max(haOpen - haLow, abs(haOpen - haClose[1])), abs(haLow - haClose[1]))); alpha = 1 / upertrendAtrPeriod ; haTrueRange = IFf(IsNan(haTrueRange[1]) == true, ma(haTR,upertrendAtrPeriod) , alpha * haTR + (1 - alpha) * IFf(isnan(haTrueRange[1])==true,0,haTrueRange[1])); haSupertrendUp =((haHigh +haLow )/2 )-(supertrendAtrMultiplier *haTrueRange ); haSupertrendDown =((haHigh +haLow )/2 )+(supertrendAtrMultiplier *haTrueRange ); direction = 0; trendingUp = iff(haClose[1]>trendingUp[1] , max (haSupertrendUp ,trendingUp[1]) , haSupertrendUp); trendingDown = iff(haClose[1]<trendingDown[1] , min (haSupertrendDown ,trendingDown[1]) , haSupertrendDown); direction = iff(haClose > trendingDown[1] , 1 , iff(haClose < trendingUp[1], -1 , IFf(IsNan(direction[1]) == true,1,direction[1]))); supertrend = iff(direction == 1 , trendingUp , trendingDown); if direction == 1 Then { plot1(supertrend,"supertrendUp", Green); NoPlot(2); } Else { plot2(supertrend,"supertrendDow", Red); NoPlot(1); } =========================
프로필 이미지
해암
2025-05-22
326
글번호 191084
지표